Skip to content

release.sh: recover conflicted release PRs with a targeted Fix run and refresh CI waits #2016

Open

Description

@JacobStephens2

This was generated by AI during triage.

Release runs for 0.28.0 (#1977) and 0.29.0 (#2010) waited for CI for hours without advancing. Both original bump commits conflicted with main in Cargo.toml and Cargo.lock, and neither had any GitHub Actions workflow runs. After later commits resolved the conflicts, the running release scripts continued polling the original SHA indefinitely.

The maintainer approved classifying this as a bug ready for an agent, and requested that the release script start a targeted thirdshift Fix run when it would help recover the release PR. The following Agent Brief specifies that recovery and its publication constraints.

Activity

  1. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Recover release PRs with a bounded targeted Fix run, and stop waiting indefinitely on missing CI or superseded heads.

    Current behavior:
    The release command selects a green main Candidate, opens a version-bump PR, waits for workflow runs on its captured head, tags that head, waits for publication, and then merges the PR. Main can already have advanced past the selected Candidate. A version change on main can conflict with the bump, preventing GitHub from starting pull_request workflows. The workflow wait treats an empty run list as pending forever. It also never refreshes the PR head, so later repairs on the branch do not unblock the running release command.

    Confirmed examples:

    • Release 0.28.0 #1977: original bump c50a892 had zero workflow runs; merging against main at opening (84c5856) reproduces Cargo.toml and Cargo.lock conflicts. Subsequent heads passed CI and the PR was merged, but v0.28.0 was not tagged or published at triage time.
    • Release 0.29.0 #2010: original bump f3f8480 had zero workflow runs; merging against main at opening (c45ab66) reproduces the same conflicts. Repaired head d7cf797 passed CI and Release PR checks.
    • Running the actual sourced wait_for_workflow_runs against the original 0.29.0 head under timeout 4s exited 124; against its repaired head it exited 0. Both original-head Actions API lookups returned total_count: 0.

    Desired behavior:
    The release command observes its own PR while waiting and automatically starts a targeted Fix run when there is an actionable Merge conflict or completed failing CI. Use the existing Fix run and Repair loop rather than building an agent repair mechanism into the shell script. Keep attempts bounded: at most one automatic targeted Fix run per release invocation; if the result is still blocked, exit with the PR URL, cause and recovery command. Normal queued/running CI and healthy PRs start no Fix run. Missing workflows without an actionable conflict receive a bounded startup grace period, then an actionable error rather than an infinite silent wait.

    A Fix run leaves the PR ready for review: explicitly override User config with --no-merge and --no-base-fix, and target this PR by URL. The release command remains responsible for tagging, publication and merging in that order. After a Fix run or external head change, fetch and validate the current PR identity and head before adopting it, refresh the summary/version diff when the release content changes, and wait for checks on the adopted head. A repaired branch must still satisfy the existing exact version-bump tree validation relative to main; extra source changes require a clear refusal for human review, with no tag pushed. Preserve existing requested Experiment coverage when a repair changes its content base.

    Key interfaces:

    • Release PR observation and wait_for_pr_checks / wait_for_workflow_runs: distinguish an actual pending workflow from missing workflows, conflicts, completed failures and a superseded head.
    • Targeted thirdshift fix <PR URL> --no-merge --no-base-fix: reuse existing Harness/config resolution and bounded Repair behavior; use the repository's normal source invocation convention where appropriate.
    • Release resume validation and publication: revalidate origin, branch, base, state, current head and bump tree before tagging; keep published releases immutable and preserve failed-publication recovery.

    Acceptance criteria:

    • A conflicted bump PR with zero workflows starts one targeted Fix run instead of waiting forever. Successful conflict resolution retaining the requested package version is adopted, validated, checked and released.
    • Completed failing CI can trigger the same bounded Fix path. Queued/running CI, a healthy PR and a healthy resumed PR do not trigger it.
    • The invoked command targets only the release PR and explicitly disables Self-merge and Base fix even when both are enabled in User config.
    • Missing workflows without a conflict stop after a documented, testable grace period, naming the PR/head and a recovery action. Do not replace this with an arbitrary short total CI runtime limit.
    • A PR head changed by the Fix run or an external actor is freshly validated and observed; the command never tags an obsolete captured head. Continued head churn, repeated conflicts or repeated failures cannot create unlimited Fix invocations.
    • A failed/interrupted Fix run or a still-blocked repaired PR ends with a useful recovery message and pushes no new tag. Ctrl-C and rerunning the same version continue through existing resume behavior.
    • Unexpected PR identity/state/branch changes, a wrong package version, or extra non-bump changes cause refusal before publication. Test that these remain enforced after a Fix run and an external head update.
    • Changes to the release content base refresh release summary/version diff and preserve --with-experiment semantics; no content is published under Experiment results for an obsolete base.
    • Existing publication-before-merge ordering, version-bump validation, tagged-release recovery and published-release immutability remain enforced.
    • Regression coverage exercises the real release orchestration with fake GitHub/Fix commands and bounded child lifetimes, including conflict plus no runs, repaired head success, external head change, missing-run expiry, Fix failure, no Fix on healthy/pending CI, and mutation refusal. Normal tests launch no real agent sessions or releases.
    • Update the release command's documented behavior and run the repository's affected-test validation.

    Prior art and scope:
    The targeted Fix run already implements repair of an existing PR. The release workflow's missing-run and stale-head recovery are not implemented. Prior #1451 addressed a different main-movement refusal and was superseded by #1588/#1674; retain their Candidate and publication-order decisions. #1820 covers release ancestry, which must remain enforced. No relevant prior-rejection knowledge base was found.

    Out of scope:
    Unscoped Fix Passes, Base branch CI repair, changes to general Fix/Delivery merge policy, broad source repairs silently included in a bump-only release, bypassing trust checks, moving published tags, manually publishing 0.29.0 as part of implementing this ticket, and unrelated host-resource admission changes.

  2. added
    ready-for-agentFully specified, ready for an AFK agent
    in-progressA Claim: thirdshift has taken this issue
    and removed
    needs-triageMaintainer needs to evaluate this issue
    ready-for-agentFully specified, ready for an AFK agent
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingin-progressA Claim: thirdshift has taken this issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions