fix(governance): automate ruleset owner-plane reconciliation - #1644
fix(governance): automate ruleset owner-plane reconciliation#1644seonghobae wants to merge 252 commits into
Conversation
…ked-pr-central-required-workflows
# Conflicts: # scripts/ci/test_strix_quick_gate.sh
Merge protected main non-destructively while retaining only the create-transition audit and its executable regressions. Focused ruleset audit: 20 passed. Full suite: 1,402 passed, 1 skipped, 16 subtests.
Preserve only the two governance owner files over protected main 0c6b9a6. Focused ruleset audit: 20 passed. Full suite: 1,402 passed, 1 skipped, 16 subtests.
|
Fresh Context Fabric dependency revalidation (2026-09-08 KST), owner-path evidence only; no central source/ref mutation from the product writer. Protected Exact current-head workflow reread for Context Fabric leaf state still requires the accepted owner sequence after this source reaches protected truth: reconcile #1644 non-force from current protected main and reacquire exact-head terminal gates; apply #772's canonical solo-maintainer ruleset repair through the separately authorized Administration-write maintenance path; then #1137 protects CGC/EA |
seonghobae
left a comment
There was a problem hiding this comment.
Exact-head execution receipt: ordinary parents 665adfbb220317daf8efae0124d7c2005fc5576b + protected main@7fd571dbcdbae6acf29d8f4ee704d7ba6297e4db, exact tree 8191b45cb3dbcc6a084107fc61e1c84afdf04f95. The protected #2028 CodeQL repair is preserved and the governance delta remains 21 paths. Local GREEN: governance focused 208 passed; owner reconciler 186 passed; full 3149 passed, 1 skipped, 21 subtests; diff check PASS. Hosted successor gates are nonterminal, so this COMMENT is evidence only and is not approval or merge authorization.
|
2026-09-12 current-main reconciliation receipt
|
|
REVIEW ADMISSION — unchanged exact head |
|
SOURCE WRITER RELEASE — ordinary non-force descendant |
Exact-head CodeQL RCARun 34685614235 is terminal FAILURE on unchanged head All other current-head required workflows are SUCCESS. This remains a central authenticated terminal-settlement defect under active owner |
There was a problem hiding this comment.
Pull request overview
OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.
Findings
1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
- Problem: Failed same-head checks remain for
4d775cd1918177886b6303d4f807c5c098acb366. - Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
- Fix: Read and fix the failed check logs below, then rerun the current-head checks.
- Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.
Failed checks:
- CodeQL PR/CodeQL compatibility analysis (actions): FAILURE (https://github.com/ContextualWisdomLab/.github/actions/runs/34685614235/job/103534058894)
- CodeQL compatibility analysis (actions) check run: failure (https://github.com/ContextualWisdomLab/.github/actions/runs/34685614235/job/103534058894)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: audit-central-ruleset.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: audit-central-ruleset.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Workflow: ruleset-governance-reconcile.yml"]
S2 --> I2["GitHub Actions review job"]
I2 --> R2["Review risk: Workflow: ruleset-governance-reconcile.yml"]
R2 --> V2["actionlint plus required checks"]
Evidence --> S3["Repository file: CHANGELOG.md"]
S3 --> I3["repository behavior"]
I3 --> R3["Review risk: Repository file: CHANGELOG.md"]
R3 --> V3["required checks"]
Evidence --> S4["Repository file: ruleset-governance.json"]
S4 --> I4["repository behavior"]
I4 --> R4["Review risk: Repository file: ruleset-governance.json"]
R4 --> V4["required checks"]
Evidence --> S5["Docs: ruleset-owner-plane-reconciliation.md (2 files)"]
S5 --> I5["operator or user guidance"]
I5 --> R5["Review risk: Docs: ruleset-owner-plane-reconciliation.md (2 files)"]
R5 --> V5["docs review"]
Evidence --> S6["CI script: audit_central_required_workflows.py"]
S6 --> I6["review and security gate shell path"]
I6 --> R6["Review risk: CI script: audit_central_required_workflows.py"]
R6 --> V6["bash -n plus Strix self-test"]
Evidence --> S7["CI script: reconcile_ruleset_governance.py"]
S7 --> I7["review and security gate shell path"]
I7 --> R7["Review risk: CI script: reconcile_ruleset_governance.py"]
R7 --> V7["bash -n plus Strix self-test"]
Evidence --> S8["Test: test_central_required_workflow_exact_inventory.py (13 files)"]
S8 --> I8["regression suite"]
I8 --> R8["Review risk: Test: test_central_required_workflow_exact_inventory.py (13 files)"]
R8 --> V8["targeted test run"]
OpenCode Review Overview
|
Protected-main restack receipt — 2026-09-12Exact head The five new protected-main commits touched six paths disjoint from this PR's 21 governance paths. Git Data construction reproduced the locally merged tree byte-for-byte, then the ref advanced with Exact-tree verification: focused governance plus new protected-main contracts 114 passed; complete All predecessor hosted results are invalidated. Keep Draft until new exact-head checks are terminal and a qualifying independent approval exists; source integration does not claim live ruleset convergence. |
There was a problem hiding this comment.
Noema LLM review
The PR introduces a ruleset governance reconciler and extends the central audit to also validate the owner repository ruleset. The core reconciler logic is well-reasoned with strong collision recovery, but the audit workflow's error handling can mask a central ruleset drift. When the central ruleset audit fails, audit_status=1 is set but the workflow continues; if a subsequent repository or stacked ruleset fetch fails, the job exits immediately with a non-audit error before the final audit_status check, so a scheduled owner-plane audit can fail without surfacing the compliance drift. The final error message is also misleading when only the central audit failed.
Reviewed changed lines
.github/workflows/audit-central-ruleset.yml:97 (RIGHT): Central ruleset audit result is captured into audit_status rather than failing immediately, which is the root cause of the masking issue..github/workflows/audit-central-ruleset.yml:104 (RIGHT): Repository ruleset fetch failure exits the job without checking audit_status, bypassing the final failure check..github/workflows/audit-central-ruleset.yml:111 (RIGHT): Stacked ruleset fetch failure has the same early-exit behavior, also bypassing the final audit_status check..github/workflows/audit-central-ruleset.yml:124 (RIGHT): Final error message is unconditional and references 'fetched rulesets' even when only the central audit failed.
Adversarial validation
.github/workflows/audit-central-ruleset.yml:104 (RIGHT)confirmed: A central ruleset audit failure will still be surfaced even if a later repository ruleset fetch fails. — Static flow: the central audit sets audit_status=1, then the repository fetchif ! gh api ...is false and triggersexit 1at line 104. The final audit_status check at line 123 is never reached, so the central drift is masked by an unrelated fetch error..github/workflows/audit-central-ruleset.yml:124 (RIGHT)confirmed: The final error message accurately describes the set of drifted rulesets when only the central audit failed. — The final message unconditionally states 'One or more fetched rulesets drift...' even though no repository/stacked ruleset was fetched, misleading operators about which ruleset actually failed.- Residual risk: After fixing the early-exit masking, ensure the scheduled audit surfaces a central ruleset drift even if all later fetches succeed; the current design also needs a dedicated annotation for the central audit failure.
Findings
- [medium] .github/workflows/audit-central-ruleset.yml:104 (RIGHT): Central ruleset audit failure can be masked: when audit_status is set, the workflow continues and a subsequent repository ruleset fetch failure exits the job at line 104 before the final audit_status check at line 123. On the scheduled owner-plane audit, a central ruleset drift would not be reported, defeating the fail-closed drift detection.
- [low] .github/workflows/audit-central-ruleset.yml:124 (RIGHT): The final error message says 'One or more fetched rulesets drift' even when only the central ruleset audit failed and no repository/stacked ruleset was fetched, which misleads operators about the actual drift source.
- Result: REQUEST_CHANGES
- Head SHA:
02d76fa76a9772e4abd506845aa3d383a45efaf5 - Reviewer credential:
noema-review-github-app-refresh - Actor:
cwl-noema-review[bot]
|
Exact-head repair receipt for Noema's source finding was valid. RED pinned the missing failure ledger, subject-specific central/owner/stacked attribution, absence of early exits before the next audit, and the terminal named receipt. The workflow now records a failed API read as a named failure, skips auditing the unavailable payload, continues collecting any remaining subject evidence, and exits nonzero once with every proven failure subject. A later owner/stacked fetch error can no longer hide an already-observed central governance drift. Verification on the exact tree:
The PR is Draft/Proposed while the new hosted runs and qualifying independent review are reacquired. This does not claim live ruleset convergence or authorize bypass/merge. |
|
Exact-head CodeQL RCA for
Draft/Proposed remains correct. Do not manually rerun, synthesize status, transfer successor evidence, or merge until exact-head CodeQL converges and a qualifying independent approval exists. |
|
Ready transition preserved exact head Noema's source finding is bound to predecessor |
|
@opencode-agent Revalidate unchanged exact head |
Current authoritative execution receipt — 2026-09-12
722fec9de67aece7500993ee2999b21df0fab83b; protected base:main@fb17ef556f94f673234aa557254ae52779e9a7b0; exact tree:629fc3684bcfca48b66146ccda0f1b70956cdf4a.git diff --checkPASS.Buyer/control-plane outcome
This is the owner-plane writer for the live ruleset drift blocking Orgmetra's ordinary protected merge canary. Source integration alone does not mutate live settings: privileged apply remains disabled unless trusted protected
mainhasCWL_RULESET_RECONCILE_ENABLED=trueand the protectedruleset-governance-maintenanceenvironment supplies a separately provisioned least-privilegeCWL_RULESET_ADMIN_TOKENwith Administration write authority.Reviewed implementation boundary
config/ruleset-governance.jsonbinds exactly repository ruleset17921150and organization ruleset18156473.PUTprecondition for these ruleset updates. A second live read detects visible drift but is not represented as compare-and-swap.PUT, and rechecks version state after settlement before trusting the restore.PUTmay already have been accepted, history settlement and lossless compensation finish without a stale-main veto so an overwritten administrator predecessor is not stranded.Live drift and acceptance boundary
Live settings must be re-read independently of source integration. The last verified state showed inherited organization ruleset
18156473withrequired_approving_review_count=1and routineOrganizationAdmin/alwaysbypass, while.githubrepository ruleset17921150had approval 0/last-push false/CODEOWNER false but still permitted rebase and routineOrganizationAdmin/alwaysbypass. This PR therefore has not completed settings reconciliation merely by changing source.Require terminal successor-head security/review evidence before ordinary merge. After source reaches protected
main, provision the distinct least-privilege owner-plane identity, enable reconciliation only for a controlled maintenance interval, require exact live payload plus immutable-history convergence, re-run the canonical audit, and prove unchanged deterministic-GREENContextualWisdomLab/Orgmetra#88@0dc4f09cc3c87829ea1e3a0e3dc0188df07ad8cdcan take the ordinary protected merge path without synthetic approval or routine administrator bypass. Genuine failed/absent required workflows and unresolved required threads remain blocking.Refs #772, #1176, #1340, #1351, #1669, #1728, #1731, #1734, ContextualWisdomLab/Orgmetra#89.
Summary by CodeRabbit
새 기능
문서
품질 개선