Repository navigation
The temporal snapshot, stage SN-1: the landing log, and the two forms of removal - #92
Merged
Merged
Conversation
The owner decided on 2026-11-11 that a retire is the shallow removal: the item leaves the present, its history stays readable at the cuts where it existed, no seal is applied, and a note written later at the same path takes a fresh identity. The library proved the two seals; this adds what the decision rests on, over the same model. With no seal the history of a key at a cut is its landings inside the cut (landingsAt): append invariant, a prefix of the history at a later cut, every landing at the head, and holding as its end everything the stricter seal serves. With a fresh identity at a retired path (lives: the path with the number of its retires before the event) the identity a landing takes is a function of the events before it, the history of the identity a path holds at a cut is the path's landings since its last retire, and a retired identity keeps the life it had at every cut that holds its retire. Two controls: an identity used again after its retire inherits the retired item's versions, and under the seal a later retire empties a history that was served. Eighteen theorems, two of them controls. The seals' theorems stay. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Seeds 521 to 528 on the model's own definitions. Five attacks survive all 500 instances: the history with no seal is unchanged by growth, a retire included; it ends with what the stricter seal serves and grows by prefix; under fresh identities the history of the identity a path holds is the path's landings since its last retire; a retired identity keeps its life at every later cut; the identity a landing takes is a function of the events before it. Three controls are refuted: the sealed history taken for append invariant, a path's identity used again after its retire, and a retired identity's history taken for empty. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The owner decided D3 on 2026-11-11, against the note's recommendation: removal has two forms. A retire is the shallow one: the item leaves the present, its history stays readable at the cuts where it existed, no seal is applied, and a note written later at the same path takes a fresh identity. The purge of section 6.1 is the deep one. The note carries the decision wherever the design rested on the seal: decisions 4 and 6 of 1.2, the log's kinds and columns (no unseal, one horizon column), 3.6, the reads of 4.1 and 7, section 6.2 rewritten with what the decision costs and why the fresh identity removes the failure the stricter seal was recommended for, the laws of section 10, D3 recorded as decided, and the build order: the seal and the unseal leave SN-3, which becomes the two forms of removal and owns the fresh identity, since that changes what the writer admits, needs the log's positions and must be in force before SN-4 reads a history. The two seals stay as proved facts of the model. The six findings the review of the design left open: - an authored supersession reads the landings of its two notes: listed in 3.5 and filtered by two recorded log positions; - a second declaration of a pair rewrites its note: decl gets a chain-table row a declaration under a salted commitment, and 5.4 says the store is keyed by the pair; - the resolver's bound is the bound of the three resolved references and no position recorded for the filter; - the dispositions are read at a position on a verdicts chain, added to 3.1, and the filter's stores are named; - the CI witness's attestation of a commit is listed and filtered, and the one row the filtered read withholds at the head is stated; - the article's sentence on model output is the article's commit. Section 2.3's item 8 gains a second case, checked on the catalog: a new note at a path a rename left takes the identity that moved. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Two sentences the review found wrong. Resolving a pass attestation's reference lowers the attestation ledger; a row of model output sits on a chain no landing reads, so the article now gives the cascade for the pass alone and says the filter takes model output with it. Algorithm 1's bound is the bound recorded for the resolved references only, so the landing heads a pass or a run records for the filter are not followed. The article also states the decision on a retire, taken after it was written: no seal, a fresh identity at a deleted note's path. The counts are this tree's: 193 theorems, twenty controls, seeds 430 to 528, 5,250 declarations audited and 56,231 replayed. Ten pages, as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Snapshot library grew by 18 theorems, 5 attacks and 3 controls for the retire with no seal: 1,538 theorems, 232 attacks and 206 controls, 25,649 lines of models and proofs, 5,757 of attacks, and 56,231 declarations replayed. formal/README.md names the new theorems, the two controls and the seeds. The tests badge is not touched: no Python changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The catalog is rewritten in place, so it held no record of which digest a path held when. Stage SN-1 of dn-temporal-snapshot adds that record in the catalog's own file: two tables, landing_chains and landings, with the three indexes of section 3.2, appended to by the catalog's six writing methods in the transaction of the row each writes, so a deferred() batch carries its log rows and the catalog is the fold of the log. The migration that fills doc_id also creates the tables and, on a catalog that has rows and no log, writes the genesis of each class followed by a horizon. remove and remove_digest empty the rows of the path or of the digest and keep their keys, positions, commitments and hashes; relabel_provenance rewrites the label of a chain and no row; record takes the version the writer appended or found (writer.py's two key writes, sync.py's one) and appends nothing when nothing changes. The reads are on VaultCatalog: chains, head, read_at, state_at, history_at, heads_at, read_between and verify. Nothing reads them yet. The keyed hash of a path needs a secret, read as the repository reads an instance's secrets: get_secret, from the environment, the instance's own item. Without it the genesis and every write raise LandingLogKeyMissing and write nothing; another value is refused by the chain's key check. A read needs no secret. Two departures from the note's section 3.2, both for the fold: a path that changes class leaves its chain with a sixth kind, leave, since the move that a rename's tombstone writes must fold to the catalog's tombstoned row; and the genesis writes a tombstoned path's tombstone as a move where another active path holds its identity, as tombstone does. tests/property/test_landing_log.py checks SNP-1 to SNP-5 over random catalog writes with retires, renames, relabels, re-keys and purges, and the stage's cases; the suite's fixture gives every test a fixed secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog's landing log keys its hash of a path with landing-log-key, which has no switch: the first open of a catalog that has rows writes the genesis and every catalog write appends, so a process that writes the catalog refuses to without it. The wrapper now carries the item from the Keychain, and the runbook's section 0 says how to place it, that the daemon must run under the wrapper before the build is deployed, what a named instance reads, that a lost secret leaves the log unwritable, and that a rollback drops the two tables. The secrets map gains its row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The landing log is the first code that relies on the snapshot's laws, so the five it transcribes enter docs/LAWS.md as the temporal snapshot, family XVI: append invariance, monotonicity, composition, idempotence, and a derived view as a function of the prefixes. Each row cites the declarations section 10 of dn-temporal-snapshot lists for it, the controls among them, anchors to the catalog's reads, and names the property tests of tests/property/test_landing_log.py as its falsifiers. The 47 cited declarations carry their law in bold at the head of their docstrings (head_readAt gains the docstring it lacked, and snapshot_grow, cited under SNP-1, is marked so), are restated with their proofs left out in formal/Spec/Snapshot.lean over the model, and are judged by the comparator. SNP-6 to SNP-10 stay design theorems; the module docstring and formal/README.md say which are which. check.sh is green: 375 statements judged identical, 105 rows, 381 cited declarations, 92 law markers, 5,250 declarations audited and 56,231 replayed by the six checkers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a copy of the corpus instance's catalog, 400,274 rows in one chain, a landing took about 40 ms: the update that writes the closing stamp of the path's previous row took the primary key, (chain, seq), and walked the whole chain to find the path's rows, though the statement names the path's key. The reads already named landings_path for this reason (dn-temporal-snapshot section 4.1, where the planner's choice cost 49 to 57 ms on the fixture). The closing update and remove's emptying now name the index too, and a record takes tens of microseconds again. A test traces every statement the log runs for one path, a record, a tombstone, a re-key, the two reads and a remove, and asks SQLite's plan of each to name landings_path; without the named index it fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eval/landing_log_bench.py measures stage SN-1 on a copy of a catalog file, migrated in place under a secret made for the run: the migration and its genesis, the bytes a row takes in the table and each index, the chain's verify and the fold of the log against the catalog, a key's write in a batch of 10,000 with the log and without it, and every read. It refuses the configured instance's own catalog. Two runs on copy-on-write clones of the corpus instance's catalog, 400,274 rows: the migration 6.2 to 6.3 s, 429 bytes a row (the table 381, the key index 47), the fold equal to the catalog, verify 3.1 s; one path at a cut 14 to 15 us; every head at the head 1.6 s, of which the walk in SQL is 54 to 57 ms; a key's write 42 us more for a new path and 65 to 69 us more for a new version, 0.1 to 0.2 percent of a lazy landing. docs/experiments/landing-log-2026-11-11.md reads them; the first run is what found the closing update walking the chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage SN-1, the landing log, is built, so the note says so where it matters: the front matter and the header, section 1.4 (SNP-1 to SNP-5 in the ledger, the rest design theorems), section 11 (the measurements on a copy of the corpus instance's catalog, with the two findings the first run made: the closing update walking the chain, and every head of a 400,274-event chain at 1.6 s, the chain section 4.2 keeps heads for), and section 12 (SN-1 built, its rollback as built). Section 3.2 marks the three places the build departed from the design: the key of a path takes half its key from the instance's secret, which is not in the file, so the file alone cannot test a guess of a purged path (and section 6.1's purged row says so); a path that changes class leaves its chain by a sixth kind, leave, since a rename's move must fold to the catalog's tombstoned row and one kind cannot fold both; and the genesis writes a renamed path's tombstone as a move, as tombstone does. The fold is stated as the catalog keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eight pages in the format of the existing articles: the catalog's missing past, the decision of the design on the two forms of removal, the five laws as the model states them with their Lean declarations, the log as built (its tables and kinds, the fold, commitments, holes that keep their keys and the key's half outside the file, the genesis, the write in pseudocode, the reads), and the evaluation: what the gate proves and judges, what the property test checks, and the measurements on a copy of the corpus instance's catalog, with the query plan the first run found walking the chain. Limitations and the next stages close it. Every reference was looked up on Crossref by its DOI or its title. scripts/build_papers.sh builds it clean, with no undefined reference and no overfull box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The genesis of the corpus instance's catalog holds the write lock for six seconds, and every open of the catalog takes the lock briefly for its doc_id backfill, so a second process that opened the catalog while the first wrote the genesis gave up after the connection's five seconds with "database is locked". Until the file holds the log with a chain, the migration now waits up to two minutes for the lock; once the log exists an open waits five seconds as it always did, so a hung writer still fails a new open quickly. Checked by hand: an open while another connection held the write lock for 6.5 s waited and then wrote the genesis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ledger gains family XVI, the temporal snapshot: 105 rows in 16 families, 381 cited declarations and 92 law markers, and 375 statements judged by the comparator, from the check.sh run of the ledger's commit (5,250 declarations audited, 56,231 replayed, the attacks and controls unchanged at 232 and 206). The library has 27 statement files, 25,652 lines of models and proofs and 3,809 of statements. The deterministic tier is 3,645 tests at 77% coverage, the twelve new ones the landing log's. formal/README.md's count of the judged theorems follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d write Review of SN-1 found three places where the landing log did less than dn-temporal-snapshot says, and tests that would not have noticed. A purge by digest emptied the rows of the digest and nothing else, so a note deleted and then purged, purge_raw's usual case, kept its retire: its path, its identity and the date of its delete stayed in the file, against D14. remove_digest now also empties a path's other rows, its retire, move and leave in every chain, once none of its versions keeps its content; while one does, the hole stays tied to the path as section 6.1 intends. It finds those rows by the names they carry and the keys the emptied rows keep, so a purge still needs no secret. verify took any row without its salt for a hole, so a row whose salt was nulled while its content stayed, or was rewritten, verified. It now fails a row without its salt that keeps any of the content a purge empties. Inside a deferred() batch a write whose log row failed after its catalog row left the catalog row in the batch when the caller caught the error and went on. Each write in a batch is now a savepoint, rolled back on its error. The docstrings of history_at say the order it gives across two chains of a class is a rule of the prefixes, and the module docstrings say which writes and reads need the secret. The tests: the property test starts from a random catalog's genesis and checks, after every write, that no row carries att_head, that a hole keeps no content, that every name the log carries is carried by a version that keeps its content, and that a change of identity follows a move; across a relabel it compares a path's last event chain by chain. Each of the six writes is killed, and failed, between its two rows, in a batch too. New cases pin the sync's versions, a re-key's version, the genesis's closing stamps by the three reads, a relabel over closed rows and holes, a history over two chains, a purge of every version of a deleted note (no row, and after a vacuum no byte, names it), a hole that keeps content, and the secret over every write and read. Of 58 seeded bugs, the reviewers' 50 (one rewritten for the new batch code) and 8 for these fixes, every one fails the suite on hypothesis seed 1 but one that changes nothing (it nulls a column already null). The ledger's rows SNP-1, SNP-2 and SNP-5 say what the tests check, the relabel's exception among it, and cite the renamed and new tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bench's control patched out LandingLog.store and so kept the read of the path's row before each write and the explicit transaction that SN-1 added to record: what it measured was what the log's rows add, not what SN-1 adds to a key's write. A key's write is now timed three ways on the same file, the order turned each round: record as built; the same with the log's appending switched off, named for what it keeps; and the write as record made it before SN-1 (f969904), the upsert alone. The first against the third is SN-1's cost, the first against the second the log rows'. With --fresh, it also lands new one-class catalogs of the given sizes, paths and titles of the corpus's lengths, and times every head at the head against the same walk counted in SQL, so the cost a head returned is read apart from the walk on chains under section 4.2's threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The savepoint each write in a deferred() batch now takes keeps its journal in a temporary file unless the connection says otherwise, and on a copy of the corpus instance's catalog that doubled the cost of a key's write in a batch (a new path 105 us with the log against 49 before the savepoint). The catalog's connection now keeps its temporary store in memory: on a catalog of 100,000 rows the savepoint costs 6 us a write there, against 38 to 50 us in a file (two runs, batches of 10,000, load 3.9 to 4.2). No query of the catalog sorts or groups more than a few rows in the temporary store, by their plans, so nothing else of size is held there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te before it The record first gave the log's cost as the write with the log against the write with its rows switched off, which left out the read of the row before the write and the transaction SN-1 added around them, and it said nothing else in a landing changed, which leaves out the vault's one more read of its version chain. Two new runs of the harness, on fresh copy-on-write clones of the corpus instance's catalog at the code after review, time the write three ways: SN-1 adds 51 to 53 us to a new path's write and 84 to 86 us to a new version's against the write before it (4.6 to 4.7 and 34.5 to 34.7 us), 0.16 to 0.28 percent of a lazy landing; the log's rows are 45 to 47 and 74 of them. Every head costs what building the answer costs: the walk is 0.14 to 0.15 us an event, each head returned 3.5 to 3.9 us more, on the corpus's chain and on new chains of 30,000 and 100,000 paths alike, so a chain of 30,002 events reads its heads in 0.11 s. That meets SNF-6's first condition, which the record had read as the corpus's chain being over section 4.2's threshold; kept heads would not lower it. The two earlier runs that found each savepoint's journal in a temporary file are kept in the JSON. The migration took 6.7 s, a row 429 bytes, at a load average of 2.7 to 3.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What review of the built stage found, stated where the design stands, each marked as built: - Section 6.1 and D14: a purge by digest empties a path's tombstones with its last version, so no row names a purged note; while a version keeps its content the hole stays tied to the path. SQLite keeps the bytes it frees until a vacuum, which is SN-3's reach. - Section 3.2 and 12 (SN-1): which writes and reads need the secret, and that every process's first open of a catalog without a log writes the genesis, a reader's included. That and "no reader's behaviour changes" cannot both hold; which gives way is left to the owner before SN-1 is deployed. D12 and SN-3's reason say what SN-1 changes. - Section 4.2, 11, SN-c and SNF-6: every head costs 3.5 to 3.9 us a head returned, so a chain of 30,002 events reads its heads in 0.11 s; SNF-6 is met, kept heads would not lower that cost, and the threshold or the read's shape is open before SN-4. Section 11 gives the runs against the write before SN-1 and the savepoint's journal found in a file. - Sections 3.1, 6.2 and 12: the rollback numbers chain ids and positions from 1 again, which SN-3's fresh identity must not rest on; how it is kept from repeating is SN-3's to decide. - Section 6.2: the migration's count sees only what the log recorded since its genesis, and not a note landed at a path a rename left; the exception for a note that declares its identity is graded as the design's reading of the decision, with a falsifier, SNF-17; a life a purge closes with a hole is named among what the model leaves out. - Section 10: SNP-1's test compares a read by class while the class's chains are the ones it had, and chain by chain across a relabel; SNP-2's attacks include 523; SN-3's test is for notes that declare no identity. - The header, section 6.3, section 11's opening and SN-1's list of results no longer speak of a design with nothing built, and name leave where a path changes chains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 0 said a process that writes the catalog refuses without the secret and a read needs none once the genesis is written. As built, the first open of a catalog that has no log writes the genesis whichever process opens it, a reader included, and holds the write lock for it; after that, the writes that append to the log and remove need the secret, while a relabel, a purge by digest, a write that changes nothing and every read but the log's two reads of one path do not. The section and the secrets table say so, with every process that opens the catalog under the wrapper, the daemon first, and the open question of moving the genesis off the first open. It also says that a rollback's new genesis numbers chains from 1 again, and that SQLite keeps the bytes a purge frees until a vacuum. The wrapper's comment follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The statements' module docstring said each law's controls are among its statements; only SNP-1's two and SNP-5's one are theorems there, and the other controls of the five laws are refuted attacks in PalaceTest/Snapshot.lean. It now says so. Seed 523's second half attacks landingsAt_mono, which SNP-2's row cites, but its comment filed the whole attack under SNP-7: the comment names both laws, and formal/README.md's SNP-2 row lists the seed. No declaration or statement changed. Checked under the 4 GB cap: the source check, the Palace and Spec builds, lake test (seed 523 among the attacks that survive 500), the mk_all checks, the sorry budget, the escape grep and the ledger cross-reference (105 rows, 381 cited, 92 markers, 375 statements). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The landing log's article said a copy of the file cannot test whether a hole was a given path and that the holes reveal nothing to whoever copies it; as built, a purged note's retire kept its path until review changed the purge, and SQLite keeps the bytes a purge frees until a vacuum. It now says what a purge empties, what the key a hole keeps tells without the secret, and where the freed bytes go. It says which writes and reads need the secret and that the first open writes the genesis for a reader too, left to the design's owner. Its measurements are the new runs: the stage adds 51 to 86 us to a key's write against the write before it, and every head costs 3.5 to 3.9 us a head returned, which meets the design's falsifier for kept heads; the savepoint's journal found in a file is among what measuring found. Its account of the tests follows the suite (a relabel moves a chain to another class, so a read by class at a past cut follows it), with the seeded bugs. Nine pages, built clean. The design's article said the snapshot's theorems are not among the judged statements; SNP-1 to SNP-5 are, 47 of the 375, since the first stage. Its resolver resolves the repository sensor's attestation of a commit and filters a continuous-integration witness's, as the note's repair of the review's sixth finding has it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deterministic tier is 3,654 tests at 77% coverage, the landing log's now 21 (3,645 before review, with 12). The statements' module docstring grew by a line, so the statement files are 3,810 lines; the models and proofs (25,652 lines), the attacks (5,757 lines, 232 attacks and 206 controls), the 375 judged statements and the ledger's 105 rows are as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The landing log's module docstring said a chain's id is never reused. The rollback drops the log's tables and the next genesis numbers its chains from 1 again, so an id is given once only while the tables stand, as dn-temporal-snapshot's sections 3.1 and 12 now say; SN-3's fresh identity must not rest on more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bles stand The landing log's DDL comments, in the code and in the note's section 3.2, said a chain's id is never reused and a position never given twice, and the note's table of chains said the same of `seq`. A rollback drops the two tables, and the genesis after it numbers both from 1 again (section 12, SN-1), as the module's docstring already says. The comments now say given once while the tables stand, and the note's DDL and its table point at section 12's rollback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`empty_digest` read the digest's rows by a walk of the log, emptied them by a second (`UPDATE ... WHERE digest = ?`) and read the names of their paths by a third, where the article and the record say a purge walks the log twice. It now empties the rows it read by their positions, on the primary key, so its walks are the read of the digest's rows and the read of the names; every other statement seeks. The rows it empties are the same. The plan test counts the purge's walks of `landings`, two, and the test of a deleted note's purge gives one of its digests to another note's earlier version, so a purge that emptied only some of a digest's rows fails it on any seed (the property test alone caught it on seeds 1 and 3, not on 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… each column of a hole Three gaps the review found by seeding bugs the suite let pass. - A batch whose failed write rolled back the whole transaction, in place of its savepoint, passed: no write of the batch preceded the failing one. The batch now records a note before it, and the test asks that note's catalog row and log row to commit with the note recorded after. - The writer's batched key write (`Writer.finish` with producers, under `Writer.land_batch`) passing no version passed every test. A new test lands two notes, then an edit of one, through a plan of fresh stores with `batch=True`, and asks each `store` row of the log to carry the version chain's number; SNP-5's row cites it. - `verify`'s check of a hole and the test's oracle both read `Landing.content`, so a `content` that left out a column weakened both together. The oracle reads the test's own list of what a purge empties, and `verify` is asked to fail a hole that keeps any one column of it. Each of the four seeded bugs now fails the suite on hypothesis seeds 1 and 2, and so do the review's 25 others on seed 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daemon writes the catalog, and every write that appends a row to its landing log, the genesis included, needs the landing-log secret, so the daemon needs it wherever the owner places the genesis. `palace deploy` installs a committed plist that changed (`launcher.py:1071-1078`), so an installed plist edited by hand would be overwritten: the committed ones must carry the secret. Both now run `uv run scripts/palace.py start` under `scripts/run_with_secrets.sh`, which reads the item from the Keychain and execs the rest. The daemon twin runs as `ouroboros` and reads that account's keychain; the plane migration's section 7 copies the item there with the unseal key, the same value, and the twin's preconditions name it. The runbook's section 0 says so, and its wrapper block, which the landing-log paragraph called the wrapper that carries the item, now carries it. The note's section 12 says that every writer needs the secret under either placement of the genesis, which stays the owner's choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Twenty-one tests beside the property test: the writer's batched landing carries the version too, and a batch's other writes commit around a failed one. A writer needs the secret under either placement of the genesis. The second review seeded 29 bugs, four of which passed; with the tests it asked for, those 29 and three seeded in the purge's emptying by position all fail the suite on hypothesis seed 1. Nine pages, a clean build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deterministic tier is 3,655 tests at 77% coverage, the landing log's now 22 (3,654 before, with 21). No Lean file changed: the 375 judged statements, the ledger's 105 rows and the library's lines and attacks are as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
ascalva
added a commit
that referenced
this pull request
Nov 12, 2026
The landing log (#92) keys every catalog write with the instance's own secret, and a named instance reads it as `<id>.landing-log-key`. The suite's fixture sets only the default instance's item, so the launcher test over the code overlay failed at its first sync once the branch was rebased onto the log. The test now gives the overlay's instance the suite's test value, for the in-process sync and the spawned launcher. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ascalva
added a commit
that referenced
this pull request
Nov 12, 2026
The landing log (#92) keys every catalog write with the instance's own secret, and a named instance reads it as `<id>.landing-log-key`. The suite's fixture sets only the default instance's item, so the launcher test over the code overlay failed at its first sync once the branch was rebased onto the log. The test now gives the overlay's instance the suite's test value, for the in-process sync and the spawned launcher. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This pull request does two things for
dn-temporal-snapshot, merged in #91. It records the owner's decision of 2026-11-11 on what a retire does to the past, with the theorems it rests on, and closes the six findings the review of #91 left open (part A, the design). And it builds the design's first stage, SN-1, the landing log, as section 12 lists it: the catalog's past in two tables of its own file, written by the catalog's six writing methods in the transaction of the row each writes, with its reads, its tests, its ledger rows and its measurements on a copy of the corpus instance's catalog (part B). Nothing reads the log yet. What it changes for a process, the secret it needs at the first open of a catalog and for the writes that append to the log, which the daemon's plists now carry, is stated under Notes, with what it leaves to the owner before deploying: one decision, and two writers that have no secret yet.Abstract
The catalog of the store maps each path to the content it holds now and is rewritten in place, so it has no past: nothing records which content a path held before, or whether it was deleted. The landing log is that past. It is appended to by the catalog's six writing methods in the transaction of the row each writes, so the catalog is the fold of the log and no caller can write one without the other. A row carries a salted commitment that a hash chain covers, so a purge empties a row and the chain still verifies; a row names its path by a keyed hash whose key is split between the file and a secret outside it, so a hole still shadows the path's earlier versions, the key it keeps cannot be tested against a guess of the path without the secret, and once no version of a path keeps its content no row names it. The design takes two forms of removal, by its owner's decision: a retire leaves the item's history readable at the cuts where it existed, with no seal, and a note written later at its path takes a fresh identity; a purge leaves a hole at every cut. Five laws of the design (append invariance, monotonicity, composition, idempotence, and a derived view as a function of the prefixes) enter the ledger of laws as 47 statements machine-checked in Lean 4, and a property test checks the code's reads against them over random sequences of writes. On a copy of a catalog of 400,274 items the migration that writes the log takes 6.7 s and 429 bytes a row, the stage adds 51 to 86 µs to a key's write, and a read of one path at a cut takes 14 to 19 µs. Measuring at that size also found a query plan that walked the whole chain on every write, and that reading every head costs what building the answer costs.
The article is
papers/2026-11-11-landing-log/paper.tex(nine pages); part A updatedpapers/2026-11-10-temporal-snapshot/paper.tex.What changes
Part A: the owner's decision and the open findings (design work)
formal/Palace/Snapshot.lean, eighteen theorems, two of them controls): with no seal the history of a key at a cut is its landings inside the cut, append invariant, a prefix of the later history, every landing at the head, and ending with what the stricter seal serves; with a fresh identity at a retired path (lives) the identity a landing takes is a function of the events before it, the history of the identity a path holds is the path's landings since its last retire, and a retired identity keeps its life at every later cut. The two seals stay as proved facts of the model. Attacks and controls on seeds 521 to 528.declgets a chain-table row a declaration under a salted commitment); the resolver reads the bounds of the three resolved references and no position recorded for the filter; the dispositions are read at a position on averdictschain; the CI witness's attestation of a commit is listed and filtered; and the article's two sentences the review found wrong, on what a resolved pass reference takes down and on the resolver's bound, are corrected.Part B: SN-1, the landing log (the build)
core/stores/landings.py,core/stores/catalog.py. The tableslanding_chainsandlandingswith their three indexes, created by the catalog's migration after it fillsdoc_id; on a catalog with rows and no log, the genesis of each class followed by a horizon, in one transaction. The log written insiderecord,tombstone,relabel_provenance,migrate_rekey_doc_id,removeandremove_digest, so adeferred()batch carries its log rows, and each write in a batch is a savepoint, so a write that fails leaves neither of its rows even when the batch's caller catches the error and goes on; a write that changes nothing appends nothing;relabel_provenancerewrites the label inlanding_chainsand no row.removeempties every row of a path as section 6.1 says, the key, the position, the commitment and the hash kept;remove_digestempties the rows of the digest by their positions and, for a path none of whose versions then keeps its content, the path's other rows too, so no row names a purged note; it walks the log twice, for the digest and for the names.att_headisNULL. The reads onVaultCatalog:chains,head,read_at,state_at,history_at,heads_at,read_between,verify, which also fails a row without its salt that keeps any content a purge empties.recordgainsversion, passed where the place keeps a version chain: the two key writes ofWriter.finish(core/ingest/writer.py, the version just appended or found: the two call sites, and three lines that take it from the chain) andVaultSync.sync_path(core/ingest/sync.py). Nothing else inwriter.pychanges.get_secret, from the environment, Keychain-backed, the instance's own item (landing-log-key,<id>.landing-log-keyfor a named instance). Whatever appends a row or seeks a path's rows by their key needs it: without it the genesis, arecordor atombstonethat changes the catalog, the re-key andremoveraiseLandingLogKeyMissingand write nothing, and so do the two reads by path,state_atandhistory_at. A relabel, a purge by digest, a write that changes nothing and the other reads need none. Another value is refused by the chain's key check (LandingLogKeyMismatch).scripts/run_with_secrets.shcarries the item; the daemon's two plists (ops/lifecycle/com.mind-palace.palace.plistand its daemon twin) now run under it, since the daemon writes the catalog andpalace deployinstalls a plist that changed; and the runbook's section 0 says how to place the item, inouroboros's keychain too for the daemon twin (docs/runbooks/plane-migration.mdsection 7), and which processes need it.tests/property/test_landing_log.py, 22: SNP-1 to SNP-5 from a random catalog's genesis over random sequences of catalog writes with retires, renames, relabels, re-keys and both purges (after every write the catalog is the fold of the log, every chain verifies, no row carriesatt_head, a hole keeps no content, every name the log carries is carried by a version that keeps its content, and a change of identity follows amove; every cut taken reads after every later write the rows of every chain and each path's last event in each, and the state of every path over a class while the class's chains are the ones it had, up to the holes a purge leaves; the reads are prefixes, a checkpoint continued over the delta is the catalog, the state at the head is the catalog's row, and the seek, the closing-stamp read and the fold agree at every position, the genesis's included, with no path alive twice). The stage's cases: a record that changes nothing and a store the UNCHANGED check skips write no row; the writer, its batched landing too, and the sync carry each landing's version; a change of identity moves first and a re-key carries the version; each of the six writes, killed or failed between its two rows, leaves neither, in a batch too when its caller goes on, while the batch's other writes, before it and after it, commit; a failed batch leaves no log row; the genesis equals the catalog, closes each tombstoned path's store and ends at a horizon; a relabel into a class with rows changes no row, closed rows and holes included; a history over two chains of a class follows its rule; a purged old version of a live path is a hole by all three reads, and a purge of every version of a deleted note leaves no row, and after a vacuum no byte, that names it;verifyfails on an edited row and on a hole that keeps any one column of its content; the secret is needed by what appends or seeks a path by its key and by nothing else, and another is refused; every statement by path is planned on the key index, and a purge by digest walks the log twice. A small fixture,tests/fixtures/landing_writes.py, gives the six writes to a killed process. The suite's fixture gives every test a fixed secret.docs/LAWS.mdfamily XVI, the temporal snapshot, rows SNP-1 to SNP-5 (statements as section 10 gives them, the reads as anchors, the tests as falsifiers, the declarations section 10 lists, controls included); the 47 declarations carry their law in bold, are restated informal/Spec/Snapshot.leanoverPalace/Snapshot/Defs.leanand named informal/comparator.json. SNP-6 to SNP-10 stay design theorems. SNP-1's row says a relabel, which the model leaves out, moves a chain to another class, so a read by class at a past cut follows the chain's class now while a read by chain does not change.eval/landing_log_bench.pywith its recorddocs/experiments/landing-log-2026-11-11.md, and in the note's section 11. A key's write is timed three ways: as built, with the log's rows switched off, and as the catalog made it before SN-1.Measurements
Two runs on copy-on-write clones of the corpus instance's catalog (400,274 rows, all
observed, active); the original was never opened. Apple M2 Pro, Python 3.15.2, SQLite 3.54.1, other work running, the load average between 2.7 and 3.9; the harness peaked at 692 MB resident.verify, every commitment and hashstate_atof one path at the middle cut; its keyed hashhistory_atof one pathread_at,read_between, 1,000 positionsheads_atat a tenth, the middle, the headheads_atof new chains of 30,000 and 100,000 pathsGates
The branch was then rebased onto main at
0a5fba27, after #90 merged. OnlyREADME.mdconflicted, andcore/ingest/writer.pymerged with the two key writes as they were. The gates below ran before the rebase, on the old base. After it, the README's test count is set by arithmetic and not by a run: main's 3,651 plus this stage's 22 is 3,673. The 180 tests of the five test files main gained or changed with #90 pass on the rebased head; nothing else was run again, and CI on the pushed head is the check.Run in this worktree as CI runs them, on the branch's last change to code, tests and texts, each process under 4 GB resident; the README's counts were set from these runs after them:
uv run ruff check .: clean.uv run python scripts/check_imports.py: the core firewall and the worker boundary hold.uv run mypy core agents eval ops scheduler scripts: no issues in 371 source files;uv run mypy: 67 errors, thetests/baseline.uv run python -m ops.type_gate: membership, bare ignores and the inner ring clean; the one parked shim finding is unchanged..github/workflows/ci.ymlruns it (with coverage): 3,655 passed, 11 skipped, 21 deselected; 77% coverage, in 267 s at a load average of 4.1 to 5.4, peak 1.9 GB resident. The 22 tests oftests/property/test_landing_log.pyare this stage's.formal/check.sh: green on the branch's last change to a Lean statement, before review: 375 statements judged identical by the in-process comparison (37,590 constants compared), 105 rows, 381 cited declarations and 92 law markers consistent, 5,250 declarations audited on the standard axioms with nosorry, 56,231 replayed by Lean's kernel, leanchecker-paranoid, lean4lean, con-leche, con-ron and nanoda. Review changed a module docstring offormal/Spec/Snapshot.lean, a comment offormal/PalaceTest/Snapshot.leanand the ledger's rows; on that tree the source check,lake build --wfail Palace,lake build Spec,lake test(every attack and control), themk_allchecks, thesorrybudget, the escape grep and the ledger cross-reference (105 rows, 381 cited, 92 markers, 375 statements) are green. The second review changed no Lean file; on the final tree the source check, both builds,lake test,lake lint, themk_allchecks, thesorrybudget (0 of 0), the escape grep and the ledger cross-reference (105 rows, 381 cited, 92 markers, 375 statements) are green, the builds and the attacks served from Lake's cache of that tree. The audit, the export with its kernel replay and the in-process comparison were not run again: each has a process past 4 GB resident on this machine, and no declaration or statement changed. The attacks and controls were raised by part A from 227 and 203 to 232 and 206, and part B left them there.scripts/build_papers.sh: every article builds clean, this one at nine pages and the design's at ten, with no undefined reference or citation and no overfull box.Landing.contentthat left out the title, or everything but the bookmark. With the tests it asked for, all 29, and three seeded in the purge's emptying by position, fail the suite on seed 1 (load 3.9 to 4.2); the four and the three fail it on seed 2 as well, the three on seed 3.Notes
LandingLogKeyMissingwithout it, and holds the write lock for the genesis, 6.7 s on the corpus's catalog, while other openers wait up to two minutes. After the genesis a reader needs no secret and opens as fast as before. The design's rule that the genesis refuses loudly without the secret and its line that no reader's behaviour changes cannot both hold while every open runs the migration. Either the genesis moves to a writer's first write, or to an owner-run migration, and an open without the secret skips it; or SN-1 is stated as changing what the first open needs, and every process that may open the catalog first runs with the secret. That choice is the owner's. Under either, every writer needs the secret, the daemon first, andpalace deployinstalls the committed plist when it changed (ops/lifecycle/launcher.py:1071-1078), so this branch runs both plists (ops/lifecycle/com.mind-palace.palace.plistand its daemon twin) underscripts/run_with_secrets.sh; the daemon twin runs asouroborosand reads that account's keychain, where the runbooks place the item as they place the unseal key. The item must be in the Keychain before the deploy, or the daemon stops at its first open; a process that opens the catalog before the daemon has written the genesis needs it too. A named instance reads<id>.landing-log-key, and the wrapper refuses a named instance, so its process must be given the item under that name. A lost secret leaves the log unwritable.com.mind-palace.tick, installed bystack up) lands new turns in its own process when no daemon run is live, so it writes the catalog. Its plist runs with no secret, and a test pins that. After this build such a sync is refused withLandingLogKeyMissing, and the turns land once the daemon is live. The second review left this open, as a low finding: either the tick runs under the wrapper, or the runbook names it as a writer that waits for the daemon.code(.githooks/post-merge), which readscode.landing-log-key. The hook's environment holds no secret, andscripts/run_with_secrets.shrefuses a named instance. So after this build the hook's sync is refused, without blocking the pull, until the item exists and reaches the hook. This branch was built before A palace without vectors: lexical code ingestion for a coding agent #90 merged and does not change the hook. A named instance needs a way to be given its own items; that is a small follow-up, and its shape (the wrapper reading<id>.<name>under an overlay, or the hook reading the Keychain itself) is the owner's call.moveas no row, but the catalog keeps a renamed path's row, tombstoned; the fold is now stated as the catalog keeps it. A change of class is a sixth kind,leave, since one kind cannot fold both a rename's tombstone and a path's departure from a chain. The genesis writes a renamed path's tombstone as amove, astombstonedoes, where the note saidretire. The key of a path takes half its key from the instance's secret, outside the file, where the note had the chain's bytes alone in the file;landing_chainsgains akey_checkcolumn. And a purge by digest, as section 6.1 stated it, would have left a deleted note'sretirenaming its path, its identity and the date of its delete after every version was purged, against D14; it now empties a path's tombstones with its last version. Each is marked in sections 3.2 and 6.1.bwrap(the gate compared in-process on macOS; CI runslake comparator --paranoid), and, after review, the audit, the export and the in-process comparison (above); the papers workflow's TeX Live; the daemon, under either plist and its wrapper, or a named instance, with the secret placed; a whole landing batch through the writer measured with and without the log (the overhead measured is the catalog's writes, and a vault landing also reads its version chain once more, unmeasured); a purge, several classes or identities apart from paths at the corpus's size.Merge order
This is rebased onto main after #90, whose changes to
core/ingest/writer.pysit in other hunks than this stage's (Writer.finishonly: the two key writes passversion, and three lines take it from the version chain). #89 is still open and changesREADME.md's badges and counts too; whichever of the two merges second rebases and recomputes the counts. This also changes the two lifecycle plists anddocs/runbooks/plane-migration.md, which #89 does not.Before a deploy of this stage: the landing-log item must be in the Keychain, the decision on the genesis taken, and the two writers above settled.
🤖 Generated with Claude Code