Skip to content

feat(reviewer): bind evidence receipts to exact claims - #556

Merged
seonghobae merged 51 commits into
mainfrom
feat/reviewer-claim-evidence-receipts-555
Sep 8, 2026
Merged

feat(reviewer): bind evidence receipts to exact claims#556
seonghobae merged 51 commits into
mainfrom
feat/reviewer-claim-evidence-receipts-555

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Scope and ownership

Owned by issue #555. This remains the canonical Draft successor for the Concept35 provenance defect. Noema owns claim-evidence admission and reviewer publication; provider routing remains contextual-orchestrator authority, while isolation, research retrieval, security workflow and outbound authority remain with their canonical owners.

Current authority — 2026-09-08 KST

Prerequisite #535 normally integrated as GitHub-verified protected main@0dbfceb850cda3a016ceb39ae1c8a1a96a9f2ad5 after unchanged exact 82b20b293f0a5f0ac0e69857c1b61dddfe478491 reached terminal application CI, reviewer-ci, required Security and patch-validator-image success with clean review authority. #556 is ahead-only from that protected base with behind_by=0 and merge-base exactly protected main.

Fresh source-authority review found that exported produce_source_claim_receipt() had accepted a paraphrase claim independently of exact source_line_bytes. Test-only dbab4cdc150d4973002f8b61173282f7c7542725 established the exact-line contract; its hosted generation was cancelled by normal cancel-in-progress before test execution, so no hosted RED is claimed for that intermediate head. Production 440346ee73e60e87915bd3027a774e24d3ac5124 rejects multi-line/non-UTF-8 source bytes and requires claim equality with the decoded exact line. Edge head 920eb7be0c3f57c5f149328a08beddc13339a338 covers LF/CRLF/unterminated lines, paraphrase mismatch, embedded multi-line bytes and invalid UTF-8.

That edge head produced a real hosted reviewer RED: run 34190991526, job 101948849348 passed exact checkout, noema-core 100% line+branch coverage and 100% docstring gates, then the reviewer suite ended 1 failed / 721 passed at 100% coverage. The stale _source_bundle() fixture still paired the old runtime paraphrase with exact source bytes, so the new production invariant correctly rejected it. Causal repair 1cd8db5a94ed420bed8b52be0d3b3354f9fc86ab changed the fixture to the exact source claim while retaining the intended source-vs-execution kind-mismatch rejection.

Fresh review then surfaced one valid no-behavior-change finding: unused claim_evidence_runtime import in reviewer/tests/test_claim_evidence_publication_boundary.py. 809ccb78bfdf8f9785d4c74ab834159961cce6e9 removed only that unused import. The inline review thread is resolved/outdated.

A subsequent direct publisher-boundary review found a vacuous-oracle bypass: a model could return finding-free request_changes or blocked, skip receipt admission entirely, and publish a GitHub REQUEST_CHANGES review whose body claimed “No blocking findings.” RED 6629f07e2c7bd35698331d8966b7cbe35204a808 exercises both non-approval states through the real PydanticAI agent→CLI publisher seam. GREEN 4c2153702972e8d5c0f077ac79cc68cbf6da4bfb requires every model non-approval to contain producer-authenticated findings before deterministic gates or publication; deterministic strict/check/security/dependency blockers remain independently generated after admission. Current exact 860714cba46dba06260a5dce09d0e9152fcb0a8c also records the invariant in CHANGELOG.

Security/ruleset boundary

Protected AGENTS.md remains authoritative: Noema Security ruleset 18794436 targets ~DEFAULT_BRANCH. Feature-base stacked PRs may legitimately lack Security until retargeted to main; after this PR was retargeted, required Security materialized as intended. .github#2037 is the narrower central stacked-OpenCode source/live authority issue and is not a request to broaden Noema Security onto feature refs.

Claim-level contract

