Values through a binding, asked where rules read: a logged Result written in place, callbacks by name at their slot (356 silent sites to 330) #136
Loading…
Reference in a new issue
No description provided.
Delete branch "values-asked-everywhere"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on
values-through-bindings(#135), and contains it: the diff shown is this piece alone.#135 built one answer to "what does this name stand for" (a
constread once, a function passed by name) and left it to each rule to ask. About 35 rules did not. This puts the question where rules get what they match, so that a rule does not have to know about it:What moved
constmissing-mut, by design)no-hidden-anyand the kept-Resultpass visit a value kept in aconstat its read. A binding with a written type is the exception: there the type is where the value goes.btoa, the pieces ofnew RegExp,new URL(x, import.meta.url), theisNaN(d.getTime())guard), the shape collector the whole-program pass asks,return unreachable(x).no-swallowed-error,unused-task-signal,undeclared-return-typeand the test structure (a suite's body passed by name).must-use-resulthas one classifier for "only logged, or turned into text", used for the value in place and for the binding: 10 → 6 silent sites one way, 11 → 2 the other.This closed less than hoped, and that is a result
A value through a
constwent from 126 to 121. Rules are separate visitors with their own passes; no single place covers them, and what remains must be threaded rule by rule. Against that: on an adopter's project and on four open-source code bases this piece gains no finding at all, and #135 gained 14 in one rule. Real code rarely writes the forms the harness generates for these lines (it hoists any sub-expression, including ones nobody would hoist). So the remaining lines of this group are honest gaps of low yield, and I do not plan a third piece on them; the list keeps them visible, with the pass each rule matches in.Evidence
undeclared-return-typeon an arrow kept in aconstwhose only use is as an argument, which the rule exempts when written in place ("typed by the argument it is"). The same on one open-source function passed to.then.safe-ts emitbyte-identical to the base.What turns red on upgrade
A
Resultthat is only logged or turned into text, written in place, ismust-use-result, as it already was through aconst:console.log(validate<T>(x)),String(unsafe(() => ...)). Four lines in this repository's fixtures gained that expectation.What is left
returnin another file, through aconst.Created with Claude Opus 5.5 (implementation) and Claude Fable 5.2 (review) in Claude Code.