Skip to content

fix(lint): coverage at error - #174

Merged
ngngardner merged 6 commits into
masterfrom
fix/coverage
Nov 16, 2026
Merged

ngngardner merged 6 commits into
masterfrom
fix/coverage

Conversation

@ngngardner

Copy link
Copy Markdown
Contributor

Stacked on #173 (base build/bolt-1.65). It will be rebased onto master once #173 merges.

What changed

Every def and type flagged by bolt's coverage rule (L001, 317 findings on #173) is now handled. A pure def or type is reached by a quantified law, or deleted if nothing used it. An IO def, or a def that exists only for an IO driver, says why on its def line. laws and coverage are now "error" in bolt.bend.

New guarantees (laws/ + proofs/, all internal)

  • NarBuildsTree, NarHashForm, NarListingRows: building the NAR tree, the archive and SRI form, and reading listing rows.
  • CommandLineWords, CappedRunWords, EnvFallsBack, ProgressNamesBriefly: share/ argv handling, the capped-run words and how a kill reads, env fallback, and spinner labels.
  • ServeSpeaksHttp, FramingAnswersRoutes, ServerArgsAfterName, LiarHidesAnswerWhenMute, TestOutputPicksLines, OracleReadsPublishBody: the test servers under src/check. OracleReadsPublishBody is partly proved, and its prose says which part.
  • ProofPassesOnVerdictLine, TestTallyCounts, TestBudgetOnlyWhenSet, RefusalReasonShown, PlaceShownOnOneLine, PackagePrintedWithHash, RunOutputFiltered, SortKeepsEveryString (length only; its prose says sortedness is not proved), LineNeverRunsHelp, BenchScanAnswersMode.
  • RepliesJoinTheWorld: each interpreter round appends its answers to the World and leaves every other field alone. StepRunsThePlan: a step that runs, runs exactly plan(world), and a step that asks, asks exactly wants(world).
  • NonTrailerLineSkipped gains a new law, trailer_skips. Its existing law is unchanged.

Moved, behaviour unchanged

A law cannot import a module that runs a program, so pure decisions moved out of those modules and next to their pure siblings:

  • share/cap → share/capped
  • ez/prove and ez/test → ez/verdict
  • check/oracle → check/body
  • check/oracle and check/framing → check/argv
  • check/world → check/out
  • each command's more → its world or relock module
  • lock/run's said, gots and place → lock/world and lock/plan

Deleted (unused or duplicate)

  • lock/plan needed and answered; add/plan answered
  • add/hub names; tool/world here; pub/world lockfile; hub/hub show
  • sha/dump printed, replaced by snap's R.text
  • lock/run nonempty and ws/run lines, replaced by Args.nonempty

# noqa: L001 <why> (162 defs), following the fleet convention (bolt, ezhttp, shake)

  • IO drivers and entry points
  • fuel constants of IO loops
  • message wording, which per the spec skill gets no law
  • the few types and helpers that only an IO driver carries (for example ws/run's Searched/Planned and git's Tip)

Gate (bend 2.0.40)

  • bolt check 1.65.0: clean.
  • bend PROOF.bend and ez prove: ALL PROOFS CHECK.
  • bend <file> --check-only on every file under src/ and tests/, plus main.bend: same results as before the change. Each file checks clean, or prints only the unsafe/foreign report it printed before.
  • ez test with a freshly built binary: same results as fix(lint): ez 1.16.0, bolt 1.65.0; clear bolt findings #173 and master in this environment (9/12; cli, git and relock fail identically on master).
  • nix flake check -L (x86_64-linux): passes.

🤖 Generated with Claude Code

ngngardner and others added 5 commits November 16, 2026 11:12
Pin bolt v1.65.0 in [tools.bolt]. ez 1.16.0's mkLint runs `bolt check`
for a bolt at 1.65 or later, which this repo is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bolt 1.65 reports 23 errors on ez; all are fixed, behaviour unchanged:

- S013 (12): `U32.to_nat(<n>)` written as the Nat literal `<n>n`.
- U020 (4): unused imports dropped (fetch/world, pub/run, share/cap,
  tests/fetch).
- S009 (3): lock/plan `step.pick` takes the popped walk as one `Walk`;
  lock/up `dep.hub` takes the checkout it lands on as a new `Moved`;
  pkg `visit.put` takes the file it opened as a new `Opened` and splits
  into `visit.keep` / `visit.halt`. The laws and proofs over them are
  restated over the bundled value, same guarantees.
- S010 (2): ez/line `spec` builds init/add/lock/tool from helpers (the
  three tool targets share one); ez/app `dispatch` hands add and lock to
  helpers.
- S008 (2): ws/joint `source.eq` names its sides left/right;
  tests/hub names the two packages lib/mid.

The six warnings bolt.bend held at "warn" are fixed and the overrides
are gone, so pick, concat and prefix are back at their groups' level:

- C003 (3): ws/joint `text.at`, ws/workspace `nested` and `twice` match
  the test first and recurse only past a miss.
- U004 (2): io/file `slurp` gathers chunks newest first and joins once.
  check/serve's request reader reads the head as before, then counts the
  body by bytes once a byte of it has come, and joins once at the end.
- U017 (1): tool/run `line.abs` is `String.starts_with`.

Also deletes two defs nothing calls (check/kit `eq_u32`, share/say
`stuck`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every def and type bolt's coverage rule (L001) flagged is now reached by
a quantified law or says on its def line why no law can reach it, so
`laws` and `coverage` are errors in bolt.bend again.

- 25 new guarantee files under laws/, each proved by its namesake under
  proofs/: NarBuildsTree, NarHashForm, NarListingRows, CommandLineWords,
  CappedRunWords, EnvFallsBack, ProgressNamesBriefly, ServeSpeaksHttp,
  FramingAnswersRoutes, ServerArgsAfterName, LiarHidesAnswerWhenMute,
  TestOutputPicksLines, OracleReadsPublishBody, ProofPassesOnVerdictLine,
  TestTallyCounts, TestBudgetOnlyWhenSet, RefusalReasonShown,
  PlaceShownOnOneLine, PackagePrintedWithHash, RunOutputFiltered,
  SortKeepsEveryString, LineNeverRunsHelp, BenchScanAnswersMode,
  RepliesJoinTheWorld, StepRunsThePlan; NonTrailerLineSkipped gains
  `trailer_skips`. All state internal behavior.
- Pure decisions that lived in modules that run programs move beside
  their pure siblings so a law can import them: src/share/capped.bend
  (from share/cap), src/ez/verdict.bend (from ez/prove and ez/test),
  src/check/body.bend and argv.bend (from check/oracle, check/framing),
  src/check/out.bend (from check/world), each command's `more` into its
  world/relock module, and lock/run's `said`, `gots`, `place` into
  lock/world and lock/plan. Behaviour is unchanged.
- Dead or duplicated defs deleted: lock/plan `needed`, `answered`;
  add/plan `answered`; add/hub `names`; tool/world `here`; pub/world
  `lockfile`; hub/hub `show`; sha/dump `printed` (snap's R.text);
  lock/run `nonempty` and ws/run `lines` (Args.nonempty).
- IO drivers, their fuel constants, and message wording carry
  `# noqa: L001 <why>` per the fleet convention (162 defs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[tools.bolt] v1.66.0 (bolt#398: a list-literal data table isn't measured
by S010). ci.yml at actions 4ea982d: macOS runs outside the required
check (actions#16), and only when C/JS effect code, the flake or ez's
lock changes (actions#17).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from build/bolt-1.65 to master November 16, 2026 17:09
@ngngardner
ngngardner enabled auto-merge (squash) November 16, 2026 17:10
# Conflicts:
#	src/add/run.bend
#	src/check/oracle.bend
#	src/check/serve.bend
#	src/doctor/run.bend
#	src/fetch/run.bend
#	src/lock/run.bend
#	src/pkg/pkg.bend
#	src/pub/run.bend
#	src/share/cap.bend
#	src/tool/run.bend
@ngngardner
ngngardner merged commit 24333be into master Nov 16, 2026
6 checks passed
@ngngardner
ngngardner deleted the fix/coverage branch November 16, 2026 17:17
noah-emp pushed a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.17.0](v1.16.0...v1.17.0)
(2026-11-16)


### Bug Fixes

* **lint:** coverage at error
([#174](#174))
([24333be](24333be))
* **lint:** ez 1.16.0, bolt 1.65.0; clear bolt findings
([#173](#173))
([5431805](5431805))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant