Skip to content

feat(lifecycle): define durable deletion state vocabulary - #351

Open
seonghobae wants to merge 6 commits into
mainfrom
feat/deletion-lifecycle-state-main-20260811
Open

feat(lifecycle): define durable deletion state vocabulary#351
seonghobae wants to merge 6 commits into
mainfrom
feat/deletion-lifecycle-state-main-20260811

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Objective

Advance issue #263 with the bounded durable deletion lifecycle vocabulary required by later receipt, recovery, and UI work.

Exact current-head evidence

  • protected base: eb0a32e87e7470469c8fa0f8c67d9583654bef57;
  • exact head: 7ae9b5e6f9df581093d29ee816de64a3d843063c;
  • changed paths: ArtifactDeletionState.java and its focused regression only;
  • CI, Security Scan, SAST Semgrep, and fuzz: terminal-success;
  • mergeable: true;
  • unresolved inline findings: zero.

Lifecycle contract

The closed state vocabulary contains exactly DELETION_REQUESTED, METADATA_TOMBSTONED, ARTIFACT_CLEANUP_PENDING, ARTIFACT_CLEANUP_COMPLETED, and ARTIFACT_CLEANUP_FAILED, preserving distinct metadata and physical-cleanup outcomes for durable recovery.

Scope boundary

Enum and regression only. This does not persist receipts, implement transitions/coordinators, mutate artifacts, expose APIs/UI, or complete deletion recovery. Issue #263 remains open.

Merge gate

Keep this exact head unchanged. Auto-merge may act only after live required checks remain terminal-success, zero valid unresolved findings remain, and a qualifying independent non-author approval is attached to this exact head.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e3281153-f9cd-4410-92be-cd86284cdada

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2c78400a-160b-45f5-91f5-b2756dffdb16

📥 Commits

Reviewing files that changed from the base of the PR and between b66b692 and 49d78ab.

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

📝 Walkthrough

Walkthrough

Artifact 삭제 영수증의 다섯 가지 영속 상태를 정의했습니다. 상태 선언 순서와 valueOf() 역조회를 검증하는 JUnit 테스트를 추가했습니다.

Changes

Artifact 삭제 수명 주기

Layer / File(s) Summary
삭제 상태 계약 및 검증
src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java, src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java
삭제 요청, 메타데이터 tombstone, 정리 대기, 정리 완료, 정리 실패 상태를 추가했습니다. 상태의 선언 순서와 name() 기반 valueOf() 역조회를 테스트합니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 영속적인 artifact 삭제 수명 주기 상태 어휘를 정의하는 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ 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 feat/deletion-lifecycle-state-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.

Copy link
Copy Markdown
Collaborator Author

@opencode-agent review
@coderabbitai review
@cwl-noema-review review
@strix review

Review exact head 7ae9b5e6f9df581093d29ee816de64a3d843063c only. Exact-head CI, Security Scan, SAST Semgrep, and fuzz are terminal-success; unresolved inline findings are zero. Validate the exact closed deletion-state vocabulary and its separation of tombstoning, pending cleanup, completion, and failure.

Review read-only; preserve independent reviewer identity. Do not wire transitions or persistence, mutate the branch, synthesize author approval, weaken protection, or merge.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected='7ae9b5e6f9df581093d29ee816de64a3d843063c'
actual="$(git rev-parse HEAD)"
printf 'HEAD=%s\nEXPECTED=%s\n' "$actual" "$expected"
test "$actual" = "$expected"

printf '\n== Changed files and full diff against first parent ==\n'
git diff --no-ext-diff --unified=80 "${expected}^" "$expected" -- \
  src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java \
  src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== Lifecycle package map ==\n'
ast-grep outline src/main/java/com/clearfolio/viewer/lifecycle --items all --type class,enum,interface 2>/dev/null || true

printf '\n== Production enum ==\n'
cat -n src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java

printf '\n== Focused regression test ==\n'
cat -n src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== References to ArtifactDeletionState ==\n'
rg -n -C 3 '\bArtifactDeletionState\b' src || true

printf '\n== Pull request checks and review-thread status ==\n'
gh pr view 351 --repo ContextualWisdomLab/clearfolio \
  --json headRefOid,statusCheckRollup,reviewThreads \
  --jq '{headRefOid, checks: [.statusCheckRollup[] | {name, status, conclusion}], reviewThreads: [.reviewThreads[] | {isResolved, path, line}]}'

Length of output: 7797


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/clearfolio'
pr=351
head='7ae9b5e6f9df581093d29ee816de64a3d843063c'

printf '== Worktree state ==\n'
git status --short
printf '\n== Commit and parent(s) ==\n'
git show --no-ext-diff --no-patch --format=fuller "$head"
printf '\n== Files changed by the exact commit ==\n'
git diff-tree --no-commit-id --name-status -r "$head"
printf '\n== Exact commit patch ==\n'
git show --no-ext-diff --format=fuller --find-renames "$head" -- \
  src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java \
  src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== Pull request files ==\n'
gh api "repos/$repo/pulls/$pr/files?per_page=100" \
  --jq '.[] | "\(.filename)\t+\(.additions)/-\(.deletions)\t\(.status)"'

printf '\n== Pull request head, checks, and review decision ==\n'
gh pr view "$pr" --repo "$repo" --json headRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid, reviewDecision, checks: [.statusCheckRollup[] | {name, status, conclusion, detailsUrl}]}'

printf '\n== Review-thread resolution state ==\n'
gh api graphql \
  -F owner='ContextualWisdomLab' \
  -F name='clearfolio' \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes { isResolved path line comments(first: 1) { nodes { author { login } body } } }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes |
    {total: length, unresolved: ([.[] | select(.isResolved | not)] | length),
     threads: [.[] | {isResolved, path, line, author: .comments.nodes[0].author.login}]}'

Length of output: 8848


@seonghobae Review complete for exact head 7ae9b5e6f9df581093d29ee816de64a3d843063c.

No findings.

The closed ArtifactDeletionState enum defines exactly the required five states. It separates metadata tombstoning from artifact cleanup pending, completion, and failure. The regression test verifies the exact vocabulary and declaration order.

The working tree was clean. The PR has zero review threads and zero unresolved threads. Maven test, Semgrep SAST, fuzz tests, and the reported security checks succeeded for the requested head.

⚠️ Action not completed

No files to review.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Collaborator Author

Exact-current-head independent review request for 7ae9b5e6f9df581093d29ee816de64a3d843063c over protected main eb0a32e87e7470469c8fa0f8c67d9583654bef57.

The two-file deletion-lifecycle vocabulary is mergeable; CI, Security Scan, SAST Semgrep, and fuzz are terminal-success; unresolved inline findings are zero. It preserves distinct durable request, metadata-tombstone, physical-cleanup pending, completed, and failed outcomes without claiming persistence or coordinator integration.

@opencode-agent review
@coderabbitai review
@cwl-noema-review review
@strix review

Review this exact head read-only. Do not mutate the branch, synthesize author approval, weaken protection, or merge.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/clearfolio'
pr='351'
head='7ae9b5e6f9df581093d29ee816de64a3d843063c'
base='eb0a32e87e7470469c8fa0f8c67d9583654bef57'

printf '== Exact commits ==\n'
printf 'HEAD=%s\n' "$(git rev-parse HEAD)"
printf 'REQUESTED_HEAD=%s\nREQUESTED_BASE=%s\n' "$head" "$base"
test "$(git rev-parse HEAD)" = "$head"
test "$(git rev-parse "$base")" = "$base"

printf '\n== Changes from requested base to requested head ==\n'
git diff --no-ext-diff --name-status "$base" "$head"
git diff --no-ext-diff --unified=60 "$base" "$head" -- \
  src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java \
  src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== Lifecycle package outline ==\n'
ast-grep outline src/main/java/com/clearfolio/viewer/lifecycle --items all --type enum,class,interface 2>/dev/null || true

printf '\n== Production enum ==\n'
cat -n src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java

printf '\n== Regression test ==\n'
cat -n src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== References ==\n'
rg -n -C 2 '\bArtifactDeletionState\b' src || true

printf '\n== Pull request head, checks, and review threads ==\n'
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,statusCheckRollup \
  --jq '{headRefOid, checks: [.statusCheckRollup[] | {name, status, conclusion}]}'

gh api graphql \
  -F owner='ContextualWisdomLab' \
  -F name='clearfolio' \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes { isResolved path line }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes |
    {total: length, unresolved: ([.[] | select(.isResolved | not)] | length)}'

Length of output: 12540


@seonghobae Review complete for exact head 7ae9b5e6f9df581093d29ee816de64a3d843063c against main commit eb0a32e87e7470469c8fa0f8c67d9583654bef57.

No findings.

The diff contains only the production enum and its focused regression test. ArtifactDeletionState defines exactly the requested five-state vocabulary. It keeps METADATA_TOMBSTONED distinct from ARTIFACT_CLEANUP_PENDING, ARTIFACT_CLEANUP_COMPLETED, and ARTIFACT_CLEANUP_FAILED.

The test verifies the exact closed set, declaration order, and enum name lookup. The change does not add persistence, transitions, coordinator integration, or deletion APIs.

The requested head matches the checked-out commit. The PR has zero review threads and zero unresolved threads. Maven, Semgrep, fuzz, CodeQL, dependency review, Trivy, and OSV checks report success.

You are interacting with an AI system.

Copy link
Copy Markdown
Collaborator Author

Exact-current-head independent review request for 7ae9b5e6f9df581093d29ee816de64a3d843063c over protected main eb0a32e87e7470469c8fa0f8c67d9583654bef57.

Freshly rechecked: CI, Security Scan, SAST Semgrep, and fuzz are terminal-success; mergeable is true; unresolved inline review threads are zero. This two-file slice defines only the closed durable-deletion state vocabulary; it does not claim persistence or lifecycle coordination. Review this exact head only.

@coderabbitai review
@opencode-agent review
@cwl-noema-review review
@strix review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/clearfolio'
pr='351'
head='7ae9b5e6f9df581093d29ee816de64a3d843063c'
base='eb0a32e87e7470469c8fa0f8c67d9583654bef57'

printf '== Commit verification ==\n'
printf 'checked_out_head=%s\n' "$(git rev-parse HEAD)"
printf 'requested_head=%s\nrequested_base=%s\n' "$head" "$base"
test "$(git rev-parse HEAD)" = "$head"
test "$(git rev-parse "$base")" = "$base"

printf '\n== Changed files: requested base to requested head ==\n'
git diff --no-ext-diff --name-status "$base" "$head"
printf '\n== Diff ==\n'
git diff --no-ext-diff --unified=80 "$base" "$head" -- \
  src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java \
  src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== Lifecycle package outline ==\n'
ast-grep outline src/main/java/com/clearfolio/viewer/lifecycle \
  --items all --type enum,class,interface 2>/dev/null || true

printf '\n== Production enum ==\n'
cat -n src/main/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionState.java
printf '\n== Focused test ==\n'
cat -n src/test/java/com/clearfolio/viewer/lifecycle/ArtifactDeletionStateTest.java

printf '\n== References to the production enum ==\n'
rg -n -C 3 '\bArtifactDeletionState\b' src || true

printf '\n== Pull request head, merge status, and checks ==\n'
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,mergeable,mergeStateStatus,statusCheckRollup \
  --jq '{headRefOid, mergeable, mergeStateStatus,
         checks: [.statusCheckRollup[] | {name, status, conclusion}]}'

printf '\n== Review thread status ==\n'
gh api graphql \
  -F owner='ContextualWisdomLab' \
  -F name='clearfolio' \
  -F number="$pr" \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes { isResolved path line }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes |
         {total: length, unresolved: ([.[] | select(.isResolved | not)] | length)}'

Length of output: 13241


@seonghobae Review complete for exact head 7ae9b5e6f9df581093d29ee816de64a3d843063c against main commit eb0a32e87e7470469c8fa0f8c67d9583654bef57.

No findings.

The diff adds only ArtifactDeletionState and its focused regression test. The enum defines exactly the five required states. It keeps METADATA_TOMBSTONED separate from ARTIFACT_CLEANUP_PENDING, ARTIFACT_CLEANUP_COMPLETED, and ARTIFACT_CLEANUP_FAILED.

The test verifies the exact closed set, declaration order, and valueOf lookup. No production reference adds persistence, transition logic, or lifecycle coordination.

GitHub reports zero review threads and zero unresolved threads. Maven, Semgrep, security scans, and fuzz checks report success for the requested head. GitHub reports the pull request as mergeable. The merge-state status remains BLOCKED, which is consistent with repository protection or other merge gating.

You are interacting with an AI system.

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