Remote RED 451683fbe38fb3711d151e61249fb9040560eab0 reproduced the original agent→CLI publication defect. The retained candidate separates producer receipt semantics from independent ClaimEvidenceRequirement publication authority. Raw current-head source receipts are context only. Source-only findings require exact producer-authenticated claim/evidence kind and coordinates; source receipt production itself requires exact claim-to-line identity. Requirement/receipt mismatch, wrong coordinates, paraphrase substitution, direct model dictionaries and context-to-finding promotion fail closed before deterministic gates and GitHub publication.

Current exact-head evidence

Exact 860714c... has a wholly fresh generation; predecessor evidence is non-authorizing. Current application CI 34197596549, reviewer-ci 34197596588, and required Security Scan 34197596536 are terminal SUCCESS on the unchanged head. patch-validator-image 34197596517, job 101968826382, is assigned to a GitHub-hosted runner and remains in Build exact-head patch-validator image; checkout, stale-head guard, Trivy, pinned Syft/Grype, dependency materialization and Buildx setup already succeeded. This is 3-GREEN, not four-GREEN. Local focused verification at the exact successor tree is 92 passed with 404 statements and 130 branches at 100%, public-doc 100%, compileall and git diff --check GREEN. Keep Draft until the image lane reaches terminal success, fresh review authority remains clean and protected ancestry is unchanged.

Central ContextualWisdomLab/.github#1641@b8c986e2406beb37d254acd4c5df6389038b55f2 retains the original Concept35 sentence and synonym RED. Completion after source integration still requires producer-authenticated execution stdout/stderr evidence, content-addressed research evidence, an immutable Noema release, then a released central consumer bump and unchanged original/synonym corpus RED→GREEN.

No release, consumer GREEN, current-head four-GREEN, self-approval, force update, provider bypass or gate weakening is claimed.

Summary by CodeRabbit

  • 새 기능

    • 검토 결과와 함께 주장을 뒷받침하는 증거 매니페스트 및 무결성 검증 정보를 생성합니다.
    • 검증된 증거만 검토 결과의 발견 사항에 인용할 수 있도록 지원합니다.
    • 소스 코드의 정확한 파일·줄 정보를 증거로 연결하고, 실행 및 연구 증거 유형도 구분합니다.
    • 증거의 만료 시간과 실행 정보를 확인해 부정확하거나 오래된 참조를 차단합니다.
  • 문서

    • 증거 기반 검토 및 게시 권한 규칙을 문서화했습니다.

@coderabbitai

coderabbitai Bot commented Sep 7, 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: cfbc868b-08ba-4a08-b950-220f5a638ff5

📥 Commits

Reviewing files that changed from the base of the PR and between 0dbfceb and 860714c.

📒 Files selected for processing (16)
  • .github/workflows/central-review.yml
  • CHANGELOG.md
  • reviewer/README.md
  • reviewer/noema_reviewer/__init__.py
  • reviewer/noema_reviewer/agent.py
  • reviewer/noema_reviewer/claim_evidence.py
  • reviewer/noema_reviewer/claim_evidence_reference.py
  • reviewer/noema_reviewer/claim_evidence_runtime.py
  • reviewer/noema_reviewer/cli.py
  • reviewer/noema_reviewer/sandboxed_verify_claim_evidence.py
  • reviewer/noema_reviewer/source_claim_evidence.py
  • reviewer/tests/test_claim_evidence_publication_boundary.py
  • reviewer/tests/test_claim_evidence_receipt.py
  • reviewer/tests/test_claim_evidence_reference.py
  • reviewer/tests/test_sandboxed_verify_claim_evidence.py
  • reviewer/tests/test_source_claim_evidence_producer.py

📝 Walkthrough

Walkthrough

claim-evidence 영수증과 canonical manifest 검증을 추가했다. 중앙 workflow는 manifest checksum과 Sigstore attestation을 생성한다. CLI와 리뷰 agent는 검증된 receipt만 prompt와 finding publication에 사용한다. source 및 sandboxed_verify producer와 관련 테스트도 추가했다.

Changes

Claim-evidence 검증 및 게시

