Repository navigation
feat: add microbatch coverage endpoint - #1319
Merged
Merged
Conversation
People with view.evidence on a check's model can read the sample rows stored with one of its results. Columns are the rows' keys in sorted order, the order the warehouse stores them in, and a row without a key holds null there. Every read is audited, and a read whose audit cannot be written discloses nothing. The SQL and evidence reads now share one authorize, read and audit path.
People with view on a target can read its recorded model moves, every step of their old-name views, and janitor cleanups, newest moves first. Filtering by model returns only moves into that model and their views, using new indexes on the destination model and the move's event. Check and maintenance reads now live in their own warehouse-history domain, apart from metadata ingestion.
People with view on a target can read one model's recorded microbatch coverage: its completed segments, the holes between completed partitions, and segments a newer replay requirement still needs rebuilt at its version. Coverage is projected from the mirrored completion and replay-requirement facts of the model's newest relation and generation, with the same projection the executor uses; cursor bounds sort by value, so offset timestamps order by instant rather than text. Coverage is tracked only for concurrent microbatch models, so other models read as null.
…aintenance-history
The worker contract held one 30 second scheduler lease without renewing it, so on a slow runner its second claim came after expiry and was fenced. Renew it in the background, as a running scheduler does.
kvlonge
enabled auto-merge (squash)
November 6, 2026 09:49
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
The UI's model page shows microbatch coverage: what is complete, where the holes are, and what a version change still needs rebuilt. That history is mirrored from the warehouse but was never projected.
Changes
GET /api/control/locations/{location}/targets/{target}/microbatches/{model}?limit=returns coverage of the model's newest recorded relation and generation, ornull. Only concurrent microbatch models are tracked. Needs view on the whole target.complete;gap, a hole between completed partitions;replay_required, inside the newest live replay requirement and completed at another version. A newer completion at a third version ends it, as in the executor.known_gapslists every hole;batchesholds the newestlimit(default 200, cap 1000).fromisoformatport, so+00offsets work and instants order correctly.sqlbuild-model-config(depends only onsqlbuild-core) moves one layer earlier so the control server can use that parser.Verification
cargo test -p sqlbuild-orchestration --all-features: 102 passed on SQLite and PostgreSQL. The endpoint test covers integer and offset bounds whose text order is wrong, mixed bound spellings, a newer overlapping completion, two requirements, a superseded one, both hole kinds, other scopes, generations and models, truncation, an untracked model and a denial. Mutating each rule fails it, except dropping the zero-width skip, which the merge absorbs.make check-ci, public-repository scan.microbatch_coverage.json.