Skip to content

Spec: Fix run - #1804

Merged
JacobStephens2 merged 25 commits into
mainfrom
issue-1784
Nov 6, 2026
Merged

JacobStephens2 merged 25 commits into
mainfrom
issue-1784

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

thirdshift fix [<PR URL or number>]
  targeted PR → reserve → Worktree → Delivery and Repair loop
  unattended Pass → Command-limit admission → Base CI → eligible PR
    first failed Base push → re-run failed jobs and skip
    persistent Base failure → repair PR → Delivery
  ready for review or configured Self-merge; salvage failures as drafts
  Inbox hands off earlier rows; ready red/conflicting rows copy a Fix command

Targeted runs accept ready or draft PRs by Trusted accounts, including PRs without linked issues. Repairs receive refreshed trusted PR and closing-issue context. Passes respect Command limits, current-head checks and origin reservations; merge, Base fix and email flags/configuration apply. Fix runs use the built-in fix-run Process and record logs, status and Run notifications.

Closes #1784

Test seams

  • Public Fix and Ticket CLI over real Git repositories and fake GitHub, Harness and email services: Base CI admission, failed-work publication, repeat-Pass prevention and review evidence across Commands.
  • Console HTTP and browser clipboard behavior over retained Command records and GitHub facts, at desktop and mobile widths.

Evidence

Execution evidence

  • Before: cargo test --test review_1784_spec failed_opening_base_repair_is_not_repeated_by_the_next_pass -- --exact --nocapture reproduced two sessions instead of one after the opening repair failed; no draft or Fix Recovery URL existed.
    After: the same test passes (1 passed; 0 failed), also verifying the preserved file, draft PR and Recovery URL.

  • Before: cargo test --test review_1784_spec pending_base_checks_hold_an_unscoped_pass_before_pr_selection -- --exact --nocapture failed with unscoped Pass selected PR work before Base CI became green.
    After: the same test passes (1 passed; 0 failed); pending external Base checks skip before PR selection.

  • Before: cargo test --test review_1784_spec fix_can_self_merge_a_factory_authored_pr_after_repair_without_review_markers -- --exact --nocapture failed with has no recorded agent review, exit 1 instead of 0, after a real Ticket run had authored the PR.
    After: the same test passes (1 passed; 0 failed); completed factory Delivery records its exact authored head. Adopted unreviewed heads remain held, including after a no-merge Fix run.

  • Before: cargo test --test review_1784_spec completed_base_delivery_does_not_skip_the_first_review_pass -- --exact --nocapture failed with no waiting pull request, one session instead of two.
    After: the same test passes (1 passed; 0 failed); authorship evidence enables Fix Self-merge while Review Passes still require their own review evidence.

  • THIRDSHIFT_BINARY=$(cat /tmp/thirdshift-1784-validation-binary) CARGO_BUILD_JOBS=3 RUST_TEST_THREADS=3 /usr/bin/time -p scripts/affected-tests main: passed. Site: 62 tests, 67.69s; Console: 138 tests, 100.68s; full Rust fallback cargo test: 2,434.79s, including compilation. Whole command: 2,624.05s. Rust unit result: 1,642 passed, 3 intentional skips; all integration targets passed, including all four new regressions.

  • cargo fmt --check and CARGO_BUILD_JOBS=3 cargo clippy --all-targets -- -D warnings: passed.

  • UPDATE_PROMPTS=1 cargo test --bin thirdshift prompts_page, then cargo test --bin thirdshift prompts_page: 14 passed each; regeneration changed no generated prompts. The four exact reproducer commands above also passed again after the full suite.

  • The first affected-tests attempt passed site checks but lost Console fixture servers during an overlapping binary rebuild. The completed rerun used a stable binary copy through the documented THIRDSHIFT_BINARY override; no test assertions were weakened.

Visual evidence

Paired Console captures retained from Ticket #1797's implementation; this review preserves that rendered behavior. Desktop 1440×900 and mobile 390×844, matching state and viewport in each pair.

Inbox, 1440×900

Before
After

Command details, 1440×900

Before
After

Inbox, 390×844

Before
After

Command details, 390×844

Before
After

Unaddressed findings

Standards

  • S1 — possible Primitive Obsession: repository-only CI work uses IssueUrl.number = 0 (src/fix/base_ci.rs:29–36). Retained compatibility choice: the existing Delivery, PullRequest and CI transports accept an issue-shaped repository address. RepairContext::BaseBranch in src/delivery.rs bypasses issue hand-over, and completion closes only real issues selected by close_base_ci_issues, never this anchor. The public delivery_repairs_checks_also_red_on_base_and_self_merges_with_issue_cleanup regression passes. Changing those transport contracts is unnecessary for this Spec; this is a design judgement, with no behavior defect or unresolved Spec/Day shift decision. S2's duplicate race test and S3's misleading method name were addressed.

Spec

None. All four behavioral findings were reproduced, fixed and retained as regression tests.

Security

None.

Security review outcome

No unaddressed introduced findings.

Review coverage

Standards raised 3 heuristic findings (2 addressed, 1 retained with the rationale above); Spec raised 4 behavioral findings (all addressed, including the follow-up). Both axes inspected all 68 original changed paths, plus supporting files. Spec inspected all 68 final changed paths. Standards did not reread the final hunks in src/delivery.rs, src/fix.rs, src/github/review.rs and tests/review_1784_spec.rs after its single follow-up: the authored_head narrowing and fourth regression. Spec inspected those final changes. No entirely unread files remain. Generated-output exclusions: none; generated prompts and HTML were inspected directly.

Reports with each axis's combined files-read list and {"standards":3,"spec":4} are retained beside the Session trace in .thirdshift-review-Ysh6R5/.

Merge Danger

Door: two-way

Blast Radius: repository

Scheduled Fix Passes can repair and, when configured, merge pull requests. Reservations and shared Delivery gates control publication.

Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh

Tickets

Ticket runs already refuse the next session after that edit. A Fix run copied the same title and body into a Repair that can push, and started the session anyway.
Add targeted Fix runs for existing pull requests
Run unattended Fix Passes on eligible pull requests
Keep unattended Fix Pass selection alongside the pre-acquisition trust cutoff, and retain both Fix Pass and Inbox hand-off architecture documentation. Regenerate the user manual from the merged guide.
Add Inbox pull-request hand-off and Console Copy fix command
Preserve Base branch CI repair documentation alongside Inbox pull-request hand-off and Copy fix command. Regenerate the user manual from the merged source.

Validation: scripts/affected-tests origin/issue-1784 passed (site, Console, full Rust suite). Rust suite: 2360.94s including compilation. cargo clippy --all-targets -- -D warnings and cargo fmt --check passed.
Monitor and repair Base branch CI in unscoped Fix Passes
The repair description already breaks closing references in check names.
The title still used the raw names, and GitHub copies that title into the
merge commit.
@JacobStephens2
JacobStephens2 marked this pull request as ready for review November 6, 2026 04:04
Retain Fix command inspection data alongside Security scope protection.
@JacobStephens2
JacobStephens2 merged commit ad061e2 into main Nov 6, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1784 branch November 6, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec: Fix run

1 participant