Skip to content

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

Description

@noah-emp

bolt's next release (Emerging-Patterns/bolt#219) extends U006 (fuel) to a U32.to_nat(<literal>) fuel argument. ez grades U006 as an error, so bumping [tools.bolt] past v1.11.0 will fail lint on 15 sites:

file:line fuel
add/run.bend:64 100
check/framing.bend:170, 186 1000
check/oracle.bend:691, 709 1000
check/serve.bend:251 4096
doctor/run.bend:130 100000
fetch/run.bend:110 10
io/file.bend:58 100000
lock/run.bend:698 100000
pkg/pkg.bend:1272, 1348, 1356 100000
pub/run.bend:105 100000
tool/run.bend:322 100

(Line numbers as of the bend 2.0.34 port, #125.) Each is a fixed bound on an IO or walk loop. A fixed fuel silently cuts work past the bound, and on bend 2.0.33+ a large fixed fuel used inside a law can overflow the checker's stack (the lock walk hit this; its fuel is now computed from its inputs). Derive each fuel from the input, or keep it with a # noqa: U006 giving the reason.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions