Repository navigation
feat(changes): name the source store and log epoch on every page - #789
Conversation
|
Review scope update: also review |
A change page did not say which store produced it, and nothing marked a history boundary, so a follower could not tell a restored or cloned primary, or one that had removed served records, from the one it was following (local-sync-mode.md §5, F5). Every page now carries source.store_id and source.log_epoch. The epoch lives in a new one-row log_epoch table, minted when the store is created (or first opened by this version) and minted again by Store::mint_log_epoch for an operation that removes served history. Share reconstruction excludes the table, so a restored copy mints its own epoch and its followers re-bootstrap. The explicit restore/adopt ownership step is deferred to aegis-s24.2, per the xdvg.1 ruling. Tests cover the page source, an epoch stable across reopen, a new epoch after minting, and a store that predates the table getting one on first open. Removing the field turns both tests red. Refs aegis-xdvg.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185RxTpLsPCQFB9ni72Nzac
An oversized transaction's begin and commit frames carried no source,
so a follower could not epoch-check a chunked transaction the way it
checks a whole page, although a changed epoch must mean re-bootstrap,
never splice. Both frames now carry the page's {store_id, log_epoch}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BzgSY2LpdGhBhb7D1nHbiF
614ce73 to
f2c51c0
Compare
|
APPROVE at f2c51c0, base ff81361. Reviewed the full ten-file proposal, including source identity on chunked transaction begin and commit frames. Complete hosted workflows and normal native admission preceded source review. Independent exact-source library controls: four pass, including empty/filtered pages, separate stores, stable epoch on reopen, explicit epoch rotation, and read-only observation with mutation refused. An isolated harness compiling the exact chunking function and cursor module passes five controls, including source identity at both boundaries, record reassembly and commit-only cursor advancement. Both guarded runs left watched HOME paths and resources untouched. The harness is a focused check, not a full server build; hosted current-head server and feature checks supply the wider coverage. No blocking source finding. Native approval accepted |
What
Every change page now names its source:
source.store_idandsource.log_epoch. The epoch is minted at store creation, or on first open for a store that predates it, and is kept across reopen. A follower holding a cursor from another epoch knows its cursor names a different history and must re-bootstrap.log_epochis excluded from shares, because it is this store's local position, not content.Base
The PR is rebased onto main
ff81361f(#788 landed) and is not stacked. Its commits are89c53f9c(source store and log epoch on every page) andf2c51c0b(the source on a chunked transaction's begin and commit).git range-diffagainst the publishede6a6dd5e/614ce73dshows both identical (=). #788's squashff81361fequals the reviewed01bb0978patch. All knowledge witnesses match their files. #785 is rebased onto this branch and follows it.Evidence
f5_pages_carry_source_identityfailed before this change: the page had no source. It passes after.f5_log_epoch_is_stable_until_minted_again: the epoch is stable across reopen, minting changes it, and an upgraded store gets one late.a_chunked_transaction_names_its_source_on_begin_and_commit: begin and commit carrysource, so a follower can epoch-check a chunked transaction.f2c51c0b:cargo test --features shacl,owl3208 passed, 0 failed; server binary 237 passed, 0 failed; clippy-D warnings -A missing-docsexits 0 forfullandshacl,owl; fmt clean.Rollback
Revert the commit. The new table is left unused, which is harmless. Pages lose
source.🤖 Generated with Claude Code
https://claude.ai/code/session_01BzgSY2LpdGhBhb7D1nHbiF