Skip to content

feat(etl): list durable jobs with owner-scoped cursors - #129

Closed
seonghobae wants to merge 16 commits into
feat/durable-job-lease-workerfrom
feat/durable-job-cursor-list-v2
Closed

feat(etl): list durable jobs with owner-scoped cursors#129
seonghobae wants to merge 16 commits into
feat/durable-job-lease-workerfrom
feat/durable-job-cursor-list-v2

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Superseded by stack-valid replacement #144

This pull request is closed as superseded, not merged. Its branch feat/durable-job-cursor-list-v2 and exact head 683e1a8b132772236b561b28d5d204c866a08034 remain preserved as historical implementation and fail-first evidence.

The technical reason is stack ancestry, not a rejection of the pagination feature. This PR still targets obsolete durable-worker branch feat/durable-job-lease-worker@05f0ec8ea3cdc715747966812462516d7b85c94e and GitHub reports it non-mergeable. The required durable-worker predecessor has been replaced by PR #143 at exact head fda8ded9b07a6b0aebb3df8ef3009063655ebfc8.

Replacement PR #144 was created from that exact current predecessor and re-applies the bounded owner-scoped pagination implementation and tests through ordinary non-destructive commits. Its exact current head 2a37789e651316e9bf29cbbd68902aa827a50c63 is 14 commits ahead and zero behind #143 with #143's exact head as the merge base. It also restores the nonblocking V5 PostgreSQL pagination index migration and Flyway transaction override, aligns the operator runbook and CHANGELOG.md, and has fresh literal-head CI, Dependency Review, CycloneDX SBOM, and CodeRabbit success with zero unresolved review threads.

No checks, reviews, approvals, statuses, comments, or base snapshots from this PR transfer to #144. Likewise, #144 must generate new SAST/Security and qualifying independent exact-head approval evidence when its protected predecessor chain becomes eligible. Closing this PR does not make #130 or any later old-stack PR eligible; those still depend on this obsolete branch and must be repaired in dependency order only after the replacement predecessor is eligible.

Historical exact-head evidence retained here:

  • CI 31092813969: success;
  • Dependency Review 31092814490: success;
  • CycloneDX SBOM 31092813848: success;
  • CodeRabbit status: success;
  • unresolved review threads: zero;
  • formal reviews: zero.

Those historical results remain useful forensic evidence only. They are not merge evidence for #144 or any future replacement. No force-push, destructive rebase, -X ours, -X theirs, approval bypass, test weakening, or branch-protection bypass was used.

@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: 7b7d7923-aee3-45fd-8d42-7cc44aab6489

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 pagination to the authority-separated worker stack exact head without discarding either change set.
Carry the corrected #121 authority tests and documentation from the repaired durable-worker head while preserving all pagination changes.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

Review exact current head 349afe7f0e9c77279806f13b2d156e4bcd43bab1 only. Cross-platform CI, Dependency Review, and CycloneDX SBOM succeed after restoring the complete corrected worker base. Verify owner-scoped keyset pagination, canonical cursor rejection before table access, deterministic equal-timestamp traversal, tenant isolation, RFC 8288 next-link behavior, concurrent index migration safety, and that stack repair preserved all predecessor tests and documentation. 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

sha='349afe7f0e9c77279806f13b2d156e4bcd43bab1'
printf '%s\n' '== Requested commit =='
git show -s --format='commit=%H%nparents=%P%nsubject=%s%ncommit_date=%cI' "$sha"
printf '%s\n' '== Changed paths against first parent =='
git diff-tree --no-commit-id --name-status -r "$sha"
printf '%s\n' '== Commit ancestry check =='
git merge-base --is-ancestor "$sha" HEAD && echo 'requested_sha_is_ancestor_of_checked_out_HEAD=true' || echo 'requested_sha_is_ancestor_of_checked_out_HEAD=false'

printf '%s\n' '== Candidate file map =='
fd -HI -t f . | rg -i '(etl|job|cursor|pagination|flyway|migration|changelog|standard|readme|test)'

printf '%s\n' '== Pagination-related definitions and migration statements at requested commit =='
git grep -n -E 'GET /api/etl/jobs|api/etl/jobs|etl_job_owner_pagination_index|CREATE INDEX CONCURRENTLY|executeInTransaction|rel="next"|Base64|cursor|pageSize|created_at|job_record_id' "$sha" -- \
  ':!**/node_modules/**' ':!**/dist/**' || true

printf '%s\n' '== Pull request metadata and requested-commit checks =='
gh pr view 129 --repo ContextualWisdomLab/mightyETL \
  --json number,headRefOid,baseRefName,headRefName,mergeable,reviewDecision,statusCheckRollup,reviews \
  --jq '{number, headRefOid, baseRefName, headRefName, mergeable, reviewDecision, checks: [.statusCheckRollup[] | {name,conclusion,status}], reviews: [.reviews[] | {author:.author.login,state,commitId}]}' || true
gh api "repos/ContextualWisdomLab/mightyETL/commits/$sha/check-runs" \
  --jq '.check_runs[] | {name,status,conclusion,details_url}' || true

Length of output: 97877


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sha='349afe7f0e9c77279806f13b2d156e4bcd43bab1'
parent1=$(git show -s --format='%P' "$sha" | awk '{print $1}')
parent2=$(git show -s --format='%P' "$sha" | awk '{print $2}')
show_range() {
  local path="$1" start="$2" end="$3"
  echo "== $path lines $start-$end at $sha =="
  git show "$sha:$path" | nl -ba | sed -n "${start},${end}p"
}

printf '%s\n' '== Merge-parent differences for protected pagination paths =='
git diff --name-status "$parent1" "$sha" -- etl-service/src/main/java/com/xtrmetl/etl etl-service/src/test/java/com/xtrmetl/etl/job docs/etl/durable-job-intake.md CHANGELOG.md etl-service/src/main/resources/db/migration
git diff --name-status "$parent2" "$sha" -- etl-service/src/main/java/com/xtrmetl/etl etl-service/src/test/java/com/xtrmetl/etl/job docs/etl/durable-job-intake.md CHANGELOG.md etl-service/src/main/resources/db/migration

show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobService.java' 45 110
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobService.java' 270 465
show_range 'etl-service/src/main/java/com/xtrmetl/etl/controller/EtlJobController.java' 120 180
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobSnapshot.java' 1 160
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobPageResponse.java' 1 140
show_range 'etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql' 1 100
show_range 'etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql.conf' 1 30
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java' 1 240
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java' 1 220
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobMigrationDocumentationTest.java' 45 150
show_range 'docs/etl/durable-job-intake.md' 60 250

printf '%s\n' '== Pagination test files reachable from both merge parents =='
for path in \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobMigrationDocumentationTest.java \
  docs/etl/durable-job-intake.md \
  etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql
do
  printf '%s: ' "$path"
  git cat-file -e "$parent1:$path" 2>/dev/null && printf 'parent1=present ' || printf 'parent1=absent '
  git cat-file -e "$parent2:$path" 2>/dev/null && printf 'parent2=present ' || printf 'parent2=absent '
  git cat-file -e "$sha:$path" 2>/dev/null && printf 'merge=present\n' || printf 'merge=absent\n'
done

Length of output: 4187


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sha='349afe7f0e9c77279806f13b2d156e4bcd43bab1'
parent1=$(git show -s --format='%P' "$sha" | awk '{print $1}')
parent2=$(git show -s --format='%P' "$sha" | awk '{print $2}')
show_range() {
  local path="$1" start="$2" end="$3"
  echo "== $path lines $start-$end at $sha =="
  git show "$sha:$path" | awk -v start="$start" -v end="$end" 'NR >= start && NR <= end { printf "%6d\t%s\n", NR, $0 }'
}

printf '%s\n' '== Differences from pagination parent in protected paths =='
git diff --name-status "$parent2" "$sha" -- \
  etl-service/src/main/java/com/xtrmetl/etl \
  etl-service/src/test/java/com/xtrmetl/etl/job \
  docs/etl/durable-job-intake.md CHANGELOG.md \
  etl-service/src/main/resources/db/migration

show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobService.java' 45 110
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobService.java' 270 465
show_range 'etl-service/src/main/java/com/xtrmetl/etl/controller/EtlJobController.java' 120 180
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobSnapshot.java' 1 160
show_range 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobPageResponse.java' 1 140
show_range 'etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql' 1 100
show_range 'etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql.conf' 1 30
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java' 1 240
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java' 1 220
show_range 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobMigrationDocumentationTest.java' 45 150
show_range 'docs/etl/durable-job-intake.md' 60 250

printf '%s\n' '== Protected path presence in merge parents and merge result =='
for path in \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobMigrationDocumentationTest.java \
  docs/etl/durable-job-intake.md \
  etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql
do
  printf '%s: ' "$path"
  git cat-file -e "$parent1:$path" 2>/dev/null && printf 'worker_parent=present ' || printf 'worker_parent=absent '
  git cat-file -e "$parent2:$path" 2>/dev/null && printf 'pagination_parent=present ' || printf 'pagination_parent=absent '
  git cat-file -e "$sha:$path" 2>/dev/null && printf 'merge=present\n' || printf 'merge=absent\n'
done

Length of output: 63887


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sha='349afe7f0e9c77279806f13b2d156e4bcd43bab1'
parents=($(git show -s --format='%P' "$sha"))
parent_a="${parents[0]}"
parent_b="${parents[1]}"

show_file() {
  local path="$1"
  echo "== $path at $sha =="
  git show "$sha:$path" | awk '{ printf "%6d\t%s\n", NR, $0 }'
}

printf '%s\n' '== Merge parents and their commit subjects =='
git show -s --format='%H %s' "$parent_a" "$parent_b"

show_file 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobStatusResponse.java'
show_file 'etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobPage.java'
show_file 'etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java' | sed -n '120,320p'

printf '%s\n' '== Exact merge-result comparison with each parent for protected paths =='
for parent in "$parent_a" "$parent_b"; do
  echo "-- parent=$parent --"
  git diff --stat "$parent" "$sha" -- \
    etl-service/src/main/java/com/xtrmetl/etl/controller/EtlJobController.java \
    etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobService.java \
    etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobPage.java \
    etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobPageResponse.java \
    etl-service/src/main/java/com/xtrmetl/etl/job/EtlJobStatusResponse.java \
    etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java \
    etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java \
    etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobMigrationDocumentationTest.java \
    etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql \
    etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql.conf \
    docs/etl/durable-job-intake.md CHANGELOG.md
done

printf '%s\n' '== Conflict-marker and whitespace checks in merge result =='
git grep -n -E '^(<<<<<<<|=======|>>>>>>>)' "$sha" -- \
  etl-service/src/main/java/com/xtrmetl/etl \
  etl-service/src/test/java/com/xtrmetl/etl/job \
  docs/etl/durable-job-intake.md CHANGELOG.md \
  etl-service/src/main/resources/db/migration && exit 1 || true
git diff-tree --check -m "$sha"

printf '%s\n' '== File history for preserved pagination tests and documentation =='
git log --format='%H %s' --all -- \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationServiceIntegrationTest.java \
  etl-service/src/test/java/com/xtrmetl/etl/job/EtlJobPaginationControllerTest.java \
  etl-service/src/main/resources/db/migration/V5__add_etl_job_owner_pagination_index.sql \
  docs/etl/durable-job-intake.md | head -40

Length of output: 15281


@seonghobae Reviewed only exact head 349afe7f0e9c77279806f13b2d156e4bcd43bab1.

No actionable findings.

Verified:

  • Owner-scoped queries bind principal_scope_hash on every page.
  • Cursor and limit validation complete before database access.
  • Cursor canonicalization requires unpadded Base64 URL re-encoding.
  • Keyset traversal uses deterministic created_at DESC, job_record_id DESC ordering.
  • Equal-timestamp traversal and tenant isolation have integration coverage.
  • One-extra-row detection controls the optional next cursor.
  • Link: ...; rel="next" is emitted only for a following page.
  • Public list responses exclude payloads, principals, keys, hashes, leases, SQL, and exception text.
  • V5 uses CREATE INDEX CONCURRENTLY with executeInTransaction=false.
  • Documentation includes invalid-index recovery and concurrent rollback guidance.
  • The merge preserved the pagination implementation, tests, migration, CHANGELOG entries, and documentation from the pagination parent while restoring the worker base.
  • Ubuntu, macOS, Windows, Dependency Review, and SBOM checks succeeded for this exact SHA.

A later head requires a separate review, as requested.

⚠️ 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 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.
seonghobae added a commit that referenced this pull request Aug 6, 2026
Preserve the complete polling implementation and fail-first history while incorporating PR #129 exact head 683e1a8. Resolve CHANGELOG.md additively and retain all predecessor policy evidence.
@seonghobae
seonghobae marked this pull request as draft August 8, 2026 12:08
@seonghobae
seonghobae changed the base branch from feat/durable-job-lease-worker to repair/durable-job-lease-worker-75265fa August 9, 2026 03:07
@seonghobae
seonghobae changed the base branch from repair/durable-job-lease-worker-75265fa to feat/durable-job-lease-worker August 9, 2026 03:07
@seonghobae seonghobae closed this Aug 9, 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