Skip to content

feat(etl): execute durable jobs with lease fencing - #122

Closed
seonghobae wants to merge 97 commits into
ci/hourly-opencode-nvidia-nimfrom
feat/durable-job-lease-worker
Closed

feat(etl): execute durable jobs with lease fencing#122
seonghobae wants to merge 97 commits into
ci/hourly-opencode-nvidia-nimfrom
feat/durable-job-lease-worker

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Stack dependency and current repair state

This pull request is stacked on PR #121 through base branch ci/hourly-opencode-nvidia-nim.

The durable-worker branch was reconciled non-destructively with PR #121 head b24bed946d3da2e62d89ded828d877dac2f3c65c:

  • merge commit fc54e7f4fbe9fd4867aa8ca81e5d87481edd437b preserved the complete former worker head 2516c3f945df8fee7ad451319a20b63dd28fb3d8 as first parent and that predecessor as second parent;
  • follow-up commit 05f0ec8ea3cdc715747966812462516d7b85c94e resolved CHANGELOG.md additively;
  • no force push, ours/theirs shortcut, discarded implementation, rewritten test evidence, or temporary repair workflow was used.

PR #121 subsequently advanced to 077340a62e267f3dfbe05099b137bec57c11a5ae with a new fail-first Dependency Review exact-ref contract. This head does not yet descend from that exact current predecessor. Stop stack progression here until PR #121 completes its red-green repair and available exact-head CI, Dependency Review, CycloneDX SBOM, and commit-status gates pass. Then reconcile this branch again through another auditable non-forced merge preserving both current histories.

All checks, reviews, approvals, statuses, and thread conclusions from 05f0ec8ea3cdc715747966812462516d7b85c94e, 2516c3f945df8fee7ad451319a20b63dd28fb3d8, or an older predecessor are stale and do not transfer to the next repaired head.

Closes #120.

Product gap and bounded implementation

Durable intake previously left asynchronous ETL jobs permanently PENDING. This slice adds PostgreSQL-owned claim distribution and exact lease fencing:

  • oldest-eligible PENDING or expired RUNNING claims through FOR UPDATE SKIP LOCKED;
  • per-claim UUID fencing, safe process ownership, database-derived expiry, and bounded persisted attempts;
  • exact-live-lease predicates for retry, terminal failure, and terminal success;
  • atomic target writes, response-ledger replay or creation, and SUCCEEDED transition;
  • stale or expired lease rollback of target, ledger, and lifecycle effects;
  • terminal payload clearing, stable non-sensitive failure codes, and finite-cardinality worker telemetry;
  • independently disabled-by-default intake and execution boundaries;
  • bounded scheduler, lease, and attempt configuration; and
  • nonblocking etl_job_claim_eligibility_index rollout through PostgreSQL CREATE INDEX CONCURRENTLY, Flyway non-transactional script configuration, and documented invalid-index recovery.

Tests cover concurrent claims, oldest-first selection, expiry reclaim, attempt exhaustion, exact-token transitions, retry accounting, transaction boundaries, atomicity, superseded and expired lease rollback, response replay, configuration bounds, migration contracts, telemetry accounting, and inherited exact-head workflow policy. Public production APIs have beginner-readable Javadoc, introduced database objects use descriptive multi-word snake_case, and standards evidence is recorded with APA 7th references.

Current exact-head state

  • exact head: 05f0ec8ea3cdc715747966812462516d7b85c94e;
  • latest observed PR ci: schedule NVIDIA OpenCode maintenance agent #121 head: 077340a62e267f3dfbe05099b137bec57c11a5ae;
  • base branch: ci/hourly-opencode-nvidia-nim;
  • exact predecessor ancestry: not satisfied after the predecessor movement;
  • current-head CI, Dependency Review, CycloneDX SBOM, CodeRabbit status, automated review, threads, and approval cannot authorize progression because they predate the next required boundary repair.

