fix(rri): restore main()'s build_shas — #723 regression that crashed every RRI rollup - #728
Conversation
…every RRI rollup #723 factored the inline build-SHA gate logic into build_sha_evidence_gaps(), which moved the 'build_shas = sorted(...)' definition into the helper's scope but left main()'s output reference ('run_build_shas': build_shas, line ~851) dangling -> NameError: name 'build_shas' is not defined. This crashed the FINAL RRI rollup of EVERY release_readiness.py run (the VM 5-persona sweep @fa97b34 produced all persona/duo/ui_audit scores, then died on the rollup). Restore the all-persona distinct-SHA set in main()'s scope (the diagnostic output field; the native_gate CONTRACT stays release-persona-scoped via the helper — #723's intent intact). WHY IT SHIPPED: qa/test_release_readiness.py ALREADY has 4 tests that exercise this path (test_mixed_build_sha / test_missing_run_build_sha / test_handoff_json_must_prove_app_status_build_sha / test_short_build_sha_prefix) and they FAIL at fa97b34 — but #723's CI did not gate on them. The code fix makes all 30 pass; a separate follow-up will close the CI gap so this class of regression is caught pre-merge. Tests: qa/test_release_readiness.py 30/30 + test_release_readiness_scope.py + release_gate_static 16/16.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes a variable scope bug in the release readiness script where ChangesRelease readiness tooling fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
…mparable RC-grade verdict The first 11-gate RRI produced by the FIXED rollup (this PR's build_shas fix). Mac part-A handoff 100/100 + VM part-B 5-persona sweep (lean-ON), ruler-stamped sc_5ac7a1d9103c. Verdict: NOT release-ready. PASS: native_gate(signal), arc, no_give_up, behavioral GREEN, palette. FAIL: sat 4.8<7, zero_critical(4), story 3.9<4.3, mech 3.2<4.5 (one-duo sampling), ui_audit FAIL. vs Tuesday 3.6: no_give_up RED->PASS, sat 4.4->4.8, behavioral GREEN — the #719/#720 reliability fixes show; the genuine product long-poles remain.
The regression
#723 factored the inline build-SHA gate logic into
build_sha_evidence_gaps(). That moved thebuild_shas = sorted(...)definition into the helper's scope but leftmain()'s output reference ("run_build_shas": build_shas, ~line 851) dangling →NameError: name 'build_shas' is not defined.This crashed the final RRI rollup of every
release_readiness.pyrun. Caught live: the VM 5-persona sweep @fa97b34produced all persona/duo/ui_audit scores, then died on the rollup step (NameErrorat line 851) — so no RRI.json was written.Fix
Restore the all-persona distinct-SHA set in
main()'s scope (the diagnosticrun_build_shasoutput field). Thenative_gatecontract stays release-persona-scoped viabuild_sha_evidence_gaps()— #723's intent is preserved; only the dangling output reference is repaired.Why it shipped (the real root)
qa/test_release_readiness.pyalready has 4 tests that exercise this exact path and fail atfa97b34:test_mixed_build_sha_blocks_release_readytest_missing_run_build_sha_blocks_release_readytest_handoff_json_must_prove_app_status_build_shatest_short_build_sha_prefix_cannot_mix_stale_vm_and_mac_handoff_evidenceThey weren't a missing test — #723's CI did not gate on
qa/test_release_readiness.py. The code fix makes all 30/30 pass; a separate follow-up will close the CI gap so this class of regression is caught pre-merge (it's the higher-order fix).Validation
qa/test_release_readiness.py→ 30 passed (was 4 failing)qa/test_release_readiness_scope.py+qa/test_release_gate_static.py→ 16 passed (no fix(rri): scope native_gate build-SHA contract to the canonical release personas #723 scoping regression)release_readiness.py --helpimports/argparse cleanUnblocks the Phase-3 11-gate RRI rollup.
Summary by CodeRabbit
Bug Fixes
Documentation