Repository navigation
test(worker): await terminal retry completion before asserting - #454
seonghobae wants to merge 5 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough비동기 재시도 테스트가 재시도 횟수와 변환 작업의 Changes변환 재시도 검증
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This localized test-only change removes an asynchronous assertion race without changing production behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@opencode-agent review Review exact head Review read-only; preserve independent reviewer identity. Do not mutate the branch, synthesize author approval, weaken protection, or merge. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected_head='23ba9a34e24d62de7974a6e1707dc53f6f69b4ac'
base='eb0a32e87e7470469c8fa0f8c67d9583654bef57'
repo='ContextualWisdomLab/clearfolio'
pr='454'
echo '== Checked-out commit =='
git rev-parse HEAD
git status --short
echo '== Commit identity =='
git show -s --format='%H%n%P%n%s' "$expected_head"
echo '== Changed paths and diff check =='
git diff --name-status "$base" "$expected_head"
git diff --check "$base" "$expected_head"
echo '== Exact diff =='
git diff --no-ext-diff --unified=80 "$base" "$expected_head" -- src/test/java/com/clearfolio/viewer/service/DefaultConversionWorkerTest.java
echo '== Test file outline =='
ast-grep outline src/test/java/com/clearfolio/viewer/service/DefaultConversionWorkerTest.java --items all --view expanded
echo '== Retry test and synchronization usages =='
rg -n -C 12 -e 'workerReschedulesWhenRetryAtIsInTheFuture' -e '\bawait\b' -e 'Thread\.sleep|TimeUnit\..*sleep' src/test/java/com/clearfolio/viewer/service/DefaultConversionWorkerTest.java
echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" --json number,headRefOid,baseRefOid,changedFiles,mergeStateStatus,reviewDecision,statusCheckRollup,reviews
echo '== Review threads =='
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
isOutdated
path
line
comments(first: 20) {
nodes { author { login } body url }
}
}
}
}
}
}'Length of output: 29071
Finding: Add: assertNull(job.getRetryAt());The new The exact-head diff changes one test file only. You are interacting with an AI system. |
|
Exact-current-head independent review request for CI, Security Scan, SAST Semgrep, and fuzz are terminal-success; unresolved inline review threads are zero. The change is test synchronization only and leaves production behavior unchanged. @opencode-agent review Review this exact head read-only. Do not mutate the branch, synthesize author approval, weaken protection, or merge. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head='23ba9a34e24d62de7974a6e1707dc53f6f69b4ac'
base='eb0a32e87e7470469c8fa0f8c67d9583654bef57'
repo='ContextualWisdomLab/clearfolio'
pr='454'
file='src/test/java/com/clearfolio/viewer/service/DefaultConversionWorkerTest.java'
echo '== Exact commit =='
git rev-parse HEAD
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base-is-ancestor=yes'
echo '== Changed paths and whitespace =='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
echo '== Target file diff =='
git diff --no-ext-diff --unified=100 "$base" "$head" -- "$file"
echo '== Target file structure =='
ast-grep outline "$file" --items all --view expanded
echo '== Retry test, await predicates, assertions, and sleep references =='
rg -n -C 15 \
-e 'workerReschedulesWhenRetryAtIsInTheFuture' \
-e '\bawait\b' \
-e 'assert(Equals|Null|That)' \
-e 'Thread\.sleep|TimeUnit\..*sleep' \
"$file"
echo '== PR metadata and check status =='
gh pr view "$pr" --repo "$repo" \
--json number,headRefOid,baseRefOid,changedFiles,mergeStateStatus,reviewDecision,statusCheckRollup \
--jq '{number,headRefOid,baseRefOid,changedFiles,mergeStateStatus,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,conclusion,status}]}'
echo '== Review thread counts =='
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 isOutdated path line }
}
}
}
}' --jq '
[.data.repository.pullRequest.reviewThreads.nodes[]] as $t |
{
total: ($t|length),
unresolved: ([$t[]|select(.isResolved|not)]|length),
unresolvedCurrent: ([$t[]|select((.isResolved|not) and (.isOutdated|not))]|length),
unresolvedCurrentThreads: [$t[]|select((.isResolved|not) and (.isOutdated|not))|{path,line}]
}'Length of output: 52176
Finding — Add this assertion after the success-state assertion: assertNull(job.getRetryAt());The new The diff changes one test file only.
|
|
Exact-current-head independent review request for Freshly rechecked: CI, Security Scan, SAST Semgrep, and fuzz are terminal-success; mergeable is true; unresolved inline review threads are zero. This is a one-file test-synchronization repair with no production-code change. Review this exact head only; predecessor evidence does not transfer. @coderabbitai review |
Rate Limit Exceeded
|
There was a problem hiding this comment.
Review: race wait is correct; indent before merge
Exact head 23ba9a34 changes one wait in workerReschedulesWhenRetryAtIsInTheFuture. Waiting for both attempts.get() >= 1 and ConversionJobStatus.SUCCEEDED matches the following assertions and closes the window where the converter has started but the job object is not terminal yet. Hosted checks on this SHA are already green.
The await(...) call itself is smashed to the left. Restore the surrounding indentation so this stays a one-line contract change. Do not expand the PR. After that indent-only follow-up, this is mergeable as a test-only race repair.
This is a source review of the one-file diff. CodeRabbit CLI cannot authenticate in this environment.
Sent by Cursor Automation: Fix Issues
|
Queued @opencode-agent ; Already queued @cwl-noema-review on this exact request for PR #454 at head |
|
Queued @opencode-agent ; Already queued @cwl-noema-review on this exact request for PR #454 at head |
|
Queued @opencode-agent ; Already queued @cwl-noema-review on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
1 similar comment
|
Already queued @cwl-noema-review and @opencode-agent on this exact request for PR #454 at head |
|
Exact-head admission 감사: |
Current authority — exact head
|
Late Security RED / state-race authority — exact head
|
Causal-owner correction — exact head unchangedThe shared Jackson repair is owned by canonical clearfolio #503 at exact head |


