Repository navigation
Conversation
…efused The ledger reads and writes `records` by body hash only. A ledger file whose `records` holds a body in every row is refused when it is opened, before anything is written, with the command that converts it; `ledger migrate` stays for such a file. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Every ledger holds one body per distinct record, so nothing is left to convert: `convert_records`, the `ledger migrate` command, the refusal of a ledger not converted, their tests and the runbook go. The two record tables are back in the schema text, and `put_records` hashes each body once and names the columns it writes. Co-Authored-By: Claude Fable 5.2 <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.
Why
#127 stored each catalog record once by the hash of its text. To keep an installation working until its ledger was converted, it let the ledger read and write both shapes of
records, and added a command that converts a ledger file. Every ledger is converted now, so all of that is code nothing runs.What changes
Ledgerreads and writesrecordsby body hash only. The branch on the shape of the table is gone fromput_records,recordsandrecord.convert_records, theledger migratecommand, and the runbook indocs/deployment.md.put_recordshashes each body once instead of twice, and names the columns it writes.A ledger file in the other shape
A copy of a ledger made before its conversion cannot be used with this code. Reading or writing its catalog records fails with SQLite's "no such column" error and leaves the file as it was; no write lands in the wrong column, because the insert names its columns. The release that has the command (
v2026.12.01) converts such a file.Tests
The tests of the conversion, of the command and of a ledger read unconverted go with the code they covered. The test that a body is stored once however many refs hold it stays. The full suite passes (1,942 tests), with lint and the type check clean.
🤖 Generated with Claude Code