Layer / File(s) Summary
영수증 및 manifest 계약
reviewer/noema_reviewer/claim_evidence.py
source, execution, research 영수증과 요구사항을 정의한다. canonical artifact, digest, identity, 시간, producer 정책을 검증한다.
신뢰된 producer 및 receipt reference
reviewer/noema_reviewer/source_claim_evidence.py, reviewer/noema_reviewer/sandboxed_verify_claim_evidence.py, reviewer/noema_reviewer/claim_evidence_reference.py
정확한 source line과 검토된 sandboxed_verify 결과를 영수증으로 변환한다. 표준 receipt reference를 검증된 index에 연결한다.
리뷰 runtime admission
reviewer/noema_reviewer/claim_evidence_runtime.py, reviewer/noema_reviewer/agent.py
현재 HEAD source manifest를 생성한다. finding 권한 receipt만 prompt와 verdict publication에 사용한다.
Workflow attestation 및 CLI handoff
.github/workflows/central-review.yml, reviewer/noema_reviewer/cli.py, reviewer/noema_reviewer/__init__.py, CHANGELOG.md, reviewer/README.md
claim manifest를 생성하고 checksum과 attestation을 검증한다. manifest identity를 CLI와 agent에 전달한다. 공개 API와 문서를 갱신한다.
게시 경계 및 실패-폐쇄 검증
reviewer/tests/*claim_evidence*.py
영수증, manifest, reference, source producer, sandboxed adapter, CLI, agent, publisher 경계를 검증한다. 잘못된 identity, kind, coordinate, 시간, canonical bytes를 거부한다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CentralReview
  participant ClaimEvidenceRuntime
  participant Sigstore
  participant ReviewerCLI
  participant ReviewAgent
  CentralReview->>ClaimEvidenceRuntime: 생성된 source claim manifest
  CentralReview->>Sigstore: manifest attestation 생성
  Sigstore-->>CentralReview: attestation bundle
  CentralReview->>ReviewerCLI: manifest와 실행 identity 전달
  ReviewerCLI->>Sigstore: attestation 검증
  ReviewerCLI->>ClaimEvidenceRuntime: manifest index 검증
  ReviewerCLI->>ReviewAgent: 검증된 claim-evidence index 바인딩
  ReviewAgent->>ClaimEvidenceRuntime: model verdict evidence admission
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/reviewer-claim-evidence-receipts-555

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.

Exact-head owner review for 2571d7f996161df32227a27fc66b502bbb1b5d31.

Blocking trust-boundary finding: admit_claim_evidence() validates a caller-supplied model/Pydantic payload and binds only shared identity, required kind, claim digest, artifact digest, and artifact size. It does not authenticate a producer envelope or bind the variant's semantic evidence fields to the exact artifact. With the same admitted claim/artifact bytes, an attacker can change ExecutionClaimReceipt.argv, exit_code, stdout_sha256, stderr_sha256, isolation_policy, or network_policy; likewise SourceClaimReceipt.source_path/source_line/source_line_sha256 and ResearchClaimReceipt.source_uri/source_revision/excerpt_sha256/retrieval_policy can be substituted while admission still succeeds. The current hostile tests mutate only shared identity/digest fields and therefore do not expose this.

The docstring and PR claim a “sealed/producer-issued” receipt, but the API accepts an arbitrary payload without verifying a trusted producer signature/MAC or looking up a trusted immutable manifest. Freezing a Pydantic model does not establish provenance. Add RED cases that keep the exact artifact fixed while mutating every meaning-bearing variant field, then make the publication boundary resolve a model-cited receipt ID from a trusted producer manifest/index (or verify an authenticated envelope that covers the complete canonical payload). The model must not submit the authoritative receipt dict. Extend the real producer → gate → finding/publication path with positive/negative integration tests; a standalone schema module alone does not close .github#1641 / Concept35.

This is an owner-side contract review, not approval, release evidence, or permission for the central consumer to proceed. Preserve the existing identity/digest hardening; the missing delta is complete producer-envelope binding and actual publication-boundary integration.

@seonghobae seonghobae added enhancement New feature or request type: feature New or expanded product capability labels Sep 7, 2026 — with ChatGPT Codex Connector

seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Read-only review follow-up on exact head 809aa6d1d0e429a44940f0978ae985c8295beaab:

  • Added fixed-artifact hostile cases that mutate every execution semantic field (argv/tool/version/exit/stdout/stderr/isolation/network), every research semantic field (URI/revision/excerpt/retrieval policy), and source coordinates while retaining prior artifact bytes.
  • Removed the API assumption that a caller-authenticated raw dictionary is already trusted. Only verify_claim_evidence_manifest() can construct the immutable admission index; it verifies the exact authenticated OpenCode-handoff digest, canonical envelope bytes, reviewed producer→kind policy, and repository/head/workflow/run/attempt before parsing receipts.
  • The untrusted model supplies only a receipt ID and exact claim text. Direct index construction, raw receipt dictionaries, noncanonical manifests/base64, stale/swapped identity, duplicate IDs, and semantic substitution fail closed.
  • Canonical execution/research/source producers now bind every meaning-bearing field; the source producer was added by the concurrent owner transaction without changing the verified envelope blobs.
  • Focused verification: 44 passed; 214 statements and 62 branches at 100%; 100% public-doc coverage; compile success.
  • The earlier brief duplicate-root-path mistake was removed in the same non-force history; the current PR diff stays in the canonical reviewer/ owner surface plus CHANGELOG and the gap baseline.

This is not completion of issue #555 or the Concept35 consumer finding. Existing sandboxed_verify/research adapter wiring, authenticated manifest population, actual agent → gate → publish admission, exact-head hosted CI, immutable release, and central released-consumer GREEN remain open. No second producer/kernel or provider/actor bypass was added.

seonghobae added a commit that referenced this pull request Sep 8, 2026
Require the documentation lane to reflect protected #558 integration, the newly converged #535 exact head, and the newly observed #556 stacked head before production baseline text is repaired.
seonghobae added a commit that referenced this pull request Sep 8, 2026
Bring #559's owned baseline in line with protected #558 integration, exact #535 convergence, and the newly observed #556 stack while preserving canonical owner boundaries and release-evidence discipline.
seonghobae added a commit that referenced this pull request Sep 8, 2026
Advance the documentation contract to the live #556 successor after its hosted release-test RED, while rejecting the superseded observation. Production baseline text follows in the causal repair commit.
seonghobae added a commit that referenced this pull request Sep 8, 2026
Update #559's sole documentation authority to the latest #556 exact head, preserve the observed hosted release-test failure as historical evidence, and keep the downstream stack non-authorizing until #535 reaches protected main.
Base automatically changed from fix/noema-orchestrator-free-routing-alias to main September 8, 2026 05:18
Preserve the valid #556 claim-evidence implementation and tests, adopt protected main as an ordinary second parent, and restore docs/product-technical-gap-baseline.md from protected source because #559 is its sole writer. No predecessor check or review evidence transfers.
Comment thread reviewer/tests/test_claim_evidence_publication_boundary.py Fixed

Copy link
Copy Markdown
Contributor Author

Fresh integration sweep: unchanged exact 860714cba46dba06260a5dce09d0e9152fcb0a8c now has terminal SUCCESS for application CI 34197596549, reviewer-ci 34197596588, required Security Scan 34197596536, and patch-validator-image 34197596517. All inline review threads are resolved/outdated. Protected main is still GitHub-verified 0dbfceb850cda3a016ceb39ae1c8a1a96a9f2ad5; compare is ahead-only (behind_by=0) with merge-base exactly that protected head. The earlier PR-body 3-GREEN sentence is superseded by this fresh exact-head evidence. Proceeding only by normal merge; release/central-consumer evidence remains separate.

@seonghobae
seonghobae marked this pull request as ready for review September 8, 2026 09:23
@seonghobae
seonghobae merged commit 36e5cf9 into main Sep 8, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the feat/reviewer-claim-evidence-receipts-555 branch September 8, 2026 09:23
seonghobae added a commit that referenced this pull request Sep 9, 2026
* test(docs): expose post-547 commercial authority drift

* test(docs): require current active commercial lanes

* docs: refresh commercial gap authority after #547

* test: advance patch-validator candidate authority

* test: reject superseded patch-validator candidate

* docs: refresh patch-validator exact authority

* test: require current #535 commercial authority

* docs: repair current commercial authority after hosted RED

* test(docs): require live post-558 commercial authority

Require the documentation lane to reflect protected #558 integration, the newly converged #535 exact head, and the newly observed #556 stacked head before production baseline text is repaired.

* docs(gap): repair post-558 live commercial authority

Bring #559's owned baseline in line with protected #558 integration, exact #535 convergence, and the newly observed #556 stack while preserving canonical owner boundaries and release-evidence discipline.

* test(docs): require latest observed #556 authority

Advance the documentation contract to the live #556 successor after its hosted release-test RED, while rejecting the superseded observation. Production baseline text follows in the causal repair commit.

* docs(gap): record live #556 successor and hosted RED

Update #559's sole documentation authority to the latest #556 exact head, preserve the observed hosted release-test failure as historical evidence, and keep the downstream stack non-authorizing until #535 reaches protected main.

* test(docs): require current #535 endpoint-repair authority

* docs: track current #535 gateway endpoint repair

* test(docs): require #535 coverage-repair authority

* docs: track #535 coverage-gate repair

* test(docs): require current central control-plane snapshot

* docs: refresh central control-plane snapshot

* test(docs): retire stale commercial authority assertions

* docs: refresh protected and claim-evidence authority

* test(docs): track protected #535 integration

* test(docs): track current claim-evidence head

* test(docs): bind post-535 protected authority

* test(docs): refresh current candidate contract

* test(docs): align claim-binding authority wording

* docs: refresh claim-evidence candidate authority

* test(docs): match hosted run authority casing

* docs: refresh live Noema commercial authority

* test(docs): track current Noema feature authority

* test(docs): bind commercial gap to live feature heads

* test(docs): require settled external-extension authority

* docs: converge commercial gap to current plugin admission

* test(docs): track active policy-approval RED

* docs: bind commercial gap to policy-approval RED

* docs: restore durable commercial gap owners

* docs: align external-extension authority after restack

* test: bind documentation authority to restacked #560

* test(d(docs): require complete gap authority schema

* docs: bind gap status to architecture authorities

* test(docs): reject stale tool-capability candidate

* docs: refresh current tool-capability evidence

* docs: refresh active extension authority

* docs: bind extension event chronology evidence

* docs: refresh extension chronology authority

* docs: bind gap baseline to hostile admission repair

* test(docs): bind live candidate to admission repair

* test(docs): preserve candidate ADR authority wording

* docs: refresh external-extension runtime-time authority

* test(docs): bind current runtime-time candidate authority

* test(docs): refresh live external-extension candidate authority

* docs: bind gap authority to invocation replay repair

* docs: converge on public replay authority repair

* docs: converge on activation revocation repair

* docs: converge on admission-bound invocation authority

* docs: bind commercial gap to exact admission provenance

* test(docs): require exact-admission candidate authority

* test(docs): bind candidate contract to exact admission

* docs: track crypto-provider RED authority

* test(docs): bind external-extension authority to Web Crypto repair

* docs: converge external-extension Web Crypto authority

* test(docs): follow current external-extension authority

* test(docs): assert public receipt binding authority

* test(docs): match activation revocation authority wording

* docs: converge baseline after #560 protected integration

* test: bind documentation authority to #560 integration

* test: treat external-extension admission as protected history

* test: extend protected integration history through #560

* test: move external-extension gap to lifecycle successor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Normal-priority or P2 work type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant