Skip to content

Let a Fix Pass Self-merge its Base branch repair without Self-merging the pull requests it fixes #2029

Closed

Description

@JacobStephens2

What I want

An unattended Fix Pass (thirdshift fix base master) does two kinds of work:

  1. Base branch repair: when the Base branch's CI is red, it opens a fix-<base>-<sha> pull request to repair it.
  2. Pull request fixes: otherwise it takes the lowest-numbered eligible pull request with a Merge conflict or CI red.

I want one crontab line that Self-merges (1), so a red master is repaired without waiting for a person, but leaves (2) ready for review, because those pull requests carry other people's feature work that a person should approve.

What happens today

merge / no-merge and merge.always apply to the whole Fix Pass. Both kinds of work follow the same setting, so I have to pick one:

  • With merge, the Pass also Self-merges feature pull requests after resolving conflicts in them.
  • Without it, every Base branch repair waits for a person, and while master stays red no Fix Pass gets to any pull request.

--author scoping skips the Base branch CI step entirely, so splitting the work into two crontab lines doesn't work either.

Evidence

On dev, the tourbot Fix line */10 * * * * cd ~/repos/tourbot && sleep 30 && thirdshift fix base master [merge]:

The line has fallen back to no merge for now.

Open questions

  • Is this a new Pass word, such as merge-base-fix, a User config key, or a way to run only the Base branch CI step from a Fix Pass?
  • Should a Ticket run's Base fix (base-fix) share the same setting?

