Skip to content

feat(policy-approval): reconcile current procedural publication preconditions - #603

Merged
seonghobae merged 6 commits into
mainfrom
feat/procedural-publication-preflight-20260911
Sep 10, 2026
Merged

feat(policy-approval): reconcile current procedural publication preconditions#603
seonghobae merged 6 commits into
mainfrom
feat/procedural-publication-preflight-20260911

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Scope

Noema Policy / Approval successor for #584 after protected #602.

The boundary fresh-reads the existing State / Checkpoint history and Policy / Approval ledger, requires a stable read window and exact graph/history/evaluator/approval identity agreement, fails closed on current revocation or concurrent authority change, and emits only a locally admitted preflight receipt with publicationAuthorized:false and activationAuthorized:false.

It does not publish a graph, activate a revision, create a second State / Checkpoint/Workflow/lifecycle truth, consume mutable sibling source, own Keyverse credentials, or replace context-graph-contracts publication authority. Existing executions remain pinned to their admitted graph revision and continue to honor lifecycle/cancellation through the existing runtime ACL.

Reality RED -> causal repair

  • df9a1b77043a32bef5eb7a18e3c41fd38f627fe6: hosted application CI reached release tests and failed because the production preflight module did not exist. 173afee7666a9bc1a6bfeb481b76fc5f00bc49cb added the smallest owner-boundary implementation and focused cases.
  • Current-head review then found that cloned/unadmitted preflight receipts were incorrectly classified as an approval/history mismatch. d81eee5c3c4e26587436e443b5cc47bdc63ae702 changed only the focused expectation and produced a hosted release-test RED; ee28af47beeddf78b1d160d23fa83eac9c1b75d2 added the distinct unadmitted_preflight diagnostic without weakening owner-state mismatch checks.
  • Documentation review found ADR-0017 still described publication-time reconciliation as wholly absent. Test-only 5e9edbb1c3df52e9f8ed1088e7b5e8d3273b85f0 produced a hosted release-test RED requiring explicit candidate/non-authority classification. 23df0e8369fa87b3c1bf569b3dcdba19fd850e16 updates ADR-0017 while retaining Proposed, immutable foreign-owner prerequisites, and the distinction between preflight and publication/activation.

Predecessor GREEN does not transfer: merge acceptance applies only to one unchanged final exact head.

Acceptance

  • stable double-read of State / Checkpoint and Policy / Approval owner snapshots;
  • exact candidate/history/approval/evaluator-handoff identity reconciliation;
  • current revoked approval fails closed;
  • structural history/approval/preflight lookalikes fail closed through existing process-local owner provenance;
  • result explicitly carries no publication or activation authority;
  • existing Agent Runtime and Workflow / Task lifecycle/cancellation ownership is not duplicated;
  • ADR-0017 records candidate truth without promoting its Proposed status or claiming release/deployment;
  • repository typecheck/tests/100% coverage plus reviewer-ci, central Security Scan, and patch-validator-image GREEN on one unchanged exact head before normal merge;
  • after source merge, moving-current PRD/TRD/ARCHITECTURE/TRACEABILITY/product baseline are converged as protected truth rather than treating this source slice as an actual publisher.

Related: #584, #36, #561.

Summary by CodeRabbit

  • 새 기능

    • 절차적 그래프 게시 전 사전 점검을 추가했습니다.
    • 평가 기록과 정책·승인 상태의 일치 여부를 확인하고, 확인 중 변경·철회·누락 또는 신원 불일치가 있으면 게시 준비를 거부합니다.
    • 점검 결과는 게시 및 활성화 권한을 부여하지 않으며, 검증된 결과만 후속 절차에서 사용할 수 있습니다.
  • 문서

    • ADR-0017에 해당 사전 점검 후보와 제한 사항을 반영했습니다.
    • ADR-0017의 상태는 계속 Proposed로 유지됩니다.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1ea2abf3-a1e2-4a16-afba-7552d6a5b8e2

📥 Commits

Reviewing files that changed from the base of the PR and between c4acae4 and 23df0e8.

📒 Files selected for processing (4)
  • docs/adr/0017-procedural-graph-guidance.md
  • src/policy-approval/procedural-publication-preflight.ts
  • test/procedural-publication-preflight-documentation.test.ts
  • test/procedural-publication-preflight.test.ts

📝 Walkthrough

Walkthrough

절차 그래프 게시 전 사전 점검 경계를 추가했습니다. State / Checkpoint와 Policy / Approval을 안정 창에서 재검증하고, 일치하는 경우에도 게시 및 활성화 권한이 없는 receipt를 반환합니다. 구현과 실패 조건을 테스트하며 ADR-0017을 갱신합니다.

Changes

게시 전 사전 점검

Layer / File(s) Summary
사전 점검 계약과 조정
src/policy-approval/procedural-publication-preflight.ts
읽기 포트, 오류 코드, 불변 receipt, 이중 읽기 기반 변경 감지, 승인·히스토리 일치 검증을 추가합니다. 승인 철회, 누락, 불일치, 위조 receipt를 거부합니다.
사전 점검 검증 테스트
test/procedural-publication-preflight.test.ts
내구성 평가 히스토리와 정책 승인 snapshot을 구성합니다. 안정 성공, 권한 변경, 철회, 오래된 히스토리 연결, 누락, 구조적 위조를 검증합니다.
ADR-0017 반영
docs/adr/0017-procedural-graph-guidance.md, test/procedural-publication-preflight-documentation.test.ts
후보 #603의 사전 점검과 publicationAuthorized: false, activationAuthorized: false, 게시·활성화 권한 부재를 문서화합니다. ADR 상태가 Proposed임을 검증합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Preflight as ProceduralPublicationPreflight
  participant History as History reader
  participant Approval as Approval reader
  participant Receipt as Preflight receipt
  Preflight->>History: 첫 번째 평가 히스토리 읽기
  Preflight->>Approval: 첫 번째 승인 snapshot 읽기
  Preflight->>History: 두 번째 평가 히스토리 읽기
  Preflight->>Approval: 두 번째 승인 snapshot 읽기
  Preflight->>Receipt: 일치하는 경우 권한이 false인 receipt 반환
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/procedural-publication-preflight-20260911

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.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Current-head review on exact 23df0e8369fa87b3c1bf569b3dcdba19fd850e16: no additional valid source/test/DDD finding. The preflight reuses the existing State / Checkpoint and Policy / Approval read authorities, proves a stable overlapping read window, binds candidate/history/evaluator/signer/approval identities, rejects current approval revocation and structural lookalikes, and explicitly carries neither publication nor activation authority. ADR-0017 remains Proposed and foreign publication/key-custody/lifecycle truth is not copied. All four exact-head workflow generations are terminal SUCCESS and there are no unresolved inline threads. This is a COMMENT review only; no self-approval.

@seonghobae
seonghobae marked this pull request as ready for review September 10, 2026 20:30
@seonghobae
seonghobae merged commit 70c997e into main Sep 10, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the feat/procedural-publication-preflight-20260911 branch September 10, 2026 20:30
seonghobae added a commit that referenced this pull request Sep 10, 2026
seonghobae added a commit that referenced this pull request Sep 10, 2026
seonghobae added a commit that referenced this pull request Sep 10, 2026
seonghobae added a commit that referenced this pull request Sep 10, 2026
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