fix(data-integrity): reject impossible artifact-read status replay - #400
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Superseded by clean current-parent reconstruction #448. #448 is based on exact current ledger replacement #435 head |
Objective
Keep the append-only artifact read ledger fail-closed when persisted
READrecords contain an impossible HTTP status code. The current replay parser only checks thatstatus_codeis 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 head548f29f207618f13f7980b9500ddf9f9ecdbcafe.ArtifactLinkLedgerStatusCodeTestrequires persisted boundary values100and599to remain accepted and requires99and600to fail closed during replay. The parent parser currently usesInteger.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
ArtifactLinkLedgerpersistence 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 verifywith 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.