feat(ci): add the lane-scoped candidate retry request #2471
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 #2471"
general
weight: 0.35
endaye
Summary
Item 8 of the "Next" plan in #2422 (bounded, audited re-run of an environmentally failed lane; #2404 item 2), PR 1 of 2. Decision recorded with the Owner on 2026-10-22 (option A: lane-scoped retry with composed evidence) in
docs/prd/decisions/2026-10-22-candidate-lane-retry.md; plan indocs/plans/2026-10-22-lmdj-candidate-lane-retry.md.Today one lane the platform stopped (a timed-out or cancelled job, a lost runner, a missing artifact) costs a whole new cut and a 4–5 hour batch: every layer accepts attempt 1 only, a candidate is one full-selection request, and
complete-test-v2admits one candidate result per target. This PR adds the request kind that re-runs only the environmentally failed lanes; the release side that composes its result with the original (reference schema v2, consumer, recheck, governance docs and skill) is PR 2 and lands separately. Release behaviour is unchanged by this PR:tools/release/verification.pyselects candidate-kind results only, so a retry result is inadmissible until PR 2.Change
scripts/ci/incremental_batch.py: kindretry(explicit, fair queue).make_requesttakesretry_of = {"request": <candidate id>, "environmental": {suite: {"outcome", "jobs"}}}, required exactly for kindretry;_retry_ofcloses the proof shape (ENVIRONMENTAL_CONCLUSIONS = {timed_out, cancelled}; afailureconclusion is a test failure and never qualifies; afailedsuite needs its failing jobs' conclusions, a debt outcome carries none). A retry selection is not closed over dependencies: it re-runs lanes, it is not a change. The reducer'senqueuecross-checks journal truth (_retry_admissible): the original is a candidate for the same target and policy with a durable result; the retried suites are exactly the ones that result did not pass; each proof outcome matches the result; one retry per candidate.advancealready moves no cursor and records no debt for explicit kinds.scripts/ci/batch_verdict.py:retryis a known identity kind; the full-selection rule stays for bootstrap/node/candidate.scripts/ci/batch_runtime.py: the explicit command{"id","kind":"retry","target","retry_of"}; a command whose ID the journal already holds reuses that frozen request (same kind, target andretry_of) before any API read; otherwiseretry_requestreplays the journal, reads the original result's verdict and the original executor's jobs from the API, refuses a failing job whose conclusion is not environmental, and freezes the proof. Policy drift at settlement applies to retries as to candidates.timed_out_jobfixture option: needsfailure, APItimed_out)..agents/pitfalls/manual-batch-dispatch-short-request-format.md: the retry short form beside the candidate one (second commit).Not touched on purpose:
.github/workflows/self-test-report.ymlpassesbatch_requestthrough unchanged and is an execution source whose digest must stay compatible for queued requests; the operator command is documented in the skill by PR 2.Related Issue
Related issue: #2422
Premise refresh (issue-done §0)
Base:
origin/mainate9d1047a835371e2fef85682bf04aa602aa74c03(#2470). Verified on the base: attempt-1 rules inincremental_batch.identity,batch_verdict._identity,batch_runtime.Runtime,batch_reference,verification.py,batch_evidence.py,verified_recheck.py; full selection for candidates inmake_request,batch_verdict.build,parse_reference,batch_evidence._verify; one candidate result per target inverification._candidate_results; the verdict's_debtoutcomes versus the APItimed_outreconciliation inbatch_evidence_validation.validate_job_observations;ci.ymllane gating by the execution manifest. No open issue or branch delivers a lane re-run. Still outstanding; PR 1 delivered here. No release request is active (every journal request is retired; no driver process).Verification
unknown request kind,TypeError: retry_of,invalid explicit execution command); after the change they pass.- reducer skips
_retry_admissible: four reducer tests fail (durable result, exact suites, proof-vs-result, once per candidate); restored: OK.- request shape accepts any job conclusion (
_retry_of): the reducer proof test fails; the runtime refusal test still passes through the runtime's own API gate; dropping both gates failstest_retry_refuses_a_lane_that_failed_on_a_test; restored: OK.- verdict rejects kind
retry: the verdict test errors; restored: OK.- redelivery derives the proof before the journal lookup again: the runtime journey (jobs aged out before redelivery) errors; restored: OK.
- the failing-job completeness check is dropped:
test_environmental_proof_requires_the_complete_failing_job_setfails; restored: OK.Commands run on the committed head:
Complete
tests/build/release_*_test.pyrun (all 80 modules, one at a time, started on3836876in a detached worktree): 80 PASS, 0 FAIL. The two later commits changed a pitfall entry, the plan, the runtime test andRuntime.reconcile's explicit branch; the release tests that importscripts/ci/batch_runtime(release_verification_carrier_test,release_entry_enrollment_test,release_model_test, plusrelease_batch_evidence_testandrelease_verified_recheck_test) were rerun ond3f296b: all OK;release_verification_carrier_testrerun on5cc1abb(the only later change to a module they import isbatch_runtime.environmental_proof): OK.PR Review
Head SHA:
5cc1abbb600f0ce360cc0928870852362f969166. Review of0b42c77raised two findings: a redelivered retry command re-derived its proof from the API before the journal lookup (fixed ind3f296b: the frozen request is reused first, the journey ages the jobs out before redelivering, mutation proven); the reducer does not compare a failed suite's job map with the verdict's failing jobs (answered: the reducer is pure and reference-opaque; the exact-jobs check belongs to the release consumer and is now recorded in the plan's PR 2 section). Both threads resolved. Review ofd3f296braised three: the proof could under-report failing jobs (fixed in5cc1abb: pureenvironmental_proofrequires the complete failing job set, unit-tested and mutation proven); the retry freezes the redelivering run's control (answered: same rule as a queued candidate, policy pinned equal, each run verified against its own control in PR 2); the reducer does not compare job sets (answered, plan wording narrowed to name the owning layer of each check). All threads 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/incremental_batch.py,batch_verdict.pyandbatch_runtime.pyare central CI control-plane paths (full rule); the rest is their tests, one plan and one decision file.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 adds a request kind to the scheduler and its runtime; 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: scheduler control plane only; no Product, Module, Contract or Provider version changes and no Build allocation.
Documentation Impact
Documentation impact: none
Affected portal pages:
Reason: a plan under
docs/plans/and a decision underdocs/prd/decisions/; no page underapps/docs-site/docs/describes the scheduler's request kinds.Pitfall Impact
Pitfall impact: update manual-batch-dispatch-short-request-format — the open entry named the candidate short form as the only manual dispatch; it now shows the retry short form (
{"id","kind":"retry","target","retry_of"}) and that the controller derives the lanes and the proof. No recurrence is recorded (nothing was observed in production);exitstaysnonebecause the manual format is still exercised only by real controller runs. The missing capability itself is delivered with gates (gate:tests/build/ci_incremental_batch_test.py,gate:tests/build/ci_batch_runtime_test.py).Merge Danger
Door: two-way
Blast Radius: a new explicit request kind the operator must dispatch deliberately; automatic batches, candidates and release verification behave as before.
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; retry results are not yet admissible evidence.
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