Repository navigation
refactor: one file per guarantee under laws/ and proofs/ - #17
Merged
Merged
Conversation
SPEC.md, a 2.4k-line LAWS.bend and a 1.8k-line PROOF.bend had to be read side by side, matched up by ID tags. Each guarantee is now laws/<Name>.bend, its prose on top and its quantified laws under it, proved by proofs/<Name>.bend. LAWS.bend and PROOF.bend only import them. Lemmas several proofs use are under proofs/lemmas/, each named for what it holds. Requirement IDs are gone: a file's name is its guarantee's. A law two guarantees rest on sits in the one that states it, and the other says `also rests on:`. SPEC.md's source notes (the revisions, how sections are cited, the pure modules, the departure from schema.json) head LAWS.bend, each section's intro heads that family's first file, the UTF-8 "left to prove" note is in laws/LinesDecodedAsUtf8.bend, and the table itself, with its Not implemented list, is kept as docs/SPEC.md. One proof helper no proof reached (eq.or_true) is gone. The trust boundary moves onto the code: the IO sequencing, ezhttp and the stdin effect on src/io.bend, and the runner's duty on main.bend. ezjson's printer is cited where laws/MessagesWrittenAsLines.bend rests on it, and its parser in laws/UnparsedTextIsParseError.bend. This needs a bolt that reads law and proof files by what LAWS.bend and PROOF.bend import, and no longer runs `trace`; bolt.bend drops `trace`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bolt v1.22.0 reads law and proof files by what LAWS.bend and PROOF.bend import, which this layout needs. Rules changed since the old pin, so some noqa comments no longer silence anything (S005); they are removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ngngardner
marked this pull request as ready for review
November 1, 2026 03:40
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.
Summary
laws/<Name>.bend(its prose, then its quantified laws), proved byproofs/<Name>.bend.LAWS.bendandPROOF.bendonly import them. That's 54 law files, no shared definition files and 4 lemma files (ArrayItemsRoundTrip,BoolCharStringFacts,CompareSelfEqual,InitializeResultShape), replacing the 2.4k-line LAWS.bend and 1.8k-line PROOF.bend.also rests on:line:line_blankandline_messageinBlankLinesGetNothing,line_decodedinLinesDecodedAsUtf8,ran_idinRepliesCarryRequestId,took_status_200inClientReadsReplies, andweb_postinRevisionFromVersionHeader.schema.json) now headLAWS.bend, which also names the first file of each family.laws/OperationsFromPaths.bend.laws/LinesDecodedAsUtf8.bend, which says it is pending.src/,main.bendand the README are now law paths or(trusted in src/io.bend).docs/SPEC.md, along with its Not implemented list.LAWS.bendand the README point to it.# Trusted, not proved:comments on the code, or cites of the dependency's law files:src/io.bendheader.src/io.bendheader too. It cites ezhttp'slaws/BadRequestAnswers400.bend,laws/WithServesGetOctetsAndContext.bend,laws/FieldLookupIgnoresCase.bend,laws/DeadlineIsTimeout.bendandlaws/OctetsDecodeAsUtf8.bend. Forking andmaxare cited as trusted in ezhttp'ssrc/server.bend.laws/MessagesWrittenAsLines.bend(ezjson'slaws/QuoteEscapesExactly.bendandlaws/PrintIsCompactAndStable.bend) and inlaws/UnparsedTextIsParseError.bend(ezjson'slaws/ParsesExactlyJsonTexts.bend). The old row claimed ezjson proves a compact print of every well-formed value. ezjson proves that only for the print of a parsed value, so for values ezmcp builds, "no newline" is now stated as trusted.ezmcp.stdininsrc/io.bend.eq.or_true) is dropped.def trace().Depends on
trace. This PR stays a draft until that release lands and the pin is bumped here.ez.lock.tomlare unchanged.Test plan
bend PROOF.bend→ALL PROOFS CHECKS005stale# noqa: L001(all inexamples/), which main also shows under that bolt. Main has 41 errors there; the extra one is the C011 fordef trace().nix flake check🤖 Generated with Claude Code