Skip to content

fix(governance): preserve proposal branch create transition - #1176

Open
seonghobae wants to merge 63 commits into
mainfrom
fix/stacked-pr-central-required-workflows
Open

fix(governance): preserve proposal branch create transition#1176
seonghobae wants to merge 63 commits into
mainfrom
fix/stacked-pr-central-required-workflows

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Current exact-head state (2026-08-31)

  • Exact head: d435f88ca56603f6e6320766e36867933eba2248.
  • Protected base: main@1cbb6aaf0a24c3628d24c3dd6d9dcaa8a7eec0c5.
  • Non-force synchronization parents: prior owner head d33dd13a65df3ae53acd85c4915e4f22603ecf26 plus protected main; exact tree f21763233acaf8bd02f96266c2556af6d27c62ed.
  • GitHub comparison is 0 behind / 63 ahead; the effective main-relative delta remains exactly the three governance-owner files:
    • .github/workflows/audit-central-ruleset.yml
    • scripts/ci/audit_central_required_workflows.py
    • tests/test_central_required_workflow_ruleset_audit.py
  • Independent merged-tree verification:
    • focused governance audit: 38 passed
    • full central suite: 2,143 passed · 1 skipped · 21 subtests
    • statements: 10,611/10,611
    • branches: 4,272/4,272
    • docstrings: 100%
  • GitHub reports the PR mechanically mergeable. Mechanical mergeability is not authorization.
  • Fresh exact-head Security, SAST, CodeQL, Python Security, OSV, Secret, Scorecard, and SBOM workflows are terminal-success. Required OpenCode 33390204514 is terminal-failure without a timely current-head verdict; Required Noema 33390204632 and full Strix 33390204495 are cancelled. These required semantic gates remain non-passing.
  • Exact-current-head OpenCode submitted CHANGES_REQUESTED because the same-head full Strix run is cancelled; qualifying approval is absent and unresolved review threads are 0. Predecessor reviews/checks do not transfer.
  • Live repository ruleset 17921150 still requires 0 approvals, does not require latest-push approval, permits rebase, and gives OrganizationAdmin an always bypass. Do not merge while these admission contradictions and exact-head review requirements remain unresolved.

Decision: WAIT_FOR_EXACT_HEAD_HOSTED_AND_FORMAL_REVIEW_EVIDENCE.

Buyer-visible gap and causal boundary

The create-transition repair is operationally effective: inherited organization ruleset 18156473 is default-branch-only with create enforcement disabled, and a ScopeWeave proposal branch was created and updated normally. The remaining governance contradiction is layered protection:

  • repository ruleset 17921150: approvals 0, last-push approval false, rebase allowed, and OrganizationAdmin/always bypass;
  • inherited organization ruleset 18156473: approvals 1, last-push approval false, and OrganizationAdmin/always bypass;
  • the executable central contract requires two approvals, last-push approval, merge/squash-only, and no bypass actors.

The protected-main audit previously inspected the organization/stacked rulesets but did not read repository ruleset 17921150, and neither organization nor repository audit rejected configured bypass actors. This PR now fails closed on both live owner boundaries.

Refs #1200.

Change

  • preserve exact default-branch scope and do_not_enforce_on_create=true for normal proposal-branch creation;
  • fetch and audit .github repository ruleset 17921150 in the protected-main governance workflow;
  • require exact repository identity, active/default-only scope, two approvals, stale-review dismissal, last-push approval, thread resolution, merge/squash-only, no bypass actors, deletion protection, and non-fast-forward protection;
  • reject bypass actors in the inherited organization ruleset;
  • reject unexpected or malformed organization required-workflow entries instead of accepting an eighth hidden gate;
  • preserve the existing stacked-PR audit.

No consumer source, protected branch, live ruleset setting, bypass, or gate reduction was used.

Test-first evidence

Initial repository-boundary repair:

  • RED: two focused failures proved that the auditor had no repository-ruleset entry point; the workflow contract separately failed because it did not fetch or validate 17921150.
  • GREEN: 31 focused tests.

