fix(ci): hold automatic batches while main's tip is a release cut #2470
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2470"
general
weight: 0.35
endaye
Summary
Item 9 of the "Next" plan in #2422 (candidate priority in the batch controller; #2404 "related"). A release allocation cut bumps
products/lmdj/version.jsonand freezes the Portal snapshot underapps/architecture-portal/versioned_metadata/in one squash; the squash witness adds only a record underapps/architecture-portal/versioned_provenance/. Both land as main pushes, andproducts/lmdj/is a full-rule path, so the cut alone admitted a full automatic batch and the release's own candidate batch queued behind it (candidate 120 waited about 40 minutes during 2.0.122.0).Mechanism chosen with the Owner on 2026-10-22: the automatic batch yields while main's tip is a cut or witness commit with no finished candidate for it. No remote mutation, no cancellation, no new queue kind.
Change
scripts/ci/batch_controller.py:-
classify_release_commit(changes)andGitInputs.release_commit(sha): one verified main commit isallocation(changes the version file and a snapshot path together),witness(every change adds aversioned_provenance/version--squash-witness.jsonrecord; an edited record or any other provenance file is neither) orNone, from itsgit diff-tree --no-renames --name-status -zlisting, read NUL-separated and refused on an unexpected shape or status.-
Controller._release_hold(latest): on the automatic branch ofreconcileonly, after the explicit fair queue and never for bootstrap, returnswaitingwith the reasonmain tip is a release <kind> commit; automatic admission yields to the candidate batch for it (dispatch the candidate, or push to main to resume)while the tip is such a commit and no candidate request for that exact target has a durable result. A queued candidate is admitted ahead of it, a finished candidate lifts it, any newer main push ends it. The hold appends no observation and moves no cursor, so the retained automatic cursor still covers the interval as an automatic batch afterwards; explicit node work is never held.tests/build/ci_batch_controller_test.py: the fake inputs gainrelease_commit;test_automatic_admission_yields_while_main_tip_is_a_release_cut(cut tip → waiting with the reason, no admission; a candidate result for that tip → the interval is then admitted as an automatic batch),test_a_newer_main_push_ends_the_release_hold,test_release_hold_never_touches_bootstrap_or_explicit_work, and the real-Gittest_real_git_classifies_allocation_and_witness_commits(allocation, witness, a witness correction, an unrelated provenance file, a record whose name contains a tab, a version bump without a snapshot, the base commit, an empty listing).docs/plans/2026-09-08-lmdj-ci-batch-controller.md: new section "Release cut yields to the candidate batch" and the verification list names the new journeys..agents/skills/lmdj-release/SKILL.md: one sentence after the allocated-identity rule telling the operator that the controller holds automatic admission at the cut/witness tip and that the candidate (whose target is the witness merge, never the cut SHA) must be dispatched promptly because any ordinary merge ends the hold.Related Issue
Related issue: #2422
Premise refresh (issue-done §0)
Base:
origin/mainat84136533c.Controller.reconcileadmitted an automatic batch for any new tip after the explicit queue, with no notion of a release commit;GitInputshad no per-commit path classification; no test covered a cut at the tip. Still outstanding; delivered here. No release request is active (every journal request is retired; no driver process), so the goal's "no release-tool merges during a release" rule is satisfied.Verification
AttributeError/wrong action); after the change they pass._release_holdreturnNonefailstest_automatic_admission_yields_while_main_tip_is_a_release_cutandtest_a_newer_main_push_ends_the_release_hold(the bootstrap/explicit negative test passes, as it should); restored: 58/58 OK. Making the witness rule ignore the change status and the record name fails the real-Git test on the correction commit ('witness' is not None); restored: OK. A first draft split the listing withsplit("\n"), so the trailing empty line made every witness commit "neither"; the real-Git test caught it and the fix issplitlines().Commands run on the committed head:
Complete
tests/build/release__test.pyrun (all 80 modules, one at a time, started on94e9d18): 80 PASS, 0 FAIL. The three later commits touchedscripts/ci/batch_controller.py, its test, the controller plan and one sentence of the lmdj-release skill; no release test reads the first three, andrelease_skill_testwas rerun ond3a671e(OK).PR Review
Head SHA:
d3a671e1fa4cefb5e88503019df2c7f05d5a863b. Three review rounds:94e9d18(three findings: any durable result lifts the hold — answered, the hold orders dispatch and is not evidence; a cut-SHA candidate — answered, the candidate targets the witness merge; provenance-only commits classified as witnesses — fixed inb547185),b547185(rename entries — hardened with--no-renamesin639c831; enqueued-but-undispatched candidate — answered, the explicit queue runs before the hold),639c831(exact-tip keying — answered and the skill now names the target; tab-split parsing — fixed with-zand fail-closed shape checks ind3a671e). The review ofd3a671eis eligible with no findings; all threads are resolved. Current-head review evidence is checked withscripts/ci/review_wait.pybefore merge.CI Scope
Expected mode: full
Expected selected lanes: ci_contract core_asan core_coverage core_macos core_ubuntu creator deploy_contract docs_static package portal web_runtime_host web_runtime_lab web_toolchain
Expected skipped lanes:
ci:fullrequired: noReason:
scripts/ci/batch_controller.pyis a central CI control-plane path (full rule); the rest is one plan document, one.agentsskill and the controller's own test.Batch-only Lanes
core_asan core_coverage core_macos core_ubuntu creator deploy_contract package web_runtime_host web_runtime_lab web_toolchain: not run locally; verified by the next incremental main batch. The change touches the controller's admission decision only; no product code or lane command changes. The
deploy_contractlane's release suite is run locally one module at a time (see Verification).Version Management
Version impact: none
Reason: CI control plane and documentation only; no product, module or contract version changes.
Documentation Impact
Documentation impact: none
Affected portal pages:
Reason: a plan document under
docs/plans/and a.agentsskill; no page underapps/docs-site/docs/changes.Pitfall Impact
Pitfall impact: none — reason: the defect is a controller admission rule now fixed in code with a gate (
gate:tests/build/ci_batch_controller_test.py); the operator consequence (dispatch the candidate promptly) is recorded in the lmdj-release skill, and the retrospective root cause is #2422 / #2404.Merge Danger
Door: two-way
Blast Radius: automatic batch admission at a release cut or witness tip; explicit, bootstrap and ordinary pushes are unchanged.
Release Impact
Release impact: none
Candidate tag: none
Profile: none
Channel: none
Intent disposition: none
Release assets: none
Release gates: none
Reason: no release is active; tags, Releases and the ledger are untouched.
Transition authority
Authorized transitions: push | PR | merge (standing Task authorization in
CLAUDE.md; cleanup not requested)No tag, Release, deploy, publication, or Channel promotion is implied.
🤖 Generated with Claude Code