Repository navigation
The source API says where a ticket source's reading stopped, so an operator sees the checkpoint itself and not only that the round succeeded (#1212, ADR 0075) - #1455
Merged
WaylandYang merged 1 commit intoOct 29, 2026
Conversation
…erator sees the checkpoint itself and not only that the round succeeded (deeplethe#1212, ADR 0075) Signed-off-by: Royce Lam <roycelam@umich.edu>
WaylandYang
approved these changes
Oct 29, 2026
WaylandYang
left a comment
Contributor
There was a problem hiding this comment.
Thanks — the field, the NULL-means-no-checkpoint rule and ADR 0075 all read right. Merging.
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.
Why
A ticket source stops at its per-round budget all the time — 200 tickets or ten listing pages — and a round that stops there is a success: it consumed a prefix, and the next round continues from where it stopped (0072). The source list says "synced" and says how many documents the round added. It does not say where the reading stopped.
The checkpoint that says where lived on the source row with nothing carrying it out of the API, so an operator asking "did this source get everything?" had nothing to read: the run history says how many documents each round added, not how far into the provider's timeline the reading got. The answer was in a log line.
What changes
Source.sync_checkpointandSourceView.sync_checkpoint: the update time a ticket source has consumed through — the time whose whole group was read. The list response carries it, and so do the create/update responses, so the two shapes of a source never disagree about the same row.web/src/api.tstypes it. The interface does not read it yet — where to put it and what to call it is a separate change.docs/design/sources.mdrecords it in the design.This does not change how a sync reads, or where the checkpoint is written — #1359 already put the checkpoint on the source and commits it with the successful run. This only lets it out of the API.
How it was checked
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceagainst PostgreSQL 16 / pgvector withUTOPIA_DATABASE_URLset andUTOPIA_TEST_REQUIRE_DB=1: 1797 passed, 1 failed, 6 ignored. The one failure isreal_postgres_backup_and_restore_require_force_and_preserve_files_on_sql_failure, which panics with "pg_dump is required for database-backed CLI tests" on a machine without the PostgreSQL client tools; it fails identically on the unmodified base commit, so it is not this change.pnpm typecheck(tsc --noEmit): 0 errors, run twice.pnpm test(vitest): 49 files, 338 tests passed.pnpm build(style-guard+tsc --noEmit+vite build): passed.crates/utopia-server/src/api/sources_checkpoint_tests.rs: the list carries the checkpoint and leaves it NULL for a kind that does not use one; the update response carries it too.Before review
git commit -s)cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass (the one CLI failure needspg_dump, which this machine lacks — it fails identically on the base commit)web/:pnpm buildandpnpm testpasscrates/utopia-store/was tested withUTOPIA_DATABASE_URLset (those tests skip without it)docs/decisions/