feat(etl): add lease-fenced durable job worker - #143
Draft
seonghobae wants to merge 35 commits into
Draft
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.
Purpose
Replace superseded diverged durable-worker PR #138 with a worker slice that descends from the exact current PR #121 predecessor, preserve the original fail-first history without destructive rewriting, and complete a production-ready lease-fenced durable execution boundary with aligned operator documentation.
Exact current stack boundary
ci/hourly-opencode-nvidia-nim;75265fae9fcf5faac6f8b9cab63247ac86f23dd4;repair/durable-job-lease-worker-75265fa;fda8ded9b07a6b0aebb3df8ef3009063655ebfc8;626e5fef633c684ba28af0a6e6e62c7038945bfe;A fresh literal comparison from exact predecessor
75265fae9fcf5faac6f8b9cab63247ac86f23dd4to this head isahead: 32 commits ahead, zero behind, with the predecessor itself as the exact merge base. No force push,-X ours,-X theirs, stale synthetic merge, or rewritten fail-first evidence was used. Checks, reviews, approvals, comments, and base snapshots from #138 or predecessor heads do not transfer.Stack-divergence RCA
PR #121 advanced after the former durable-worker branch was cut. The obsolete worker branch therefore stopped descending from the exact live predecessor. Preserving stack integrity required a replacement branch from the new exact predecessor rather than destructive history rewriting. #138 is closed as superseded and its branch remains historical evidence.
PR #129 still targets the obsolete
feat/durable-job-lease-workerbranch and is diverged from that branch's live tip. #130, #131, #133, and #135 remain later locally intact but globally ineligible stack items. Do not deepen that chain until this earliest replacement boundary is eligible; old downstream checks, reviews, approvals, and base snapshots will not transfer when repaired.RCA → options → feasibility → execution → proof
RED 1 — missing production worker
Exact head
5a3f3dab938163c00592507a2174a268fff3f89ereached production compilation successfully and then failed test compilation becauseEtlJobWorkerTestreferenced the still-absent productionEtlJobWorkerat six compile sites. CI31290377356checked out and verified that literal head on Ubuntu, macOS, and Windows. The failure was therefore at the intended production boundary, not an import, fixture, dependency, runner, or stale-checkout defect.Material remediation options were evaluated against the live stack and available authority:
05f0ec8ea3cdc715747966812462516d7b85c94ehad previously completed literal-head CI31177538550, Dependency Review31177538330, and SBOM31177538585. Reapplying that production boundary to the replacement ancestry required no new credential, permission, external dependency, history rewrite, or test weakening.Commit
3a70fdcc129e318d4cd6094c164e63994e585bdeadded the boundedEtlJobWorkerproduction class. Exact-head CI31290656673then succeeded on Ubuntu, macOS, and Windows; Dependency Review31290656763, CycloneDX SBOM31290656685, and CodeRabbit exact-head status also succeeded.RED 2 — authoritative documentation contradicted production
After the worker became source-local GREEN, acquisition-readiness inspection found that
docs/etl/durable-job-intake.mdstill said the system “does not execute jobs yet,” andCHANGELOG.mdstill described worker execution and terminal payload clearing as unimplemented. Existing documentation tests encoded those stale statements, so a green build did not prove documentation truthfulness.Commit
38f4af8cf4c48c7d814a8214419db27e24add992changed only the documentation contract tests first. Exact-head CI31290922060reached the intended boundary and macOS ran 369 tests with exactly two failures, both newly added assertions:runbookDocumentsAcceptedSemanticsOwnershipAndActiveWorkerBoundary;changelogRecordsLeaseFencedDurableWorkerExecution.That fail-first result disproved the stale documentation without touching production behavior.
GREEN 2 — truthful runbook and changelog
bdc46c6f27a8e2f1b3600366a5bb0f68edb2641cupdates the durable-job runbook to document the active opt-in worker,FOR UPDATE SKIP LOCKEDclaim arbitration, exact lease fencing, transactional success, terminal payload clearing, bounded retries, stable failure codes, finite telemetry, disabled-by-default intake/worker controls, rollback behavior, and the remaining later-stack boundary. It records RFC 9110, RFC 9457, RFC 9651, the expired Idempotency-Key draft only as work-in-progress evidence, and PostgreSQL 18SELECTdocumentation in the references.fda8ded9b07a6b0aebb3df8ef3009063655ebfc8updatesCHANGELOG.mdto remove the obsolete “worker not implemented” claim and record the lease-fenced worker behavior.Exact-current-head proof
For literal head
fda8ded9b07a6b0aebb3df8ef3009063655ebfc8over unchanged exact predecessor75265fae9fcf5faac6f8b9cab63247ac86f23dd4:31291130025: success;93188386197: exact-source checkout, exact-SHA verification, and Unix tests succeeded;93188386213: exact-source checkout and exact-SHA verification succeeded; all 369etl-servicetests passed with zero failures/errors/skips and all configured JaCoCo coverage checks were met;cdc-serviceran 106 tests successfully and the gateway suite ran 3 tests successfully;93188386190: exact-source checkout, exact-SHA verification, and Windows tests succeeded;test_self_hosted: skipped and not counted as positive evidence;31291130034: success;31291130012: success;SAST Semgrep and Security Scan are absent for this non-default stacked base and therefore remain not passing rather than being inferred from predecessor or synthetic evidence. No qualifying independent non-author formal
APPROVEDreview exists on this exact head.Implemented worker boundary
The replacement slice now provides:
FOR UPDATE SKIP LOCKED;idle,succeeded,retried,failed, andstalemetrics without payloads, principals, keys, job IDs, lease IDs, SQL, exception classes, or exception messages;snake_casedatabase objects and migration/rollback guidance;Merge and downstream repair policy
Keep this PR Draft. The replacement is stack-valid and exact-head source-local GREEN, but it is not merge-eligible while #121 remains unmerged and while required direct-base security/review evidence is absent. Do not request or synthesize approval, reinterpret absent SAST/Security as passing, or deepen #129 and later stack items.
After #121 becomes merge-eligible and integrates, re-anchor or retarget this replacement against the exact protected predecessor and regenerate every affected exact-head/base check, security result, review, and approval. Only after this predecessor is eligible may the pagination, polling, conditional status, cancellation, and replay chain be repaired in dependency order.