feat(lifecycle): add immutable artifact-deletion receipt foundation - #280
feat(lifecycle): add immutable artifact-deletion receipt foundation#280seonghobae wants to merge 8 commits into
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:
Comment |
|
@coderabbitai review @opencode-agent @cwl-noema-review Please independently review exact immutable receipt-foundation head |
|
|
|
Superseded by #282. Exact receipt implementation and test blobs are preserved, but #282 reconstructs RED |
|
Closing as superseded by clean-stack PR #282. #282 is based directly on the exact tenant-isolated parent snapshot |
Objective
Implement issue #263 Slice B as a bounded receipt-ledger foundation only. This Draft adds a standalone and file-backed
RECEIPT_V1state store for durable deletion intent and recovery evidence. It does not integrate HTTP deletion, artifact cleanup, scheduling, dependencies, or product status semantics; those remain in cleanup Slice C #279 and later product-status work.Exact current stack
Exact current head is
2c15cfbf85de33aa7ed72cdeb2dc9f8c8fd77943on immutable base branchstack/admin-endpoint-auth-v1snapshotd57f1aa8153aa092607a147c9587c683f009ea06.Fresh state:
3ba53ac843685e483fdd3f8f060ba61825b9a798;Test-first sequence
7e0c8f3da1f6d5063b6172da2c40b5b5ce41eb32defines deterministic receipt identity, replay, crash-tail, transition, failure, and coverage contracts.8448fdd98d4a6c58f4e5407fcfcce903785abaa8adds the versioned store, configuration, ADR, changelog, and deterministic tests.f1062d1de28a2304ec9a8e51ee4c774322b7fa2badds deterministic strict-replay coverage and the corresponding parser correction.1f4abb80fa18fe00f336dc0d7c656f90d5901ec7proves null and blank scoped lifecycle-event tenants cannot readbuyer-demoevents.2c15cfbf85de33aa7ed72cdeb2dc9f8c8fd77943makes that query fail closed while preserving explicit legacy demo behavior.Receipt contract
Each immutable identity binds deletion request ID, tenant, permanently reserved conversion-job ID, exact artifact SHA-256, privacy-safe audit correlation, and request time. Exact duplicates are idempotent; same-job identity conflicts fail closed.
The monotonic lifecycle is:
DELETION_REQUESTED → METADATA_TOMBSTONED → ARTIFACT_CLEANUP_PENDING → ARTIFACT_CLEANUP_COMPLETEDwith retry:
ARTIFACT_CLEANUP_PENDING → ARTIFACT_CLEANUP_FAILED → ARTIFACT_CLEANUP_PENDING.Completion is terminal. Transition time cannot reverse. Failure evidence is restricted to controlled
[a-z0-9_]{1,64}codes.Durability and replay boundary
RECEIPT_V1records are bounded to 16 KiB;FileChannel.force(true);Exact-head acceptance state
31101994051is currently in progress and is not passing until it completes successfully;Keep this PR Draft. Parent order remains #270 → #268 → this receipt foundation → cleanup Slice C #279. After parent integration, reconcile onto protected
main, confirm the effective diff and ancestry, and rerun every base-sensitive gate. Do not resolve #268's incomplete-cleanup finding from this foundation alone, weaken tests, infer approval from advisory status, bypass protections, or publish a release.