Skip to content

fix(rri): restore main()'s build_shas — #723 regression that crashed every RRI rollup - #728

Merged
100yenadmin merged 2 commits into
mainfrom
fix/rri-build-shas-nameerror
Jun 9, 2026
Merged

fix(rri): restore main()'s build_shas — #723 regression that crashed every RRI rollup#728
100yenadmin merged 2 commits into
mainfrom
fix/rri-build-shas-nameerror

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jun 9, 2026

Copy link
Copy Markdown
Member

The regression

#723 factored the inline build-SHA gate logic into build_sha_evidence_gaps(). That moved the build_shas = sorted(...) definition into the helper's scope but left main()'s output reference ("run_build_shas": build_shas, ~line 851) danglingNameError: name 'build_shas' is not defined.

This crashed the final RRI rollup of every release_readiness.py run. Caught live: the VM 5-persona sweep @fa97b34 produced all persona/duo/ui_audit scores, then died on the rollup step (NameError at line 851) — so no RRI.json was written.

Fix

Restore the all-persona distinct-SHA set in main()'s scope (the diagnostic run_build_shas output field). The native_gate contract stays release-persona-scoped via build_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.py already has 4 tests that exercise this exact path and fail at fa97b34:

  • test_mixed_build_sha_blocks_release_ready
  • test_missing_run_build_sha_blocks_release_ready
  • test_handoff_json_must_prove_app_status_build_sha
  • test_short_build_sha_prefix_cannot_mix_stale_vm_and_mac_handoff_evidence

They 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

Unblocks the Phase-3 11-gate RRI rollup.

Summary by CodeRabbit

  • Bug Fixes

    • Resolved a release readiness assessment error that was preventing proper evaluation of build configurations.
  • Documentation

    • Updated quality assurance records to include the latest test run results and metrics.

…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.
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6771abc8-e9bc-45a1-9400-d787a5a5649a

📥 Commits

Reviewing files that changed from the base of the PR and between fa97b34 and bf45fe1.

⛔ Files ignored due to path filters (1)
  • qa/scores.db is excluded by !**/*.db
📒 Files selected for processing (2)
  • qa/release_readiness.py
  • qa/scores_ledger.md

📝 Walkthrough

Walkthrough

This PR fixes a variable scope bug in the release readiness script where build_shas was undefined at output time, preventing signals.run_build_shas from resolving. The fix computes build_shas as a sorted set of distinct run_build_sha values from collected persona scores. The PR also updates the auto-generated scores ledger with a new run entry.

Changes

Release readiness tooling fix

Layer / File(s) Summary
Build SHAs variable scope fix
qa/release_readiness.py
build_shas is now computed inside main() by collecting and sorting distinct non-empty run_build_sha values from persona_scores, resolving the NameError that occurred when signals.run_build_shas was accessed at output time.
Scores ledger with new run
qa/scores_ledger.md
Ledger is updated with one additional rendered run (v1.0.4-rc1-fa97b34), row count increases from 64 to 65, and the rendered timestamp is refreshed with new scoring and results data.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • electricsheephq/WorldOS#413: Introduced the RRI scoring and reporting flow in release readiness tooling that this PR now fixes by ensuring build_shas is properly scoped when signals.run_build_shas is accessed.

Poem

🐰 A variable lost in the scope of the night,
Now found and collected, shining so bright!
The SHAs are sorted, the ledger's in tune,
Release readiness fixed by this fine rabbit's boon. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description comprehensively covers the regression root cause, the fix rationale, why tests weren't run (CI gap), and detailed validation results. The required CLA checklist is missing. Add the required Licensing/CLA checklist section with acknowledgment boxes as specified in the repository template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main fix: restoring build_shas in main() to resolve a NameError crash in the RRI rollup caused by PR #723.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

…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.
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