Say what a read-only run actually does - #488
Merged
Merged
Conversation
Section 8.2 promised zero writes. Writing section 11's read-only test strictly is what found the promise false: a plain run touches `index.db-shm`, and `--fix` creates that and `-wal`. Those are SQLite's bookkeeping for a WAL database, created by opening one at all, for readers as much as writers, and they hold no committed data. Two ways to close the gap. Making the run literally write-free means opening the index outside WAL for doctor, which trades a documentation problem for the concurrency one #420 was about. So the document moves instead, and states the invariant that carries the meaning: `index.db` is byte-identical after a plain run, including under failure, and nothing else in the repository changes but those two sidecars. The acceptance row moves with it. A table that still said "zero writes" while the test asserted something narrower would leave the next reader to discover which one to believe. Limit: the exception is named for SQLite specifically, so a future dependency that touches the filesystem on open would need its own line rather than being covered by this one Ruled-out: opening the index outside WAL so the promise becomes literally true | it reintroduces the concurrency failure #420 fixed, to make a sentence accurate Ruled-out: leaving §8.2 and scoping only the test | the document is what a reader checks the code against, and a test quietly narrower than the promise it implements is the arrangement this milestone exists to remove Warn: `--fix` creates the `-wal` file that a plain run does not, so the two paths differ in what they leave behind even though neither writes data Blast: local Undo: easy Certainty: firm Verified: the three read-only invariant cases pass against the amended wording, asserting `index.db` equality and a filtered inventory rather than an unqualified zero Provenance: authored Record-Id: r-prdwrites
CommitLore — record lintTrailers: clean — 1 commit in Active constraints for the paths this PR touchesLimits (3)
Ruled out (9)
Warnings (3)
Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
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.
Closes #473. Documentation only.
The promise was false, and a test found it
§8.2 said zero writes. Writing §11's read-only test strictly is what found it: a plain run touches
index.db-shm, and--fixcreates that and-wal.Those are SQLite's bookkeeping for a WAL database — created by opening one at all, for readers as much as writers — and they hold no committed data.
Two ways to close it, and why this one
Making the run literally write-free means opening the index outside WAL for doctor, which trades a documentation problem for the concurrency one #420 was about.
So the document moves instead, and states the invariant that carries the meaning:
index.dbis byte-identical after a plain run, including under failure, and nothing else in the repository changes but those two sidecars.The §11 acceptance row moves with it. A table still saying "zero writes" while the test asserted something narrower would leave the next reader to discover which one to believe.
Why not just scope the test
The document is what a reader checks the code against. A test quietly narrower than the promise it implements is the arrangement this milestone exists to remove.
Three read-only invariant cases pass against the amended wording.
Stated
The exception is named for SQLite specifically — a future dependency that touches the filesystem on open needs its own line. And
--fixcreates the-walfile a plain run does not, so the two paths differ in what they leave behind even though neither writes data.