Skip to content

fix(acquisition): authenticate data-room manifest evidence - #69

Merged
seonghobae merged 177 commits into
mainfrom
fix/acquisition-manifest-integrity
Aug 17, 2026
Merged

fix(acquisition): authenticate data-room manifest evidence#69
seonghobae merged 177 commits into
mainfrom
fix/acquisition-manifest-integrity

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Purpose

Hardens Noema's acquisition data-room and transfer-readiness evidence so stored manifest booleans, mutable paths, Git worktree drift, path substitution, symlink redirection, parser ambiguity, or unbound legal/IP metadata cannot manufacture a buyer PASS. This PR does not choose an outbound license, manufacture legal/IP authority, or claim acquisition readiness.

Current exact source

  • Base branch: main.
  • Independently resolved protected/live main: f5c41fcbb55200e43445ad1c9be7dc5366df62bf.
  • Head branch: fix/acquisition-manifest-integrity.
  • Exact current head: 90501943fd5b1e493ae2255dcd5e1c46af144be7.
  • Fresh comparison: ahead 177 / behind 0 with merge base exactly f5c41fcbb55200e43445ad1c9be7dc5366df62bf.
  • Draft remains intentional until the unchanged exact head has terminal-success application CI, reviewer-ci, and eligible central Security Scan evidence and zero current valid findings.

Protected-main convergence repair

The stale acquisition branch was brought onto the current protected base without force-push or destructive rebase. During that ancestry repair, a two-parent merge commit initially retained the predecessor tree and shadowed #400 repository-locator paths. That semantic regression was detected by fresh protected-main comparison and repaired before this current lineage. The current head now descends directly from the exact protected base and its diff is confined to the acquisition lane plus the current-main JSON-integrity regression that this PR exercises.

Reconstructed acquisition-integrity core

The current head preserves protected-main package-manager/workflow/operations/evidence-parser controls while restoring the acquisition data-room integrity boundary:

  • exact protected-source identity and local Git object/worktree binding;
  • configuration-isolated, network-disabled Git preflight;
  • bounded index/tree inventory and tracked-byte verification;
  • skip-worktree / assume-unchanged, dirty index/worktree, filter/worktree redirection, unsupported Git modes and source movement fail-closed handling;
  • descriptor-safe, O_NOFOLLOW bounded evidence reads with path/descriptor identity checks;
  • parent/leaf symlink and non-directory output-path rejection;
  • private retained-output writes with single-link regular-file checks, 0600 descriptor permissions, identity revalidation and no unsafe early truncation;
  • manifest integrity recomputation rather than trusting stored passed, finalGatePassed, missing-list or digest claims;
  • exact 100% coverage scope for the acquisition integrity helpers;
  • realistic filesystem/Git regression tests and acquisition doctoring.

Transfer-rights boundary

The transfer validator requires explicit owner/legal decision evidence, digest-bound repository rights, exact-release SBOM/license/NOTICE/provenance/artifact-rights evidence, repository/tag/commit identity binding, OCI-license consistency, contributor ownership/assignment evidence, bounded stable reads, fatal UTF-8, and duplicate-decoded-key rejection. No outbound license or legal authority is inferred by this PR.

Exact-head CI RCA and repair

Predecessor exact head 09fb39a32051ac4cec8824d6e221bbdf93bfbfc4 had reviewer-ci and central Security Scan success but application CI 31976025877 failed in release verify. Exact check annotations identified four concrete test failures:

  1. test/acquisition-json-integrity-current-main.test.ts expected read_error for a directory while the hardened stable-reader contract correctly classified non-regular evidence as unsafe_or_unreadable.
  2. Two full CLI symlink-boundary tests exceeded Vitest's default 5-second test timeout even though each child process already has a fail-closed 30-second process timeout.
  3. The three-process owner-only output integration regression likewise exceeded the default 5-second Vitest timeout.

Repairs on the existing canonical branch:

  • 820711b814bc0a49497545a3311957b56c2856e3 aligns the non-regular filesystem fixture with the intentional fail-closed unsafe_or_unreadable classification and renames the test accordingly; malformed UTF-8 remains a separate invalid_utf8 class.
  • a5f70008139ed248ab1e5c6db3af3afcea2db44b gives the full entrypoint symlink integration tests an explicit bounded test budget consistent with their existing per-child 30-second process timeout; child timeout/error and exit-code assertions remain unchanged.
  • 90501943fd5b1e493ae2255dcd5e1c46af144be7 gives the three-entrypoint owner-only-mode integration regression a bounded 95-second test budget while retaining all per-process 30-second hard bounds, error assertions, exact exit-code checks, and permission assertions.

These changes do not loosen production security, coverage thresholds, or child-process timeout/fail-closed behavior; they prevent Vitest's generic 5-second unit-test budget from pre-empting intentionally full CLI integration checks under CI load.

Current exact-head evidence boundary

For exact head 90501943fd5b1e493ae2255dcd5e1c46af144be7:

  • application CI 31977452218: queued;
  • reviewer-ci 31977452206: queued;
  • central Security Scan 31977452212: queued;
  • current inline review threads: all resolved as last freshly checked;
  • historical COMMENTED reviews remain review history, not approval and not current-head passing evidence.

Queued evidence is non-passing. Predecessor success does not transfer.

Intentionally excluded stale/global claims

This reconstruction does not replay stale CI/reviewer workflow files or broad historical documentation over current protected truth. Real production KPI, production deployment/environment governance, release publication, revenue/pipeline, customer validation, and owner/legal/contributor-IP evidence remain separate protected-main/acquisition acceptance requirements.

No release, deployment, audit waiver, protection bypass, outbound-license choice, synthetic approval, or acquisition-ready claim is made.

Related: #3, #5, #27, #29, #40, #68.

Summary by CodeRabbit

  • 새 기능

    • 취득 데이터룸의 매니페스트, 증거 파일, Git 체크아웃, 릴리스 식별자를 오프라인에서 검증합니다.
    • 파일 변조, 경로 우회, 심볼릭 링크, 중복 JSON 키, 잘못된 영수증을 감지하고 실패 시 작업을 중단합니다.
    • 데이터룸 감사 및 안전한 매니페스트 생성을 지원하며 결과를 제한된 권한으로 저장합니다.
    • 라이선스·지식재산권 증거와 릴리스 아티팩트의 일치 여부를 readiness 감사에 반영합니다.
  • 문서

    • 데이터룸 무결성, Git 콘텐츠 인증, 출력 경로 보호 및 증거 검증 정책을 추가했습니다.
  • 검증

    • 릴리스 검증 및 감사 과정에 데이터룸 무결성 검사를 포함했습니다.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 455c85c7-7313-46b2-9c0d-7a013356d9eb

📥 Commits

Reviewing files that changed from the base of the PR and between f5c41fc and 9050194.

📒 Files selected for processing (38)
  • docs/acquisition-data-room-integrity.md
  • docs/acquisition-git-content-authentication.md
  • docs/doctoring/acquisition-data-room-integrity.md
  • docs/doctoring/acquisition-git-content-authentication.md
  • docs/doctoring/acquisition-git-worktree-binding.md
  • docs/doctoring/acquisition-output-path-integrity.md
  • docs/evidence-templates/artifact-rights-metadata.example.json
  • docs/evidence-templates/transfer-evidence.example.json
  • package.json
  • scripts/acquisition-data-room-integrity-audit.mjs
  • scripts/acquisition-data-room-manifest-secure.mjs
  • scripts/acquisition-data-room-manifest.mjs
  • scripts/acquisition-readiness-audit.mjs
  • scripts/lib/acquisition-data-room-integrity.mjs
  • scripts/lib/acquisition-git-preflight.mjs
  • scripts/lib/acquisition-private-output.mjs
  • test/acquisition-artifact-rights-json.test.ts
  • test/acquisition-data-room-external-path.test.ts
  • test/acquisition-data-room-git-binding.test.ts
  • test/acquisition-data-room-integrity-branches.test.ts
  • test/acquisition-data-room-integrity-coverage.test.ts
  • test/acquisition-data-room-integrity.test.ts
  • test/acquisition-git-content-hash.test.ts
  • test/acquisition-git-content-index.test.ts
  • test/acquisition-git-descriptor-bound.test.ts
  • test/acquisition-git-exact-tree-binding.test.ts
  • test/acquisition-git-filter-boundary.test.ts
  • test/acquisition-git-preflight.test.ts
  • test/acquisition-git-stat-cache.test.ts
  • test/acquisition-git-worktree-binding.test.ts
  • test/acquisition-json-integrity-current-main.test.ts
  • test/acquisition-output-symlink.test.ts
  • test/acquisition-private-output.test.ts
  • test/acquisition-readiness-audit.test.ts
  • test/acquisition-review-regressions.test.ts
  • test/acquisition-top-level-json.test.ts
  • test/acquisition-transfer-rights.test.ts
  • vitest.config.ts

📝 Walkthrough

Walkthrough

데이터룸 manifest와 retained evidence를 오프라인에서 재검증하는 무결성 모듈을 추가했다. Exact Git checkout, descriptor-safe 파일 처리, 외부 receipt 검증, 안전한 출력, readiness 및 transfer evidence 검증을 release 흐름에 연결했다.

Changes

취득 데이터룸 무결성

Layer / File(s) Summary
무결성 모델과 증거 재계산
scripts/lib/acquisition-data-room-integrity.mjs, test/acquisition-data-room-integrity*.test.ts, test/acquisition-review-regressions.test.ts, docs/acquisition-data-room-integrity.md
Catalog, manifest, receipt, bounded read, SHA-256, persisted gate 값을 검증하고 재계산한다.
Git checkout 사전 검증
scripts/lib/acquisition-git-preflight.mjs, test/acquisition-git-*.test.ts, docs/acquisition-git-content-authentication.md, docs/doctoring/acquisition-git-*
Exact commit, immutable tree, tracked bytes, index flags, worktree binding 및 Git 실행 환경을 검증한다.
안전한 생성 및 감사 진입점
scripts/acquisition-data-room-manifest*.mjs, scripts/acquisition-data-room-integrity-audit.mjs, scripts/lib/acquisition-private-output.mjs, package.json, test/acquisition-output-symlink.test.ts, test/acquisition-private-output.test.ts
Manifest와 audit 실행 전후 checkout을 재검증하고, symlink·hard link·비정규 파일을 차단하며 0600 출력 파일을 기록한다.
준비도 및 양도 증거 검증
scripts/acquisition-readiness-audit.mjs, test/acquisition-readiness-audit.test.ts, test/acquisition-transfer-rights.test.ts, test/acquisition-top-level-json.test.ts, docs/evidence-templates/*
Licensing/IP evidence, release artifact digest, OCI license metadata, 중복 JSON 키 및 안전한 evidence 경로를 검증한다.
운영 정책과 검증 근거
docs/doctoring/acquisition-data-room-integrity.md, docs/doctoring/acquisition-output-path-integrity.md, vitest.config.ts
무결성 경계, 출력 경로 정책, 독립 evidence plane 및 테스트 coverage 대상을 문서화한다.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.17% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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.
Title check ✅ Passed 제목은 acquisition 데이터룸 매니페스트 증거 인증이라는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ 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 fix/acquisition-manifest-integrity

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 review of e76d51ada7d7560dde87ca7ecb5cd42acc149178: one current trust-boundary finding remains actionable. This is not an approval.

The new manifest and audit entrypoints bind the report to git rev-parse HEAD, but they execute and hash the current working tree without proving tracked source/evidence bytes still equal that commit. A dirty checkout can therefore keep source.commitSha=<HEAD> while changing a tracked catalog file, tracked evidence document, scripts/acquisition-data-room-integrity-audit.mjs, or scripts/lib/acquisition-data-room-integrity.mjs; the resulting manifest/audit can still describe itself as exact-commit-bound even though the bytes being evaluated are not from that commit. The static import also loads the verifier before any checkout-integrity refusal could run.

Please add RED regressions that keep HEAD fixed while mutating tracked evidence/control files and prove both acquisition:manifest and acquisition:integrity fail closed. Then make the entrypoints authenticate the tracked checkout before evidence use (configuration-isolated Git, bounded output, no network), and load the verifier only after that preflight or otherwise bind verifier/catalog bytes to the exact Git object. Keep intentionally untracked retained acquisition artifacts usable; the requirement is that tracked source/control/evidence cannot drift while still being labeled as the exact audited commit. Document the trust root and preserve the existing offline final-audit boundary.

Preserve protected-main package-manager, workflow, operations, and newer evidence-parser behavior while replaying the bounded descriptor-safe data-room, Git preflight, and private-output core from PR #69. Keep exact-release rights and acquisition-readiness semantic merge as explicit remaining work instead of overwriting newer protected logic.
Reintroduce the realistic report-only acquisition audit regression suite for owner/legal rights, retained digest bindings, exact-release artifact metadata, package-license consistency, contributor IP evidence, and symlink-resistant retained paths. Current protected audit logic does not yet enforce these contracts, so this commit intentionally establishes the RED boundary before the semantic source merge.
Semantically merge the predecessor transfer-rights validator onto the current protected acquisition audit without regressing fatal UTF-8 or decoded duplicate-key rejection. Require owner/legal decision evidence, repository-rights digest binding, package-license consistency, exact-release SBOM/license/NOTICE/provenance and artifact-rights metadata, contributor IP evidence, and symlink-resistant bounded retained reads before transfer evidence can pass.
Add exact-release artifact-rights duplicate-key regression coverage and keep the protected top-level decoded duplicate-key contract executable after the transfer-rights semantic merge. These tests ensure acquisition licensing evidence cannot reintroduce last-key-wins ambiguity while preserving the newer protected JSON parser behavior.
Restore the end-to-end acquisition audit suite on the rebuilt branch so successful evidence must exercise production pilot, revenue, transfer-rights, saleable-readiness and data-room paths together, while placeholder, stale, missing and report-only evidence remains fail-closed or explicitly NOT_READY as designed.
Restore buyer/operator templates for transfer-rights and exact-release artifact-rights metadata using explicit replacement markers rather than invented legal decisions, license expressions, release identities, digests, or contributor-ownership evidence.
Restore the predecessor's resolved acquisition review regression suite on the rebuilt current-main lineage, covering bounded catalog shape, zero-byte retained evidence, read-bound handling, unsupported kinds, external receipt bounds, canonical paths, direct command materialization, isolated Git stat policy and owner-only retained-output modes.
Record the current protected main as the second parent without changing the already-converged acquisition tree. This repairs live-base ancestry after #400 while preserving the branch's acquisition-only semantic delta and avoids destructive history rewriting.
Restore the current protected-main repository-locator source, OpenAPI/schema contracts, doctoring, and coverage regressions that were unintentionally shadowed by the ancestry-only merge. Keep the acquisition-integrity tree delta while preserving #400 byte-for-byte on its nine owned paths.
@seonghobae
seonghobae marked this pull request as ready for review August 17, 2026 00:08
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@seonghobae
seonghobae merged commit 56fde18 into main Aug 17, 2026
15 of 16 checks passed
@seonghobae
seonghobae deleted the fix/acquisition-manifest-integrity branch August 17, 2026 00:08
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