Objective
Remove a deterministic asynchronous test race that can fail otherwise-correct worker and delivery-receipt PRs. The retry test previously unblocked as soon as the conversion task incremented its attempt counter, but
DefaultConversionWorkerpublishesSUCCEEDEDonly after that converter call returns and the state store completes its terminal transition.Exact test-first repair
eb0a32e87e7470469c8fa0f8c67d9583654bef57;b3c0f9cfe218a35e05e0cb8b0dc675e5fa84568f;src/test/java/com/clearfolio/viewer/service/DefaultConversionWorkerTest.javaonly;23ba9a34e24d62de7974a6e1707dc53f6f69b4acand one-shot run31879285024are historical evidence only and do not satisfy this head's merge gate;b3c0f9cfe218a35e05e0cb8b0dc675e5fa84568f;Contract
workerReschedulesWhenRetryAtIsInTheFuturewaits until both the converter has executed once and the observed job state isSUCCEEDED. Assertions still require exactly one converter call, one attempt, terminal success, cleared retry time, and the expected converted resource path. Production behavior is unchanged.Scope boundary
Test synchronization and formatting only. This does not weaken timeouts, add sleeps, retry assertions after failure, modify worker/state-store code, change scheduling, or alter delivery-receipt semantics.
Current exact-head evidence
For
b3c0f9cfe218a35e05e0cb8b0dc675e5fa84568f:36932516790: success;36932516908: success;36932516789: success;36932516728: failure;36932516797: skipped because it was emitted while the PR was Draft; it is not terminal validation evidence;Security job
110605161686verified the exact checkout and emitted five fixablejackson-databindfindings atpom.xml:151: HIGHCVE-2026-68497,CVE-2026-91776,CVE-2026-91777; MEDIUMCVE-2026-19032,CVE-2026-83557. SARIF upload succeeded. The canonical causal shared-base repair is clearfolio #503 at exact headbf121dffff24e771739f50b9e2cc7961459670a2.This late terminal RED conflicts with the earlier Ready transition. Concurrency authority forbids toggling the same exact head twice in one run, so the current state is preserved and the race is recorded. HOLD merge until #503 integrates, this branch reconciles non-destructively, and a new exact head receives fresh Checks and review.
Dependency outcome
PR #373 failed only because this shared test observed
PROCESSINGbetween converter execution and terminal publication. After this repair reaches protectedmain, #373 must update to the new exact base and regenerate all checks/reviews; predecessor evidence does not transfer.Merge gate
HOLD merge. Do not merge this Ready-state head: its exact Security gate is RED. Preserve the branch until clearfolio #503 integrates, then reconcile non-destructively to a new exact head and require fresh CI, Security Scan, SAST Semgrep, fuzz, CodeQL/central terminal evidence, zero valid unresolved findings, and qualifying independent non-author approval. No second same-head state toggle, bypass, Force Push, synthetic evidence, or blind rerun is authorized.
Summary by CodeRabbit