Activity

  1. added
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 11, 2026
  2. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Investigation summary

    Confirmed against selected Base branch main at 2dc95dd: a Fix Pass has no separate merge permission for its Base branch CI repair.

    • src/fix/base_ci.rs:69 resolves Asks::of_run from the command flags and User config, then passes asks.goal to Delivery. Selected PRs inherit those same flags in src/fix.rs:74 and resolve the same merge policy at src/fix.rs:155. src/asks.rs:86 derives that goal from merge/no-merge and merge.always.
    • src/fix.rs:53 skips Base branch CI maintenance when --author is supplied. Existing tests confirm this.
    • Qualification: red Base branch CI does not indefinitely prevent PR selection. An existing repair branch or PR skips maintenance and allows candidate selection to continue (src/fix/base_ci.rs:55; tests/fix_base_ci.rs:283). PR Delivery can still encounter Inherited failures.
    • Qualification: merge permission alone does not merge every feature PR. src/fix.rs:176 requires recorded agent authorship or review of the adopted head. Factory-authored or reviewed feature PRs can satisfy that gate, so it does not provide the requested separation.
    • A Ticket run's Base fix is a distinct workflow: src/asks.rs:129 always gives child runs a merged goal. ADR 0008 requires this because the parent waits for the fix to land. Sharing a setting that permits ready-for-review Base fixes would require revisiting that decision.

    Recommended next steps

    Keep #2029 open for the Day shift to settle the interface, precedence and retry scope in the questionnaire. Recommend a separate opt-in merge override limited to Fix Pass Base branch CI repairs, preserving existing behavior when omitted. Keep existing Delivery and Self-merge gates intact.

    After those decisions, cover repair-merged versus feature-PR-ready outcomes, including feature heads with valid review evidence, merge.always precedence, author scoping and existing-repair handling. Update the command documentation, docs/guide.md and generated manual, and relevant hand-written site pages.

    Related #966 covers broader per-command User config defaults; its proposed settings do not distinguish these two paths within a Fix Pass, so it is not a duplicate.

    Questionnaire

    For the Day shift deciding #2029: the repository confirms that newly authored Base branch CI repairs and selected PRs share one merge policy today. The remaining questions concern the intended public behavior.

    1. Which interface should implement this distinction: a new Fix-Pass-only command word, a User config key, or a Base-CI-only mode for separate cron lines? Recommend a command word for Let a Fix Pass Self-merge its Base branch repair without Self-merging the pull requests it fixes #2029, with broader configuration handled separately. Please choose its name.
    2. What precedence should apply? Recommend that omission preserves today's behavior, while the new explicit override controls only the Base branch CI repair. Ordinary PRs would still follow merge/no-merge and merge.always. Should explicit no-merge combined with the new repair-only permission therefore merge the repair but leave selected PRs ready for review, including when merge.always=true?
    3. Should this permission cover only repairs newly authored by the maintenance step, or also existing repair PRs later selected or explicitly retried? Recommend limiting the first change to newly authored repairs and keeping targeted retries explicit. This determines retry acceptance criteria; a repair-looking branch name alone should not grant merge permission.
    4. Approve this scope split: Let a Fix Pass Self-merge its Base branch repair without Self-merging the pull requests it fixes #2029 handles Fix Pass repair-versus-PR merge policy; Self-merge settings for each kind of command in the User config #966 retains broader per-command defaults; any Base-CI-only workflow or change to Ticket-run Base fix semantics becomes separate work. Recommend leaving Ticket-run Base fixes always merging, as ADR 0008 requires.
  3. added
    enhancement
    ready-for-human
    and removed
    in-progress
    on Nov 11, 2026
  4. JacobStephens2 commented on Nov 11, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Additional fleet evidence from the 2026-11-11 retrospective:

    On thirdshift.app, ~/.thirdshift/config.toml sets [merge] always = true (intended for Pickup runs) while cron runs thirdshift fix base main without merge. Because merge.always currently applies equally to Fix Passes' pull request fixes, #1935, #1990, and #2010 were promoted to Self-merge and failed into Needs you on unreviewed adopted heads (#2020).

    When shaping the setting here, account for how it interacts with merge.always = true so hosts that enable merge.always for Ticket/Spec Runs and Base branch repairs can still leave Fix Pass pull-request repairs ready for review.

  5. JacobStephens2 commented on Nov 18, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Decisions (Day shift, 2026-11-18)

    The questionnaire is settled, all as recommended:

    1. Interface: a new Fix-Pass-only command word, merge-base-fix. Example: thirdshift fix base master merge-base-fix. No User config key in this change.
    2. Precedence: omitting the word keeps today's behavior. With it, only the Base branch CI repair Self-merges; selected pull requests still follow merge / no-merge and merge.always. So no-merge merge-base-fix merges the repair and leaves selected PRs ready for review, including when merge.always = true.
    3. Scope: the permission covers only repairs newly authored by the Fix Pass's Base branch CI step. An existing repair PR selected later, or retried, needs an explicit merge; a fix-<base>-<sha> branch name alone grants nothing. The Self-merge gates (Delivery, recorded agent authorship or review of the head) stay in force.
    4. Split: Let a Fix Pass Self-merge its Base branch repair without Self-merging the pull requests it fixes #2029 covers only the Fix Pass repair-versus-PR merge policy. Broader per-command defaults stay in Self-merge settings for each kind of command in the User config #966. A Ticket run's own Base fix keeps always merging, as ADR 0008 requires; any Base-CI-only workflow is separate work.

    Acceptance criteria:

    • thirdshift fix base master merge-base-fix Self-merges a newly opened Base branch CI repair PR once it is green.
    • The same Pass leaves a selected feature PR ready for review, with and without merge.always = true.
    • no-merge merge-base-fix merges the repair and leaves selected PRs ready for review.
    • Without the word, behavior is unchanged.
    • An existing fix-<base>-<sha> PR selected or retried later is not Self-merged by merge-base-fix alone.
    • merge-base-fix on a command other than fix is an argument error.
    • Command docs, docs/guide.md, the generated manual and relevant hand-written site pages updated in the same pull request.

    Motivating case: Educational-Travel-Adventures/tourbot PR #2805 (2026-11-18), a Base branch repair from dev's Fix Pass that had to wait for a person to merge it while master stayed red.

    Moved to ready-for-agent.

  6. added
    ready-for-agent
    in-progress
    and removed
    ready-for-human
    ready-for-agent
    on Nov 18, 2026
  7. removed
    in-progress
    on Nov 18, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions