Skip to content

A stacked run keeps its base and counts what that base already did - #508

Merged
nambok merged 1 commit into
mainfrom
stacked-run-keeps-its-base
Nov 7, 2026
Merged

nambok merged 1 commit into
mainfrom
stacked-run-keeps-its-base

Conversation

@nambok

@nambok nambok commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A run stacked on an earlier part's open pull request was stopped with "it continued N times without finishing another task", though its work was done. Every step reset the run's base to the default branch, so its branch (already built on the other pull request) read as copying that pull request's commits, and it was rebuilt and force-pushed in every step. The plan check then measured against the other branch: the planned files that branch already changes into their planned form dropped out of the diff, the check read fewer tasks done than the step before, the coder found nothing left to write, and the run guard stopped the run.

No work was lost: the coder confirmed the files were already in their planned form on the branch the pull request builds on.

Changes

  • stack::kept and stack::keeps_base: a later step of the same run keeps the base an earlier step stacked it on while that base is still an open pull request's branch. No rebuild or force push each step, and one base for every check. The run stacks on it when the ticket names nothing else.
  • plan_coverage::plan_changes / stacked_coverage: on a stacked base, a planned file that the stacked-on branch already changes (against the default branch) counts as done there. The plan check note marks it "changed by the branch this one is stacked on". Used by the implement rounds, the generator re-check, the optional-task findings and the covering check.
  • run_guard: the guard keeps the last count beside the best one. A fall is reported on the run page and in the logs, and work done again after a fall counts as progress, at most MAX_TASK_DROPS (2) times, so a count that keeps falling and rising still ends. Records saved before this change read as before.
  • Incident case u_stacked_plan_check replays the recorded counts and pins the pipeline; row added to docs/incidents.md.

Verification

  • cargo test -p worker: 1380 passed, 0 failed (the 7 new incident tests included).
  • cargo clippy -p worker --all-targets -- -D warnings and cargo fmt --check are clean.
  • Checked against the incident's logs and saved conversation: the step after the base flip saw every planned file already done and wrote nothing, and the "Plan check" lines fell at the step that rebuilt onto the other branch.

A run stacked on another open pull request's branch reset its base to the
default branch at the start of every step. Its branch, already built on the
other pull request, then read as copying that pull request's commits, so it
was rebuilt and force-pushed in every step, and the plan check measured it
against a base that changed between steps. Planned files the other branch
already changed into their planned form dropped out of the diff: the check
read them as not done, the coder found nothing to write, and the run guard
stopped the run after seven continuations.

- A later step of the same run keeps the base an earlier step stacked it on
  while that base is still an open pull request's branch (stack::kept).
- The plan check counts a planned file the stacked-on branch already changes
  as done there, and its note says so (plan_coverage::plan_changes).
- The run guard reports a fall in the done count on the run page, and a
  recovery from it counts as progress at most twice, so loops still end.
- Incident case u_stacked_plan_check replays the counts and pins the pipeline.
@nambok
nambok force-pushed the stacked-run-keeps-its-base branch from 296d370 to 5526002 Compare November 7, 2026 18:07
@nambok
nambok merged commit 9fefa65 into main Nov 7, 2026
10 checks passed
@nambok
nambok deleted the stacked-run-keeps-its-base branch November 7, 2026 18:13
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.

1 participant