SAST Semgrep and Security Scan remain required. Because central exact-source scanner hardening is still unmerged, a successful scanner conclusion must also prove that it measured the literal current source head rather than a generated merge revision.

Queued, pending, absent, skipped-required, neutral-required, cancelled, failed, predecessor-head, stale-base, or status-only evidence is not success.

Safety and merge policy

Database state, not scheduler uniqueness, owns cross-replica distribution. A stale worker cannot commit target rows, replay-ledger rows, or lifecycle transitions. Payloads, principals, idempotency keys, hashes, job IDs, lease IDs, SQL, exception messages, and unbounded exception classes are excluded from ordinary telemetry.

Keep manual-merge applied. Merge PR #121 first, retarget this pull request to develop, rerun every direct-base exact-head CI, dependency, SBOM, SAST, security, coverage, packaging, provenance, status, automated-review, thread, and approval gate, and remove the hold only immediately before an expected-head merge. Never bypass branch protection, stack order, tests, security gates, or independent review.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f065dafe-54bf-440b-a592-13aac3c1940a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Advance the durable worker stack to exact parent ed88fc8 while preserving the worker implementation and the authority-separated hourly OpenCode workflow.
Rebuild the worker tree from GitHub's conflict-free synthetic merge of the prior #121 base and worker head, then apply the final authority-separation delta. This restores the updated workflow contract tests that were omitted by the earlier hand-built merge tree.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Review exact current head f57256bcfb89c443415709a4af30ce7b190684e1 only. The stack now contains the complete authority-separated #121 tree and the durable worker implementation. Cross-platform CI, Dependency Review, and CycloneDX SBOM succeed on this head. Verify lease-fenced atomicity, one persisted attempt per claim, expired/superseded rollback, transaction-bound success, non-vacuous coverage, and that no #121 workflow-contract test or documentation was lost during stack repair. Treat later heads as requiring a new review.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected='f57256bcfb89c443415709a4af30ce7b190684e1'
predecessor='68e82f9d7e19623b6f397bd52a4e54d41a472c97'
actual="$(git rev-parse HEAD)"
printf 'EXPECTED_HEAD=%s\nACTUAL_HEAD=%s\n' "$expected" "$actual"
printf 'EXPECTED_OBJECT='
git cat-file -t "$expected"
printf 'PREDECESSOR_IS_ANCESTOR='
if git merge-base --is-ancestor "$predecessor" "$expected"; then printf 'yes\n'; else printf 'no\n'; fi
printf 'WORKTREE_STATUS:\n'
git status --short

printf '\n== Changed files: predecessor to requested head ==\n'
git diff --name-status "$predecessor" "$expected"

printf '\n== Focused source and test file map ==\n'
fd -t f . etl-service | rg '(EtlJob(Worker|ExecutionService|IdempotencyService|LeaseRepository|Lease).*\.java|EtlService\.java|EtlJob.*Test\.java|EtlService.*Test\.java|workflow|doctoring|durable|retry|lease)'

printf '\n== Production outlines ==\n'
for f in \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobIdempotencyService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java \
  etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java
do
  if [ -f "$f" ]; then
    printf '\n---- %s ----\n' "$f"
    ast-grep outline "$f" --items all
  fi
done

printf '\n== Transactional annotations, calls, and fencing SQL ==\n'
rg -n -C 10 --glob '*.java' \
  '(`@Transactional`|TransactionSynchronizationManager|processDataInExistingTransaction\s*\(|idempotencyService\.process\s*\(|markSucceeded\s*\(|markRetry|markFailed|attempt_count|lease_expires_at|claim_id|FOR UPDATE SKIP LOCKED)' \
  etl-service/src/main/java etl-service/src/test/java

printf '\n== Focused implementations ==\n'
for f in \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobIdempotencyService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java \
  etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java
do
  if [ -f "$f" ]; then
    printf '\n---- %s ----\n' "$f"
    sed -n '1,460p' "$f"
  fi
done

