feat(etl): replace durable-job pagination on repaired worker stack - #144
Draft
seonghobae wants to merge 17 commits into
Draft
feat(etl): replace durable-job pagination on repaired worker stack#144seonghobae wants to merge 17 commits into
seonghobae wants to merge 17 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This was referenced Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack repair purpose
This draft replaces diverged PR #129 with a non-destructive pagination branch rooted at exact predecessor PR #143. The original #129 branch and its fail-first history remain preserved. Old #129 checks, reviews, approvals, statuses, comments, and base snapshots do not transfer to this replacement.
Exact current identity
repair/durable-job-lease-worker-75265fa;fda8ded9b07a6b0aebb3df8ef3009063655ebfc8;repair/durable-job-cursor-list-fda8ded;2a37789e651316e9bf29cbbd68902aa827a50c63;c5ef67fdb54cb04a50398e2accf84a5680d45886;aheadby 14 commits, behind by 0, merge base exactlyfda8ded9b07a6b0aebb3df8ef3009063655ebfc8;Stack-divergence RCA and repair options
PR #129 targets the obsolete
feat/durable-job-lease-workerbranch and is non-mergeable. The durable-worker predecessor was replaced by #143 after #121 advanced, so the old pagination head no longer descends from the required exact predecessor.Material repair options were evaluated against current repository authority and stack state:
ours/theirsconflict shortcuts: would make ancestry look linear without proving both change sets survive;The replacement path is the implemented option.
TDD and RCA record
RED 1 — missing pagination model on repaired ancestry
Creation head
4a555d62d950cf6d812866a89d1e74de1d88cb65added the page-model contract beforeEtlJobPageandEtlJobPageResponseexisted on the #143 ancestry. The test reached the intended production boundary and failed on the missing production pagination types rather than a fixture/import/setup defect.Subsequent bounded commits reapplied owner-scoped page models, service/controller behavior, strict limit/cursor validation, deterministic keyset ordering, tenant isolation, and one-extra-row next-page detection.
RED 2 — production pagination migration missing
At exact source head
4bd27f205b1cab1210f62e33f87d105e18183606, the pagination production/controller/service tests were green, but literal-head CI31292322341failed on every hosted OS becauseEtlJobMigrationDocumentationTestreached the production migration boundary and could not findV5__add_etl_job_owner_pagination_index.sql. macOS job93191493826ran 384 tests with zero assertion failures and exactly two file-absence errors in:paginationMigrationUsesTheOwnerAndCompleteStableOrderingKey;paginationIndexMigrationDoesNotBlockProductionWriters.This disproved the hypothesis that the replacement implementation was complete: the runtime query contract existed, but its nonblocking PostgreSQL index rollout artifact was absent.
The smallest feasible repair was to restore the bounded V5 migration and its migration-local Flyway transaction override from the preserved old pagination slice. Commit
266856b8a3e950534afe00abdb14f2b0da804e0baddedCREATE INDEX CONCURRENTLY etl_job_owner_pagination_indexover(principal_scope_hash, created_at DESC, job_record_id DESC). Commit6e9fa4eff0459ed083f628c9682bf0bde246bac9addedV5__add_etl_job_owner_pagination_index.sql.confwithexecuteInTransaction=false.Exact-head CI
31292548252then succeeded on Ubuntu, macOS, and Windows; Dependency Review31292548276and CycloneDX SBOM31292548282also succeeded.RED 3 — authoritative operator documentation still described the predecessor boundary
After the source and migration became green, the inherited worker runbook still said higher-level job-list pagination remained a later stack item. Commit
f2ba86de2326619aaf8e6bef69497c192cb09a7cchanged only the documentation contract first. Literal-head CI31292668445, macOS job93192431175, ran 385 tests with exactly one failure and zero errors:runbookDocumentsOwnerScopedKeysetPaginationAndRollback.All production pagination, worker, controller, integration, migration, and unrelated tests passed. The RED therefore isolated documentation drift rather than a production regression.
Commit
ef3c24006c4c37b4b87a28664e8b7f3a4b1d744bupdateddocs/etl/durable-job-intake.mdwith the owner-scoped list contract, canonical cursor/limit behavior, RFC 8288 next links, privacy boundary, V5CREATE INDEX CONCURRENTLYrollout,executeInTransaction=false, invalid-index handling, andDROP INDEX CONCURRENTLYrollback. CI31292757373then succeeded across Ubuntu, macOS, and Windows.Exact current head
2a37789e651316e9bf29cbbd68902aa827a50c63records the pagination behavior and rollout inCHANGELOG.mdwithout weakening tests or rewriting RED history.Implemented buyer-visible boundary
The repaired slice now provides:
GET /api/etl/jobslisting;limitvalidation;created_at DESC, job_record_id DESC;Linkwithrel="next"andCache-Control: no-store;CREATE INDEX CONCURRENTLY etl_job_owner_pagination_indexmatching the exact owner/order access path;executeInTransaction=falsefor PostgreSQL's nontransactional concurrent-index requirement;snake_casedatabase objects; andExact-current-head evidence
For exact head
2a37789e651316e9bf29cbbd68902aa827a50c63over unchanged exact predecessorfda8ded9b07a6b0aebb3df8ef3009063655ebfc8:31292876884: success;93193007178: exact-source checkout, exact-SHA verification, and Unix tests succeeded;93193007157: exact-source checkout, exact-SHA verification, and Unix tests succeeded;93193007167: exact-source checkout, exact-SHA verification, and Windows tests succeeded;test_self_hosted: skipped and not counted as positive evidence;31292876913: success;31292876885: success;SAST Semgrep and Security Scan are absent on this non-default stacked base and remain not passing rather than inferred from another head/base. No qualifying independent non-author formal
APPROVEDreview exists on this exact head.Dependency and merge boundary
This replacement is source-local GREEN and repairs the
#143 -> paginationancestry, but it is not merge-eligible. PR #121 is still the root prerequisite, and #143 remains stacked on #121. Direct-base SAST/Security evidence and independent exact-head approval are also absent for this non-default stacked target.Do not deepen #130 or later old-stack branches from #129. After #121 and #143 integrate through protected history, retarget or re-anchor this replacement to the exact protected predecessor and regenerate every affected exact-head/base CI, Dependency Review, SBOM, SAST, Security Scan, coverage, migration, provenance, review-thread, automated-review, and independent-approval surface. Old #129 or predecessor evidence does not transfer.
Never bypass branch protection, stack order, exact-head binding, independent review, tests, coverage, security gates, writer leases, or migration rollback requirements.