Repository navigation
🐛 Repair queues: do not push onto busy non-App PR branches - #18502
Conversation
The scanner reached owner-session PRs as unattributed FIX-BEFORE-NEW rows (they default to scanner) and pushed its own commits onto branches another worker was still pushing to, turning 'Sign-off survives the squash' red (#18419), racing the worker's next push and duplicating its fix. A red or conflicted PR the hive App did not open is now listed as 'suggest, do not push' in FIX-BEFORE-NEW, the CI_FAILING push queue and PR_LIST while its branch is busy: a live claim by another worker on the PR or a linked issue (worker-claim ledger), or a head pushed within HIVE_SCANNER_BUSY_BRANCH_MINUTES (default 60, from the head's earliest CI activity, no new GitHub calls). App-authored lane branches, in-place adoptions and idle branches are listed exactly as before. Fixes #18488 Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Evidence bundle `#18502543ed79` sha256:4efd1cb7a8036b5065303aa84aaa59d6072f2cf1007072db905403c04c93026a — download from the dashboard or `hivectl review evidence #18502`. |
Mutation testinggremlins found 17 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
9 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
ℹ️ 2 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first
Verdict: |
Fixes #18488
Where the push decision lived
The scanner is an LLM agent. It does not decide on its own where to push: the kick tells it. Two Go-rendered kick sections are its push instructions:
pkg/scheduler/policy_overlays.go,formatRedPRFixDataWithSignals). A ci-failing.json row with no audit attribution defaults toscannerand is rendered as "These PRs are YOURS ... gh pr checkout → commit -s → git push". That includes same-repo PRs the hive App never opened, such as the owner's own session PRs. This is how the scanner pushed onto ⚠️ Retire the inception API, watcher and brainstorm inception mode #18419.pkg/scheduler/lane_messages.go,buildCIFailingListFor). This is the shared push queue. It already splits off fork PRs as comment-only.The fork split (#7386) is the existing "comment only, cannot push" decision point, and this PR extends it. The scanner's "I'm not pushing because this branch is not hive-authored" note is the LLM following policy text. That text does not cover these rows, because the kick lists them as the scanner's own.
Change
A red or conflicted PR that the hive App did not open is now busy when either of these holds:
HIVE_SCANNER_BUSY_BRANCH_MINUTESago (default60). The push time comes from the earliest CI activity already observed on that head (PRCIActivity), so no GitHub calls are added.A busy row is moved out of the push lists:
BUSY BRANCHESsection.[busy: … do not push; post the fix as one suggestion comment]marker.In all three places the instruction is the same: post the fix as one suggestion comment per PR, editing an existing note instead of adding another, so the worker applies it as its own signed commit.
ci-failing.json rows gain three additive fields:
app_authored,head_pushed_atandissues.Unchanged
main_sweeps.go), sign-off identity: untouched.Tests
pkg/scheduler/busy_branch_test.go:cmd/hive/busy_branch_claims_test.go: the claims-ledger adapter, run against a real ledger.🤖 Generated with Claude Code