printf '\n== Atomicity and transaction-boundary tests ==\n'
fd -t f -e java . etl-service/src/test | rg '(EtlJob.*(Execution|Lease|Idempotency|Worker|Retry|Success).*Test|EtlServiceIdempotencyTransactionBoundaryTest)' \
  | while IFS= read -r f; do
      printf '\n---- %s ----\n' "$f"
      sed -n '1,520p' "$f"
    done

printf '\n== PR `#121` workflow and documentation artifacts at predecessor vs requested head ==\n'
git ls-tree -r --name-only "$predecessor" | rg '(^|/)(\.github/workflows/|.*(workflow|contract).*(Test|test)|docs/)' > /tmp/predecessor_artifacts
git ls-tree -r --name-only "$expected" | rg '(^|/)(\.github/workflows/|.*(workflow|contract).*(Test|test)|docs/)' > /tmp/requested_artifacts
printf '%s\n' '-- Missing from requested head --'
comm -23 /tmp/predecessor_artifacts /tmp/requested_artifacts || true
printf '%s\n' '-- Modified artifacts inherited from predecessor --'
git diff --name-status "$predecessor" "$expected" -- .github docs etl-service/src/test || true

Length of output: 102039


🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected='f57256bcfb89c443415709a4af30ce7b190684e1'
predecessor='68e82f9d7e19623b6f397bd52a4e54d41a472c97'
log='/tmp/coderabbit-shell-logs/shell-output-59K2oU'

printf '== Requested-head verification from the first inspection ==\n'
rg -n '^(EXPECTED_HEAD|ACTUAL_HEAD|EXPECTED_OBJECT|PREDECESSOR_IS_ANCESTOR|WORKTREE_STATUS)' "$log" -A4 -B1 || true

printf '\n== Exact production files at requested commit ==\n'
for f in \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobIdempotencyService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java \
  etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java
do
  printf '\n---- %s ----\n' "$f"
  git show "${expected}:${f}" | sed -n '1,520p'
done

printf '\n== Every durable processing and terminal-transition call site ==\n'
git grep -n -E \
  '(processDataInExistingTransaction[[:space:]]*\(|EtlJobIdempotencyService[[:space:]]*\.process[[:space:]]*\(|idempotencyService\.process[[:space:]]*\(|markSucceeded[[:space:]]*\(|releaseForRetry[[:space:]]*\(|markFailed[[:space:]]*\()' \
  "$expected" -- 'etl-service/src/main' 'etl-service/src/test' || true

printf '\n== Transaction annotations on durable execution path ==\n'
git grep -n -E '@(Transactional|Retryable)' "$expected" -- \
  'etl-service/src/main/java/com/xtrmetl/etl/job' \
  'etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java' || true

printf '\n== `#121` workflow contract tests: predecessor-to-requested diff ==\n'
git diff --unified=80 "$predecessor" "$expected" -- \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeCandidateSelectionTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeMaintenanceWorkflowTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeRequiredWorkflowAuthorizationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/config/MightyEtlConfigAliasEnvironmentPostProcessorTest.java \
  .github/workflows/hourly-opencode-maintenance.yml \
  docs/operations/hourly-opencode-maintenance.md

printf '\n== Claim-index migration and its contract test ==\n'
for f in \
  etl-service/src/main/resources/db/migration/V4__add_etl_job_claim_eligibility_index.sql \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobClaimIndexMigrationTest.java
do
  if git cat-file -e "${expected}:${f}" 2>/dev/null; then
    printf '\n---- %s ----\n' "$f"
    git show "${expected}:${f}"
  fi
done

Length of output: 166275


🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected='f57256bcfb89c443415709a4af30ce7b190684e1'

printf '== Worker configuration, binding, and scheduler activation ==\n'
git grep -n -E \
  '(class EtlJobWorkerProperties|`@ConfigurationProperties`|EtlJobWorkerProperties|`@EnableScheduling`|`@EnableConfigurationProperties`|EnableConfigurationProperties|jobs\.worker|intake-enabled)' \
  "$expected" -- \
  'etl-service/src/main' \
  'etl-service/src/test' \
  'etl-service/src/main/resources' || true

printf '\n== Worker property implementation and bootstrap/configuration classes ==\n'
for f in $(git ls-tree -r --name-only "$expected" -- etl-service/src/main/java \
  | rg '(EtlJobWorkerProperties|Application|Configuration|Config).*\.java$'); do
  printf '\n---- %s ----\n' "$f"
  git show "${expected}:${f}" | sed -n '1,380p'
done

printf '\n== Worker configuration files ==\n'
git ls-tree -r --name-only "$expected" -- etl-service/src/main/resources \
  | rg '(application.*\.(properties|ya?ml)|spring\.factories)$' \
  | while IFS= read -r f; do
      printf '\n---- %s ----\n' "$f"
      git show "${expected}:${f}"
    done

printf '\n== Coverage configuration and durable-test inclusion ==\n'
git grep -n -E \
  '(jacoco|coverage|branch|instruction|line|EtlJobExecutionServiceIntegrationTest|EtlJobWorkerTest|EtlJobLeaseRepositoryIntegrationTest)' \
  "$expected" -- \
  'pom.xml' \
  'etl-service/pom.xml' \
  '.github/workflows' \
  'etl-service/src/test' || true

printf '\n== Current workflow contract test names and assertions ==\n'
for f in \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeMaintenanceWorkflowTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeRequiredWorkflowAuthorizationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/documentation/HourlyOpenCodeCandidateSelectionTest.java
do
  printf '\n---- %s ----\n' "$f"
  git show "${expected}:${f}" | rg -n -C 3 '(`@Test`|void |assertTrue|assertFalse|assertEquals)'
done

printf '\n== Requested head diff summary and changed durable files ==\n'
git diff --stat "${expected}^" "$expected"
git diff --name-status "${expected}^" "$expected" -- etl-service/src/main etl-service/src/test docs .github

printf '\n== V4 migration transaction sidecar ==\n'
for f in \
  etl-service/src/main/resources/db/migration/V4__add_etl_job_claim_eligibility_index.sql.conf \
  etl-service/src/main/resources/application.properties
do
  printf '\n---- %s ----\n' "$f"
  git show "${expected}:${f}" | rg -n -C 3 '(executeInTransaction|transactional-lock|flyway)' || true
done

Length of output: 72922


@seonghobae Reviewed exact commit f57256bcfb89c443415709a4af30ce7b190684e1 only.

I found no actionable issues.

Verified points:

  • EtlJobExecutionService.execute owns the transaction. It calls EtlJobIdempotencyService.process and EtlJobLeaseRepository.markSucceeded in that transaction.
  • EtlJobIdempotencyService.process has no @Transactional or @Retryable advice. It fails before JDBC work when no transaction is active.
  • EtlService.processDataInExistingTransaction has no transaction or retry advice. It requires the existing transaction.
  • markSucceeded requires an active transaction and fences on job ID, RUNNING state, claim ID, owner ID, and unexpired database time.
  • The integration tests cover both superseded claims and expired leases. Both cases retain the RUNNING job and payload, and roll back processed_data and etl_idempotency_records.
  • Claiming increments attempt_count once. The worker handles transient failures through persisted retry transitions. It does not retry ETL execution in process.
  • Worker activation remains disabled by default. Configuration binding, legacy aliases, scheduler enablement, and repository-level bounds are present.
  • The durable-job coverage policy requires zero missed instructions, lines, methods, and branches.
  • No PR #121 workflow-contract test or documentation path was lost. The authority-separated publisher and exact-head authorizer contract remains documented and tested.
⚠️ Action not completed

Review rate limited.

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.

Preserve the complete durable-worker change set while incorporating PR #121 exact head 2f37444. CHANGELOG.md is resolved additively; no reviewed implementation or fail-first history is discarded.
seonghobae added a commit that referenced this pull request Aug 6, 2026
Preserve the complete pagination change set and fail-first history while incorporating PR #122 exact head 2516c3f. Resolve CHANGELOG.md additively and retain the exact-head publication-policy guard.

Copy link
Copy Markdown
Collaborator Author

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

Please review the exact live head against its declared #121 stacked base only. Verify PostgreSQL-owned SKIP LOCKED claim ordering, exact lease fencing, expiry recovery, bounded attempts, transaction-required atomic target/response-ledger/SUCCEEDED commit, stale-lease rollback, terminal payload clearing, finite-cardinality telemetry, non-transactional connector limitations, descriptive multi-word snake_case migration objects, full inherited NVIDIA-NIM scheduler contracts, cross-platform CI, 100% production statement/branch coverage and public Javadocs. Review only; do not retarget, update the branch, remove manual-merge, merge, release, or alter protections.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/mightyETL'
pr='122'
declared_head='2516c3f945df8fee7ad451319a20b63dd28fb3d8'
declared_base='2f374446b0e0dc180c53736787a2a7a9b331503f'

printf '%s\n' '== Live pull request metadata =='
gh pr view "$pr" --repo "$repo" --json number,state,isDraft,mergeable,headRefName,headRefOid,baseRefName,baseRefOid,statusCheckRollup,reviews \
  --jq '{
    number, state, isDraft, mergeable,
    headRefName, headRefOid, baseRefName, baseRefOid,
    checks: [.statusCheckRollup[]? | {name, status, conclusion, detailsUrl}],
    reviews: [.reviews[]? | {author: .author.login, state, commit: .commit.oid}]
  }'

printf '%s\n' '== Local exact-head and stacked-base verification =='
actual_head="$(git rev-parse HEAD)"
printf 'DECLARED_HEAD=%s\nACTUAL_HEAD=%s\nDECLARED_BASE=%s\n' "$declared_head" "$actual_head" "$declared_base"
printf 'HEAD_OBJECT='; git cat-file -t "$declared_head"
printf 'BASE_OBJECT='; git cat-file -t "$declared_base"
printf 'BASE_IS_ANCESTOR='
if git merge-base --is-ancestor "$declared_base" "$declared_head"; then printf 'yes\n'; else printf 'no\n'; fi
printf 'WORKTREE_STATUS:\n'
git status --short
printf '%s\n' '== Direct parents and changed-path summary from declared base =='
git show -s --format='HEAD=%H%nPARENTS=%P%nSUBJECT=%s' "$declared_head"
git diff --name-status "$declared_base" "$declared_head"

printf '%s\n' '== Candidate implementation, migration, workflow, documentation, and contract-test files =='
fd -t f . | rg -i '(EtlJob|lease|idempotency|worker|telemetry|nim|nvidia|scheduler|workflow|migration|flyway|coverage|jacoco|opencode|doctoring|durable)'

printf '%s\n' '== Focused production structure =='
for f in $(fd -t f -e java . etl-service/src/main 2>/dev/null | rg '(EtlJob.*|EtlService\.java|.*Telemetry.*)\.java$'); do
  printf '\n---- %s ----\n' "$f"
  ast-grep outline "$f" --items all
done

printf '%s\n' '== Focused implementation and test references =='
rg -n -C 6 --glob '*.{java,sql,properties,yml,yaml,md,xml,conf}' \
  '(FOR UPDATE SKIP LOCKED|claim_id|lease_expires_at|attempt_count|markSucceeded|releaseForRetry|markFailed|processDataInExistingTransaction|TransactionSynchronizationManager|processed_data|etl_idempotency_records|payload|telemetry|NVIDIA|NIM|executeInTransaction|CREATE INDEX CONCURRENTLY|jacoco|branch coverage|statement coverage)' \
  etl-service .github docs pom.xml 2>/dev/null

Length of output: 202917


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/mightyETL'
pr='122'
head='2516c3f945df8fee7ad451319a20b63dd28fb3d8'
base='2f374446b0e0dc180c53736787a2a7a9b331503f'

printf '%s\n' '== Exact live pull request identity and checks =='
gh pr view "$pr" --repo "$repo" --json headRefOid,baseRefOid,mergeable,statusCheckRollup,reviews \
  --jq '{
    headRefOid, baseRefOid, mergeable,
    checks: [.statusCheckRollup[]? | {name, status, conclusion}],
    reviews: [.reviews[]? | {author: .author.login, state, commit: .commit.oid}]
  }'

printf '%s\n' '== Exact implementation: claim, transitions, and execution transaction =='
for f in \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java \
  etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorkerProperties.java \
  etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobIdempotencyService.java
do
  printf '\n---- %s ----\n' "$f"
  git show "${head}:${f}" | sed -n '1,460p'
done

printf '%s\n' '== Durable implementation call graph and all telemetry declarations =='
git grep -n -E \
  '(claimNext[[:space:]]*\(|markSucceeded[[:space:]]*\(|releaseForRetry[[:space:]]*\(|markFailed[[:space:]]*\(|processDataInExistingTransaction[[:space:]]*\(|Counter|Timer|MeterRegistry|tag[[:space:]]*\()' \
  "$head" -- 'etl-service/src/main/java' 'etl-service/src/test/java' || true

printf '%s\n' '== Exact targeted durable tests =='
for f in $(git ls-tree -r --name-only "$head" -- etl-service/src/test/java | rg 'EtlJob(LeaseRepositoryIntegration|ExecutionServiceIntegration|Worker|CoveragePolicy|ClaimIndexMigration|.*Telemetry.*|.*Properties.*)Test\.java$|EtlServiceIdempotencyTransactionBoundaryTest\.java$'); do
  printf '\n---- %s ----\n' "$f"
  git show "${head}:${f}" | sed -n '1,480p'
done

printf '%s\n' '== NVIDIA-NIM scheduler contract artifacts at base and head =='
git ls-tree -r --name-only "$base" | rg -i '(nvidia|nim|scheduler|opencode|hourly).*' | sort > /tmp/nim-base
git ls-tree -r --name-only "$head" | rg -i '(nvidia|nim|scheduler|opencode|hourly).*' | sort > /tmp/nim-head
printf '%s\n' '-- Missing from head --'
comm -23 /tmp/nim-base /tmp/nim-head || true
printf '%s\n' '-- Changed since base --'
git diff --name-status "$base" "$head" -- .github docs etl-service/src/test | rg -i '(nvidia|nim|scheduler|opencode|hourly)' || true
while IFS= read -r f; do
  printf '\n---- %s ----\n' "$f"
  git show "${head}:${f}" | sed -n '1,360p'
done < /tmp/nim-head

printf '%s\n' '== Coverage configuration and public API documentation evidence =='
git show "${head}:etl-service/pom.xml" | rg -n -C 8 '(jacoco|INSTRUCTION|LINE|METHOD|BRANCH|missedcount|includes)'
git grep -n -E 'public (class|interface|record|enum|[A-Za-z0-9_<>, ?\[\]]+[[:space:]]+[A-Za-z0-9_]+[[:space:]]*\()' "$head" -- \
  etl-service/src/main/java/com/xtrmetl/etl/job \
  | head -n 240

Length of output: 126056


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/mightyETL'
pr='122'
head='2516c3f945df8fee7ad451319a20b63dd28fb3d8'
base='2f374446b0e0dc180c53736787a2a7a9b331503f'

printf '%s\n' '== Live PR identity, labels, reviews, and check conclusions =='
gh pr view "$pr" --repo "$repo" --json headRefOid,baseRefOid,mergeable,labels,reviews,statusCheckRollup \
  --jq '{
    head: .headRefOid,
    base: .baseRefOid,
    mergeable,
    labels: [.labels[].name],
    reviews: [.reviews[] | {author: .author.login, state, commit: .commit.oid}],
    checks: [.statusCheckRollup[] | {name, status, conclusion}]
  }'
printf 'LOCAL_HEAD=%s\n' "$(git rev-parse HEAD)"
printf 'DECLARED_BASE_ANCESTOR='
git merge-base --is-ancestor "$base" "$head" && echo yes || echo no

printf '%s\n' '== Repository SQL and public transition methods =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java" \
  | nl -ba \
  | sed -n '1,430p'

printf '%s\n' '== Execution transaction and ETL existing-transaction method =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java" | nl -ba
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java" \
  | nl -ba | sed -n '130,310p'

printf '%s\n' '== Worker metrics, outcome vocabulary, and tags =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java" \
  | nl -ba | sed -n '1,330p'

printf '%s\n' '== Public durable-job declarations lacking immediately preceding Javadoc =='
python3 - <<'PY'
import subprocess, re
head = "2516c3f945df8fee7ad451319a20b63dd28fb3d8"
paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, "--", "etl-service/src/main/java/com/xtrmetl/etl/job"],
    text=True
).splitlines()
pattern = re.compile(r'^\s*public\s+(?:(?:static|final|abstract)\s+)*(?:class|interface|enum|record|\S+\s+\w+\s*\()')
for path in paths:
    if not path.endswith(".java"):
        continue
    lines = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()
    for i, line in enumerate(lines):
        if not pattern.match(line):
            continue
        prior = "\n".join(lines[max(0, i-12):i])
        if "/**" not in prior or "*/" not in prior:
            print(f"{path}:{i+1}: {line.strip()}")
PY

printf '%s\n' '== Exact SQL and telemetry contract-test assertions =='
git grep -n -E \
  '(FOR UPDATE SKIP LOCKED|ORDER BY|CURRENT_TIMESTAMP|clock_timestamp|lease_claim_id|lease_owner_id|lease_expires_at|attempt_count|outcome|tag\()' \
  "$head" -- 'etl-service/src/test/java/com/xtrmetl/etl/job'

Length of output: 3972


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='2516c3f945df8fee7ad451319a20b63dd28fb3d8'

printf '%s\n' '== Lease repository: all SQL and transition predicates =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobLeaseRepository.java" \
  | sed -n '1,430p'

printf '%s\n' '== Lease-fenced execution transaction =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobExecutionService.java" \
  | sed -n '1,260p'

printf '%s\n' '== Existing-transaction ETL entry point =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/service/EtlService.java" \
  | sed -n '130,310p'

printf '%s\n' '== Worker outcome vocabulary and metric tags =='
git show "${head}:etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobWorker.java" \
  | sed -n '1,330p'

printf '%s\n' '== Public durable-job declarations that lack nearby Javadoc =='
python3 - <<'PY'
import subprocess, re
head = "2516c3f945df8fee7ad451319a20b63dd28fb3d8"
paths = subprocess.check_output(
    ["git", "ls-tree", "-r", "--name-only", head, "--", "etl-service/src/main/java/com/xtrmetl/etl/job"],
    text=True
).splitlines()
decl = re.compile(r'^\s*public\s+(?:(?:static|final|abstract)\s+)*(?:class|interface|enum|record|\S+\s+\w+\s*\()')
missing = []
for path in paths:
    if not path.endswith(".java"):
        continue
    lines = subprocess.check_output(["git", "show", f"{head}:{path}"], text=True).splitlines()
    for index, line in enumerate(lines):
        if decl.match(line):
            prior = "\n".join(lines[max(0, index - 16):index])
            if "/**" not in prior or "*/" not in prior:
                missing.append(f"{path}:{index + 1}: {line.strip()}")
print("\n".join(missing) if missing else "none")
PY

printf '%s\n' '== Focused test names and assertions for claim ordering, expiry, atomicity, and telemetry =='
for f in \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobLeaseRepositoryIntegrationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobExecutionServiceIntegrationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobWorkerTest.java
do
  printf '\n---- %s ----\n' "$f"
  git show "${head}:${f}" \
    | rg -n -C 4 '(void |assertEquals|assertNull|assertThrows|FOR UPDATE|SKIP LOCKED|oldest|expire|supersed|attempt|payload|outcome|tag\()'
done

Length of output: 65728


@seonghobae Reviewed exact head 2516c3f945df8fee7ad451319a20b63dd28fb3d8 against stacked base 2f374446b0e0dc180c53736787a2a7a9b331503f only.

I found no actionable code issues.

Verified:

  • EtlJobLeaseRepository selects the oldest eligible PENDING or expired RUNNING row with FOR UPDATE SKIP LOCKED.
  • Claiming uses a fresh UUID claim ID, database-derived expiry, and one persisted attempt_count increment per claim.
  • Success, retry, and failure transitions fence on job ID, RUNNING, claim ID, owner ID, and unexpired database time.
  • EtlJobExecutionService.execute owns the transaction. It includes target writes, response-ledger processing, and markSucceeded.
  • processDataInExistingTransaction requires an existing transaction. It has no retry or transaction-creation advice.
  • Superseded and expired leases roll back target rows and response-ledger rows. The integration tests retain the RUNNING state and payload after rollback.
  • Terminal success and terminal failure clear the retained payload. Retry retains it.
  • Worker retry accounting is bounded. The worker does not retry ETL execution in process.
  • Worker telemetry uses the fixed idle, succeeded, retried, failed, and stale outcomes. It uses only the finite outcome tag.
  • The concurrent-index migration uses etl_job_claim_eligibility_index, CREATE INDEX CONCURRENTLY, executeInTransaction=false, and documented invalid-index recovery.
  • The inherited NVIDIA-NIM scheduler workflow, authority-separation tests, documentation, and exact-head workflow contracts remain present.
  • The configured JaCoCo gate requires zero missed instructions, lines, methods, and branches for the durable-job scope.
  • Public durable-job APIs include Javadocs. The static Javadoc scan reported false positives where a valid class Javadoc exceeded its limited look-back window.

Current pull request state:

  • The live head and declared base match.
  • manual-merge remains applied.
  • Ubuntu, macOS, Windows, Dependency Review, and SBOM checks succeed.
  • SAST and Security Scan are absent on this non-default stacked base.
  • No independent non-author review is currently anchored to this exact head.

The last two items remain merge-policy blockers after #121 merges and this pull request is retargeted. They are not implementation defects in this review.

⚠️ Action not completed

Review rate limited.

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.

@opencode-agent

opencode-agent Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Queued @cwl-noema-review ; Rejected @opencode-agent: repository is absent from OPENCODE_REPOSITORY_DISPATCH_TARGETS for PR #122 at head 2516c3f945df8fee7ad451319a20b63dd28fb3d8. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

Preserve the complete durable-worker implementation and fail-first history while incorporating PR #121 exact head b24bed9. The merge tree imports the reviewed exact-head CI/SBOM workflows, contract test, and doctoring evidence. CHANGELOG.md is resolved additively in the immediately following auditable commit; no implementation, test history, or predecessor evidence is discarded.
@opencode-agent

opencode-agent Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Queued @cwl-noema-review ; Rejected @opencode-agent: repository is absent from OPENCODE_REPOSITORY_DISPATCH_TARGETS for PR #122 at head 05f0ec8ea3cdc715747966812462516d7b85c94e. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

Copy link
Copy Markdown
Collaborator Author

Superseded by draft PR #138, which preserves this branch and its fail-first history while reapplying the bounded durable-worker slice from the then-exact predecessor. The current #121 head is d1cae1189870f314445e934e9969fa9a70c1b7b9; this PR head 05f0ec8ea3cdc715747966812462516d7b85c94e diverges from that predecessor (merge base b24bed946d3da2e62d89ded828d877dac2f3c65c) and is therefore not an eligible stack boundary. Closing this PR as superseded without deleting or rewriting its branch. Its checks, reviews, approvals, statuses, and fail-first evidence remain inspectable but do not transfer to #138 or any later repaired head.

@seonghobae seonghobae closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant