You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9f06c00
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gate-manifest): bind the forwarded-rule exemption to lexical scope, not the name
Addresses the remaining P2 from the re-review at 3f37a11.
The exemption was keyed on the parameter's SPELLING. Once the live
BUILD_OWNERSHIP loop contributed `entry`, every `entry.rule` in the file
qualified — so an unrelated loop, or one shadowing the real binding, could pass
`entry.rule` to reason(...) and be treated as already collected. Same hole as
the `.rule` over-match, one level in.
parameterBindings now records each function parameter with the source span it
is visible in, and marks the ones bound by a callback of an ownership-table
iteration. forwardsACollectedRule resolves a `.rule` access to the INNERMOST
binder whose span covers that exact site, and exempts only if that binder is
the ownership one. Shadowing therefore resolves the way the language does:
BUILD_OWNERSHIP.map((entry) => // ownership binding
OTHER.map((entry) => // shadows it
reason('lint', file, entry.rule, 'd') // innermost binder wins -> fails closed
))
Tests 43 → 46: the mixed fixture the review asked for (one file holding both
the legitimate ownership loop and an unrelated same-name `entry.rule`, only the
former exempt), the shadowing case above, and a positive case proving the real
loop stays exempt and loses no category when no impostor shares its name.
Planted red against the live selector: swapping one real rule for `entry.rule`
outside the ownership loop's scope now fails with its line number, where before
it would have been silently skipped.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SkS4S8XXrfkJ8TD1VBKkvJ
0 commit comments