fix: fuels from their inputs; bolt v1.12.0 - #134
Merged
Merged
Conversation
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
enabled auto-merge (squash)
September 30, 2026 02:41
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>
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.
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.bendof: the walk over a whole checkout takeswalk.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.bendpkg.ask's inner walk:resumed.fuel(tree, st)is the length of the queue still pending pluswalk.fuelof the files read so far.io/file.bendread.opened: the opened file's size comes fromFile.size, and the read takessize / 64 KiB + 2reads. 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 asunsized().Kept as named, commented defs (no size known up front)
rounds()of the planner loops inadd,doctor,fetch,lock,pubandtoolkeep 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 outerasks()(100000) covers the disk walk, which asks for one file a round and can't know the file count before reading.check/framing.bendandcheck/oracle.bendthousand()(1000 × 1000) keep the test servers' "forever".check/serve.bendreads()(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:
ez provepasses 16/16.nix flake check -Lpasses.ez lockon ez itself leaves the lock byte-identical.ez --helpandez doctorwork.src/pkg/main.bendgives a byte-identical hash and manifest for ez'smain.bend, before and after.io/file.bendreads a 404000-byte file,/proc/self/statusand an empty file back whole.Closes #128
🤖 Generated with Claude Code