Skip to content

fix: fuels from their inputs; bolt v1.12.0 - #134

Merged
noah-emp merged 1 commit into
masterfrom
fix/fuel-u006
Sep 30, 2026
Merged

noah-emp merged 1 commit into
masterfrom
fix/fuel-u006

Conversation

@noah-emp

Copy link
Copy Markdown
Collaborator

bolt 1.12.0 widens the fuel rule (U006) to a U32.to_nat(<literal>) fuel. That flags 15 sites here (#128). Each is fixed as follows.

Now derived from the input

  • pkg/pkg.bend of: the walk over a whole checkout takes walk.fuel(fs). That is one step for the entry plus one per line of every file, because every import is a line. This is the same measure the add and publish walks already use. A checkout of any size is walked whole, with no 100000-step cut.
  • pkg/pkg.bend pkg.ask's inner walk: resumed.fuel(tree, st) is the length of the queue still pending plus walk.fuel of the files read so far.
  • io/file.bend read.opened: the opened file's size comes from File.size, and the read takes size / 64 KiB + 2 reads. A size of 0 (a pipe, a device or /proc) or a failed size (a file past 4 GiB) gives no size to go by, so those reads keep the old bound as unsized().

Kept as named, commented defs (no size known up front)

  • The rounds() of the planner loops in add, doctor, fetch, lock, pub and tool keep their old values (100, 100000, 10, 100000, 100000, 100). Each round's questions come from the last round's answers. Running out dies loudly instead of cutting work short.
  • pkg.ask's outer asks() (100000) covers the disk walk, which asks for one file a round and can't know the file count before reading.
  • check/framing.bend and check/oracle.bend thousand() (1000 × 1000) keep the test servers' "forever".
  • check/serve.bend reads() (4096 × 64 KiB): a request's length isn't known until its head arrives.

[tools.bolt] moves to v1.12.0. No SPEC row names any of these limits.

Gate:

  • bolt 1.12.0 reports 0 errors. Its warnings are now 375, up from 365, all L001 on the new defs.
  • ez prove passes 16/16.
  • nix flake check -L passes.
  • ez lock on ez itself leaves the lock byte-identical.
  • ez --help and ez doctor work.
  • src/pkg/main.bend gives a byte-identical hash and manifest for ez's main.bend, before and after.
  • io/file.bend reads a 404000-byte file, /proc/self/status and an empty file back whole.

Closes #128

🤖 Generated with Claude Code

bolt 1.12.0's fuel rule (U006) flags a U32.to_nat literal passed as a
fuel. The package walk now takes its fuel from the files it walks: one
step for the entry and one for every line that could be an import, the
add and publish walks' measure, and a walk taken up again adds a step for
every file still queued. A package of any size is walked whole, with no
100000-step cut. A file is read with fuel for the size the host reports
(one 64 KiB read per chunk and one to spare); a pipe, device or /proc
file that reports no size keeps the old bound.

The planner loops, the test servers and the request reader have no size
to go by up front: their rounds come from answers not yet read, or they
serve until killed. Their bounds stay, as named defs saying why; each
dies loudly or serves past any test when it runs out.

[tools.bolt] moves to v1.12.0.

Closes #128

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-emp
noah-emp enabled auto-merge (squash) September 30, 2026 02:41
@noah-emp
noah-emp merged commit baf3a27 into master Sep 30, 2026
2 checks passed
@noah-emp
noah-emp deleted the fix/fuel-u006 branch September 30, 2026 02:45
noah-emp pushed a commit that referenced this pull request Sep 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.5.0](v1.4.0...v1.5.0)
(2026-09-30)


### Bug Fixes

* fuels from their inputs; bolt v1.12.0
([#134](#134))
([baf3a27](baf3a27))

---
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.

lint: bolt's widened fuel rule (U006) flags 15 fixed U32.to_nat fuels

2 participants