Current review/live-payload regressions:

  • RED: extra/malformed workflows, rebase drift, configured bypass actors, and omitted bypass evidence each passed incorrectly.
  • GREEN: 38 focused ruleset-audit tests.
  • Focused auditor coverage: 243/243 statements and 132/132 branches.
  • Protected-main merge-tree focused governance tests: 41 passed.
  • Protected-main merge-tree full central tests: 1,947 passed, 1 skipped, 21 subtests.
  • compileall and git diff --check: pass.

Protected-main merge-tree deterministic coverage is complete: 10,034/10,034 statements and 3,970/3,970 branches, with no missing or partial branches.

Acceptance state

The source repair is current-base aligned and locally complete, but hosted governance evidence is still non-passing:

  • Exact-head generated Security, SAST, CodeQL, OSV, SBOM, Python Security, Secret, and Scorecard workflows succeeded; Required OpenCode failed, while Noema and full Strix are cancelled.
  • Reviews API contains exact-current-head CHANGES_REQUESTED and no APPROVED verdict.
  • Unresolved review threads are 0.
  • The live organization/repository approval, latest-push, merge-method and bypass settings still contradict this branch's executable contract.
  • Cancelled, skipped, neutral, absent, queued, status-only, or predecessor evidence is not promoted to passing evidence.

Do not merge from local source tests or mechanical mergeability alone.

Keep #1200 open until:

  1. the live repository and inherited rulesets satisfy the executable approval/latest-push/merge-method/bypass contract;
  2. the strengthened protected-main audit passes against the live payloads;
  3. exact-head hosted security, coverage, provenance, and review evidence is terminal and coherent;
  4. the demonstrated no-bypass ScopeWeave create/update canary remains valid.

Summary by CodeRabbit

  • 버그 수정
    • 중앙 필수 워크플로 규칙이 기본 브랜치에만 정확히 적용되도록 검증을 강화했습니다.
    • 브랜치 생성 시 정상적인 제안 브랜치 전환을 보존하도록 설정 검사를 보완했습니다.
    • 저장소·조직 ruleset의 승인·최신 푸시·merge 방식·bypass drift와 숨은 추가 워크플로를 실패 폐쇄로 감지합니다.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 25a3cb7d-639d-4a81-a779-32a19d9501fe

📝 Walkthrough

Walkthrough

Changes

에이전트 멘션 동시성

Layer / File(s) Summary
인터랙티브 동시성 계약
.github/workflows/agent-mention-*.yml, docs/doctoring/agent-mention-concurrency-isolation.md, tests/test_agent_mention_*, CHANGELOG.md
인터랙티브 에이전트 멘션에서 로컬 concurrency와 지원되지 않는 queue: max를 제거했습니다. 예약 sweep은 취소하지 않는 별도 동시성 그룹을 유지합니다. 관련 문서와 테스트를 갱신했습니다.

중앙 required-workflow 적용 범위

Layer / File(s) Summary
규칙셋 범위와 감사 검증
scripts/ci/audit_central_required_workflows.py, tests/test_central_required_workflow_ruleset_audit.py, docs/org-required-workflow-rollout.md, docs/adr/0001-central-review-stacked-pull-requests.md, README.md
중앙 규칙셋의 대상 범위를 ~DEFAULT_BRANCH에서 ~ALL로 변경했습니다. stacked pull request의 base branch 적용 내용을 문서화하고, 감사 스크립트와 회귀 테스트를 갱신했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to c18d8

This PR expands central governance reviews to stacked branches, but its validation currently permits malformed branch-scope configurations that could allow required review coverage to be missed without detection. The audit contract and regression tests should be tightened before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 4 files. (5 skipped: 5 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning 제목은 제안 브랜치 생성 전환을 설명하지만, 변경사항의 핵심인 스택형 PR 거버넌스와 중앙 규칙셋 범위 변경을 반영하지 않습니다. 스택형 PR에 중앙 필수 워크플로를 적용하고 규칙셋 범위를 모든 브랜치로 확장한 변경을 제목에 명시하십시오.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stacked-pr-central-required-workflows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation at c11fb657e1a71fabd8cdbf06d1e6a821163bd836:

  • live CWL Central required workflows ruleset 18156473: active, repository_name.include=["~ALL"], ref_name.include=["~ALL"], seven central workflows, two approving reviews; audit script: PASS;
  • tests/test_central_required_workflow_ruleset_audit.py: 16 passed;
  • audit module: 130 statements / 66 branches, 100% coverage;
  • interrogate 100%, compileall, and git diff --check passed.

The full central suite had prior 100% evidence on the unchanged main source; this PR adds only the scoped audit/docs/ADR/test contract. Hosted current-head Checks and two qualifying independent approvals remain required; no bypass or self-approval.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Successor current-head validation at ab65fcc7dd6547e84cca8a699430d06077dad022:

  • live ruleset 18156473: active, repository_name.include=["~ALL"], ref_name.include=["~ALL"], seven central workflows, two approving reviews; audit script: PASS;
  • focused audit tests: 16 passed; audit module coverage 100%; interrogate 100%; compileall and git diff --check passed.

The documentation-only successor preserves the implementation proof; stale predecessor-head review evidence does not count. A fresh exact-head independent review and current hosted Checks remain required before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact current head is now bc2c93ac88599837555cb1ff3292bb49d245dc5a after the ledger timestamp refresh. Focused audit proof remains unchanged; hosted required Checks and fresh exact-head review must be evaluated on this successor.

@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 18:35
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for bc2c93a: verified the live organization ruleset 18156473 is active with ref_name.include=[~ALL], and the PR aligns the audit code, regression fixture, ADR, and operator rollout ledger with stacked pull-request coverage. Passed: 16 central ruleset audit tests, Ruff, compileall, and git diff --check. Please review this exact head; merge remains gated on an independent non-author approval and terminal protected checks.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review the current PR head bc2c93a. Verify the live ruleset alignment, stacked-PR scope audit, changed-file evidence, current mergeability, and required checks. Do not approve a stale head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current HEAD bc2c93a. Inspect the complete diff, validate security and regression behavior, and publish only evidence bound to this SHA. Do not transfer predecessor approval, modify the branch, or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent please review exact current HEAD bc2c93ac88599837555cb1ff3292bb49d245dc5a against main; verify stacked-branch required-workflow scope, live ruleset audit, and protection invariants.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review please independently review exact current HEAD bc2c93ac88599837555cb1ff3292bb49d245dc5a against main; verify the all-branch ruleset audit and central workflow/protection invariants.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Reproduced and fixed the central router Check failure at exact HEAD 501fe541b725f611145d42672c66b3411287d36d: repository_dispatch was using a job token with actions: read, and the local concurrency block contained unsupported queue: max. The local router now has actions: write, valid native concurrency, and regression coverage. Tests: 8 passed; full actionlint and diff check pass. @opencode-agent please re-review this exact HEAD.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review independently re-review exact current HEAD 501fe541b725f611145d42672c66b3411287d36d against main; verify repository-dispatch permission, actionlint-valid concurrency, and central stacked-PR governance.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact-head causal repair evidence for aa63517844476ad5d5cfac37f6126d640d5d5115:

  • Current-head root cause: deleting unsupported concurrency.queue while retaining the local concurrency group permits only one pending run; a later trusted mention can replace an earlier pending mention before its durable claim exists. The same commit also expanded local Actions permission from read to write even though repository dispatch is authorized by the existing contents: write scope and artifact access is read-only.
  • RED: four focused contract failures reproduced the replacing local queue and unused actions: write grant.
  • Narrow fix: remove the local route's concurrency group entirely, preserve the scheduled sweep's separate single-flight group, restore actions: read, and converge the doctoring/changelog contract on GitHub's supported one-running/one-pending semantics.
  • Focused GREEN: 8 passed.
  • Full GREEN: 1,235 passed plus 16 subtests.
  • compileall and git diff --check pass.
  • All six exact GitHub blobs match the locally verified files.

Hosted exact-head workflows and independent formal review remain separate non-passing gates until terminal evidence exists.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for aa63517844476ad5d5cfac37f6126d640d5d5115: 27 focused agent-mention/ruleset tests passed; actionlint passed for .github/workflows/agent-mention-router.yml; compileall and git diff --check passed. The PR scope remains governance-only, with Figma File ID N/A. Review this exact head against the protected ruleset before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review\nHead SHA: aa63517\nReview current HEAD only; check ruleset scope, stacked-PR required workflows, workflow permissions, and all changed tests/docs. Re-run after any push.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for aa63517844476ad5d5cfac37f6126d640d5d5115: 24 focused governance/router tests passed; actionlint passed for .github/workflows/agent-mention-router.yml; compileall and git diff --check passed. The least-privilege route keeps Contents write for repository dispatch and Actions read for artifact reads; no Figma UI contract applies (Figma File ID: N/A).

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review\nHead SHA: aa63517\nReview this exact head only, including least-privilege permissions, repository-dispatch authorization, and all changed queue/idempotency contracts. Re-run after any push.

Copy link
Copy Markdown
Contributor Author

Exact-head verification for the stacked central workflow governance change.

Current pushed head: a7aeb5683b25d1f82fb4ac2f72685391f3bccf62

Root cause fixed: GitHub Actions rejects the unsupported concurrency.queue key in both agent-mention-noema-dispatch.yml and agent-mention-opencode-dispatch.yml, preventing the downstream dispatch workflows from starting. Removed only that key; exact invocation-key groups and cancel-in-progress: false remain unchanged. Updated the existing contract test to reject the unsupported key.

Verified at this exact head:

  • RED: the updated contract test failed on the predecessor because both wrappers contained queue: max.
  • uv run pytest -q tests/test_agent_mention_downstream_idempotency.py: 4 passed after the fix.
  • uv run pytest -q tests/test_agent_mention_*.py: 84 passed.
  • uv run coverage run -m pytest -q: 1235 passed, 16 subtests passed.
  • coverage report: 100% statement and branch coverage; interrogate: 100%.
  • actionlint on both downstream workflows, compileall, and git diff --check: passed.

@opencode-agent please perform the independent formal review for current head a7aeb5683b25d1f82fb4ac2f72685391f3bccf62. Review-only request: do not merge or enable auto-merge.

Copy link
Copy Markdown
Contributor Author

Correction to the previous evidence comment: the exact pushed/current PR head is a7aeb56804c043b97f837a82d9066dfc03eec938. The verification results and requested review apply to this exact head. @opencode-agent please review this SHA independently; do not merge or enable auto-merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Queued @opencode-agent for PR #1176 at head c18d8c03f6b7c09253e4f89b0741f24fdcfe96f2. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Queued @cwl-noema-review for PR #1176 at head c18d8c03f6b7c09253e4f89b0741f24fdcfe96f2. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Devin Review

Comment thread scripts/ci/audit_central_required_workflows.py
opencode-agent Bot and others added 19 commits August 30, 2026 06:18

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Please perform an independent review of exact head d33dd13a65df3ae53acd85c4915e4f22603ecf26 against protected base a6fc45e98f8fdb7ccc90bc1d45addd9c8c9331a4. Review only the three-file governance owner delta: exact default-only/create-transition semantics, fail-closed repository and inherited ruleset identity/scope/workflow cardinality, two approvals/latest-push/thread resolution/merge-method/deletion/non-fast-forward requirements, bypass-actor rejection, and the protected-main live-payload audit handoff. Regenerate exact-current-head deterministic coverage, Strix, OpenCode and Noema evidence; do not inherit predecessor, skipped, cancelled, status-only, or model-only evidence.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 d435f88ca56603f6e6320766e36867933eba2248.
  • 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:

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["CI script: audit_central_required_workflows.py"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: audit_central_required_workflows.py"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_central_required_workflow_ruleset_audit.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_central_required_workflow_ruleset_audit.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 d435f88ca56603f6e6320766e36867933eba2248.
  • 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:

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["CI script: audit_central_required_workflows.py"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script: audit_central_required_workflows.py"]
  R2 --> V2["bash -n plus Strix self-test"]
  Evidence --> S3["Test: test_central_required_workflow_ruleset_audit.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_central_required_workflow_ruleset_audit.py"]
  R3 --> V3["targeted test run"]
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work scope: product-gap Customer-visible product gap status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants