Repository navigation
feat(api): run-to-snapshot identity and explicit snapshot reads (#1229) - #1236
Merged
Merged
Conversation
…1229) finish stamps runs.snapshot_end with the lake's latest snapshot, read just before the update commits; RunItem serves it as snapshot. Nothing wrote snapshot_end before, so the column was always NULL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y when gone (#1229) golden-records and duplicates accept snapshot=. A snapshot past the latest or contradicting the cursor is a 422; one expired by retention is a 410, never a read of a different snapshot (pin_requested, pure and unit-tested). run_snapshot_read.rs reads run R's results after run R+1 over a real lake. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
) Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
force-pushed
the
issue/1229-run-snapshot
branch
from
November 25, 2026 11:44
e14cb3e to
5622eb9
Compare
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
athvin
marked this pull request as ready for review
November 25, 2026 12:00
athvin
temporarily deployed
to
marketing-preview
November 25, 2026 12:01 — with
GitHub Actions
Inactive
This was referenced Nov 25, 2026
This branch was previously deployed
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.
Closes #1229
What
"Read the results of run R" is now expressible and exact.
finishstampsruns.snapshot_endwith the lake's latest snapshot, read just before the finish update commits. Every stage commits on its own, so that is the snapshot holding the run's results.RunItemserves it assnapshot.snapshot=.golden-records(local and remote lake paths) andduplicatesaccept it. A snapshot newer than the latest, or one contradicting the cursor, is a 422. One expired by retention is a 410. Neither is ever a read of a different snapshot. The rules are inread::pin_requested, which is pure.Session::snapshot_bounds(dedupe-core) and its remote twin give(oldest, latest)retained.Why
#1229, part of #521. A newer run moving the lake between a
job.succeededand the customer's first read used to change what they read.Proof
make check: 1,182 passed, 0 failed.er-server+er-cli --testsagainst Postgres withDEDUPE_E2E_DUCKLAKE=1: 491 passed.make frontend: 963 passed, 1 failed:run-cost.spec.tson mobile-safari, an element-not-found timeout. This diff's frontend changes are only the generated API files, which nothing on that page imports, so it is not this change. The PR's required Playwright tier is the judge.run_snapshot_read.rs(real lake,DEDUPE_E2E_DUCKLAKE): two full runs, where R+1 adds one company. It asserts:expire_snapshots, requesting R isExpired.pin_requested_tests(4): pass-through, exact read at a retained snapshot, expired and future refused, and a cursor that must agree and triggers no catalog read.finishstampslatest - 3r == after_r - 1); now fails.Expiredexpected)Risk & rollback
finishgains one catalog read before its update. Runs finished before this havesnapshot: null, and that is documented. Rollback:git revert <merge-sha>; the column stays and simply stops being written.Post-merge ledger
Closed by: agent · session
Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306onMac· 2026-11-25T18:32:45Zmainis green with this change on it: merge432d337e. Push runs rust 45609751372, frontend 45609751571, images 45609751497, infra 45609751387, devcontainer 45609751379, marketing preview 45609751278: all success.images: run 45609751497 succeeded.deployconverged. Process proof was read once the AWS session was restored (2026-11-26). The live colour in dev (ci/web-api-green-5d5f9c8844-88dxb, logged"er-server listening"at 01:36:40Z) and prod (app/web-api-blue-7544598cbb-8rjth, at 01:51:39Z) both runer-api@sha256:5d993716…, built frombae09b2e, which contains this merge (git merge-base --is-ancestor 432d337e bae09b2eholds). (Earlier note: the latest deploy (DEPLOY_SHA: 432d337e, 12:05Z) succeeded; the deploy workflow succeeded, but the AWS SSO session (er-platform/er-prodadmin) expired at 12:10Z before the live pods' logs could be read. A workflow conclusion is not process proof. To be ticked afteraws sso login.)deployis green.driftandkindwere already red on schedule before feat(api): typed response structs, batch 3 — reviews+merges (#1193) #1202.runs.snapshot_*were declared and never written) and the commit message. The first test version passing a wrong snapshot is themutation-test-the-scenario-toolesson again.Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
runsalready declaredsnapshot_start/snapshot_end, but nothing ever wrote them, so both were always NULL.snapshot_startstays unwritten. Nothing needs it, and a value no reader uses is a value nobody checks.run_stages.snapshot_endexists too, butrun_stageshas no writer (see the observability skill onstage_record_line), so it could not stand in.Measurements
Files