Skip to content

fix(data-integrity): reject impossible artifact-read status replay - #400

Closed
seonghobae wants to merge 2 commits into
fix/artifact-ledger-fail-closed-main-20260811from
fix/artifact-read-status-replay-20260812
Closed

fix(data-integrity): reject impossible artifact-read status replay#400
seonghobae wants to merge 2 commits into
fix/artifact-ledger-fail-closed-main-20260811from
fix/artifact-read-status-replay-20260812

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

Objective

Keep the append-only artifact read ledger fail-closed when persisted READ records contain an impossible HTTP status code. The current replay parser only checks that status_code is an integer, so values outside the HTTP three-digit response range can be admitted as durable audit evidence.

Test-first state

This stacked Draft starts intentionally RED at exact test-only head fe7b85b7e435098af40104ddb0f761729efce322, based on parent #357 exact head 548f29f207618f13f7980b9500ddf9f9ecdbcafe. ArtifactLinkLedgerStatusCodeTest requires persisted boundary values 100 and 599 to remain accepted and requires 99 and 600 to fail closed during replay. The parent parser currently uses Integer.parseInt(...) without range validation, so the invalid-boundary assertions are expected to fail.

Scope and dependency

This child is deliberately stacked on #357 because that parent owns ArtifactLinkLedger persistence ordering and integrity. This PR adds only the persisted HTTP-status invariant and focused regression. It does not move #357, alter token verification, artifact delivery, tenant authority, revocation semantics, or durable storage design.

Acceptance

Observe exact-head RED -> smallest parser invariant -> exact-head mvn -B --no-transfer-progress verify with zero failures/errors/skips, exact owned-production coverage and warning-free public Javadocs -> emitted CI/fuzz evidence on the stacked head. Keep Draft while #357 remains open. After #357 integrates, reconcile this unique delta onto the new protected base and regenerate all main-targeted security/review evidence before final merge. Independent non-author approval remains a separate protected-merge gate.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d82c8024-ab5e-452d-afe7-2b53fe3c7557

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Copy link
Copy Markdown
Collaborator Author

Superseded by clean current-parent reconstruction #448. #448 is based on exact current ledger replacement #435 head 777cd3c722fe6c3ad27bfb45d981aea86444606e, begins with test-only RED commit 4411272e3f19ec6b70fc1535c2ce225013b03b2e, and restores this PR's two-file HTTP status replay invariant without importing obsolete #357 ancestry. Exact GREEN candidate head is 9c9edb212260e0ea6f1de89eb2b3b4e3c2a5722b; child checks are being regenerated. Closing this stale stacked PR prevents ambiguous parent lineage and duplicate review. No predecessor check or approval evidence transfers.

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