fix(sop-checklist): widen ack eligibility per RFC#450 Option C (closes internal#442) #1554
Reference in New Issue
Block a user
Delete Branch "fix/sop-checklist-widen-ack-internal-442"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Governance root-cause fix for internal#442 — implements RFC#450 Option C (risk-classed two-eyes). Closes the SOP-checklist gridlock where
root-cause/no-backwards-compatitems required[managers, ceo]acks but every managers/ceo persona token is dead (uid:0 / 401) and theceoteam is one human (Hongming) — making the gate satisfiable only by Hongming hand-acking every PR or by bypass (forbidden perfeedback_never_admin_merge_bypass).What changed
.gitea/sop-checklist-config.yaml:high_risk_labels:risk:high,area:security,area:schema,area:fleet-image,area:identity,area:gate-meta.root-causeandno-backwards-compat:required_teams: [engineers, managers, ceo](widened from[managers, ceo]).required_teams_high_risk: [ceo]..gitea/scripts/sop-checklist.py:is_high_risk(pr, cfg)predicate: true ifftier:highlabel OR any label incfg.high_risk_labels.resolve_required_teams(item, high_risk)helper — single-sited elevation decision. Emptyrequired_teams_high_riskfalls back to default (tightening must REMOVE the key, not set[]).compute_ack_stateacceptshigh_riskand threads it through; the probe closure inmain()uses the same resolver. Diagnostics log surfacesrisk_class=high|default..gitea/scripts/tests/test_sop_checklist.py(+28 tests):TestIsHighRisk(8): tier-high / area-label predicates pass; tier-medium / unknown labels stay default.TestResolveRequiredTeams(4): elevation only when both high-risk AND item declares elevated; empty list falls back.TestRootCauseAckEligibilityWidened(5): engineers ack now passes root-cause + no-backwards-compat for default class; engineers-alone fails for high-risk; ceo passes for high-risk; self-ack remains forbidden regardless of widened eligibility.TestHighRiskClassUsesElevatedListInConfig(3): config-level guarantee that the elevated list IS[ceo]for both items and other 5 items are unaffected.Why this is the root cause, not a workaround
The "regenerate persona tokens" proposed fix in #442 treats the symptom. The real defect is that sop-checklist ignored tier-class while the sibling
sop-tier-checkgate honors it (tier:high → ceo only). This PR closes that latent inconsistency:ceoack (durable human team, survives persona-layer teardown perfeedback_personas_end_of_life_use_freely).Two-eyes is preserved at every tier — no rubber-stamp, no self-ack, no new identity.
Test plan
python3 .gitea/scripts/tests/test_sop_checklist.py— 52 original tests pass.cd .gitea/scripts/tests && python3 -m unittest test_sop_checklist— 79 tests pass (52 original + 27 new + 1 NA-state from above the__main__mid-file).area:security/area:schema/area:fleet-image/area:identity/area:gate-metato ceo — these are the irreversible / security-critical / gate-meta surfaces where senior judgment is load-bearing.engineersdoes not weaken non-author-only enforcement (self-ack test pins this).Open questions
high_risk_labelsset complete? The RFC#450 list ({risk:high, area:security, area:schema, area:fleet-image, area:identity, area:gate-meta}) is conservative — tightening is one PR away (add label to list). Anything currently labeled differently in molecule-core that should also trip the senior path?tier:mediumcarrying NO area-label still elevate? Current behavior: tier:medium alone → default class (engineers ack suffices). RFC#450 explicitly chose this. Confirming this is the intent.managersbe kept in the OR-set? The widened default is[engineers, managers, ceo](managers retained for transition; engineers is the active routing). Droppingmanagersis a one-line edit if the senior-via-managers path is being decommissioned.Out of scope (intentional)
feedback_never_admin_merge_bypass+ the standing rule on gate-meta changes).Refs internal#442, RFC internal#450.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
5-axis review on RFC#450 Option C sop-checklist gate widen: correctness OK (resolve_required_teams single-sited, is_high_risk fires on tier:high OR cfg.high_risk_labels intersect, both probe and compute_ack_state read same high_risk flag); readability OK (extensive doc-comments cite the RFC); arch OK (closes governance gap between sop-tier-check (tier-aware) and sop-checklist (was tier-blind), single-sited decision); security OK (default-class items unchanged); perf negligible. Test coverage: high-risk predicate matrix + resolver fallback rule. APPROVED.
Test discipline: each high_risk_label class (security, schema, identity, fleet-image, gate-meta) has its own assertion; default-class never-elevates is pinned; resolver falls back when required_teams_high_risk is empty. Comprehensive. APPROVED.