Skip to content

fix(lifecycle): bind deletion receipts to immutable identity - #353

Open
seonghobae wants to merge 4 commits into
mainfrom
fix/deletion-receipt-identity-main-20260811
Open

fix(lifecycle): bind deletion receipts to immutable identity#353
seonghobae wants to merge 4 commits into
mainfrom
fix/deletion-receipt-identity-main-20260811

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Objective

Advance issue #263 with a clean protected-main lifecycle foundation: future durable deletion receipts need one immutable tenant/job/request/artifact/audit identity that cannot accept blank authority or a non-canonical artifact digest.

Test-first state

This Draft starts intentionally RED at exact test-only head 08c1abac4333a265da8941d7496b4bf40b269aa6. ArtifactDeletionReceiptIdentityTest requires a bounded immutable identity record with canonical lowercase SHA-256 artifact binding, normalized nonblank tenant/audit identifiers, and required request/job/time authority. Protected main does not contain the production type, so Maven test compilation is expected to fail until the narrow value object is added.

Scope

Two-file lifecycle identity slice only. It does not implement receipt persistence, deletion state transitions, cleanup/retry, artifact-store mutation, admin APIs, UI, distributed locking, or canonical documentation. It is path-disjoint from #350/#351 and does not copy stale #268 ancestry.

Acceptance

Observe exact-head RED -> add only the production identity record -> exact-head mvn -B --no-transfer-progress verify with zero missed owned production coverage and warning-free public Javadocs -> CI/Security Scan/SAST/fuzz -> current reviews/threads/base refetch. Keep Draft until GREEN exact-head evidence exists; independent write-authorized approval remains a separate merge gate.

Summary by CodeRabbit

  • 새 기능

    • 아티팩트 삭제 영수증 식별 정보를 안전하게 관리하는 불변 식별자를 추가했습니다.
    • 요청·테넌트·작업·감사 정보, 체크섬 및 요청 시각을 검증하고 표준화합니다.
  • 테스트

    • 필수값, 공백 및 길이 제한, SHA-256 체크섬 형식 검증을 추가했습니다.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c4ae2cd-5efa-42a6-809b-5e9c8c3b9ef5

📥 Commits

Reviewing files that changed from the base of the PR and between 2213c60 and e85a177.

📒 Files selected for processing (2)
  • src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentity.java
  • src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentityTest.java
📝 Walkthrough

Walkthrough

삭제 영속성 요청의 식별 정보를 담는 불변 record를 추가했다. 필수값, 텍스트 정규화와 길이, lowercase SHA-256 형식을 검증한다. 생성 결과와 예외 조건을 JUnit 테스트로 검증한다.

Changes

삭제 영속성 식별자

Layer / File(s) Summary
식별자 record 및 입력 검증
src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentity.java
ArtifactDeletionReceiptIdentity public record가 요청 ID, 테넌트 ID, 작업 ID, 체크섬, 감사 상관관계 ID, 요청 시각을 보유한다. 생성 시 필수값, trim 정규화, 텍스트 길이, lowercase 64자리 SHA-256 형식을 검증한다.
식별자 검증 테스트
src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentityTest.java
값 보존과 trim 동작을 검증한다. null, 공백, 길이 초과, 대문자 및 잘못된 길이의 체크섬에 대한 예외와 메시지를 검증한다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 불변 삭제 영수증 식별자를 추가하는 변경의 주요 목적을 정확하고 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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/deletion-receipt-identity-main-20260811

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 marked this pull request as ready for review August 10, 2026 18:44
@seonghobae
seonghobae enabled auto-merge (squash) August 10, 2026 18:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentity.java`:
- Around line 51-57: Update requireSha256 in ArtifactDeletionReceiptIdentity to
validate the original artifactChecksum without stripping whitespace, while still
rejecting null, blank, and any value that is not exactly a 64-character
lowercase SHA-256 digest. Add a regression case to
ArtifactDeletionReceiptIdentityTest asserting that leading or trailing
whitespace causes validation to fail.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 66fc97c8-16f9-4ef4-9fb0-51bafcd4f693

📥 Commits

Reviewing files that changed from the base of the PR and between 55d7ae8 and 2213c60.

📒 Files selected for processing (2)
  • src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentity.java
  • src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionReceiptIdentityTest.java

@opencode-agent
opencode-agent Bot disabled auto-merge August 10, 2026 18:54
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