Repository navigation
Description
Sub-issue 1 of #2486 (owner request 2026-11-08).
What
One data file (docs/design/binding-rules.yaml or a C# roster in the test project; the plan decides, with the spec table generated from it) whose rows are
(binding kind, scope kind, operation, store form) → verdict (run / refuse SPYxxxx / deviation row), rule ID (N1…N7, S1…S3, D10…D22, R-xx).
Axes, each the image of a compiler enumeration or a set the plan names as closed (contract §11; no default arm):
- binding kind:
let, write-through=,const, parameter, loop variable, comprehension-local,global/nonlocal(P79, semantic: writing a binding outside the current function requires global / nonlocal — reinstate both; a bare store across a function boundary is refused (N6) #2424),variff P21b (Language design: introduceletas the declaration keyword; retireauto; keep=for write-through #1974) adopts it, module property, class field,@staticfield, method name, type name. - scope kind: module, class body, function, nested function/closure, lambda, comprehension (per
ComprehensionSlot/ComprehensionNestinginNameResolutionDifferentialTests.Rosters.cs), struct host, match arm. - operation: declare, read (before/after declaration, back edge, failed guard —
ReadTimings), store, capture, delete. - store form:
=, augmented (+=…, each a roster value or one class), tuple/star unpacking, walrus:=,let x =,global x+ store, attribute store, subscript store,with/for/exceptbinders. The walrus must be a roster value: @ 5d0187e it is the arm two different writers forgot (architecture(compiler): the lowering IR is the emitter's only input — SemanticInfo frozen after validation, MergeFrom disjoint, node-keyed tables ratchet down from 88 (E2 port resumed; owner-ruled 2026-11-06) #2443 W2.2 findings: tuple-element key collision prints(Some(42), 1); own-site store rides the implicit operator spec/semantic: retire implicit T -> T? conversion and bare None for T? — full-strict Optional construction (ruling 2026-08-31) #1720 forbids).
Where the verdicts come from today (to be transcribed, not re-decided)
docs/design/name-resolution.mdN1–N7 (+ "What this retires"); S1–S3 sub-rulings; the D10–D22 arms ruled on name resolution: implement the adopted principle — scope decides meaning, values ready before use, ambiguity refused, global/nonlocal reinstated (tracker, owner ruling 2026-11-01) #2427 (R-KX…R-LJ) and already encoded asSharpyTag.MustRun/MustRefusecells inNameResolutionDifferentialTests.Families.cs.variable_scoping.md,walrus_operator.md,comprehensions.md:169(walrus comprehension-local),classes.md:118.docs/deviations.yamlrows for the DEVIATION-by-default surfaces (fidelity scope).
Drift prevention (the point of the issue)
- The P77a classifier (
NameResolutionDifferentialTests.Classifier.cs/Families.cs) reads its expected verdict FROM the table instead of carrying it; a cell with no row is a totality failure, not a skipped cell. - Totality test: every (axis tuple) has a row or an entry in an
excluded…list with a reason; every roster value is the image of ≥ 1 compiler enum member; every rule ID in the table exists inname-resolution.md. - Mutations (contract §2): delete one row → totality red (count 1); flip one verdict → the generated cell goes red against the compiler (name the cell); add an enum member to
BlockConstruct/ComprehensionSlotwithout a row → red. - The spec's verdict tables are generated from the table (or asserted equal by a
check_*script), so the prose cannot say something the table does not.
Done when
Table committed; classifier reads it; totality test + mutations in the commit body; name-resolution.md points at it as the normative source; the handoff D17 question (walrus's role after let/var/global/nonlocal) is a row to rule, not a paragraph.
Placement
With #2486 at the next /batch-issues; after P77b, beside P21b. No code in Semantic/ changes under this issue; verdict disagreements it finds go to the ledger / their class issues.
Activity
process(handoff): D17 records the rule-table issues #2486-#2489
antonsynd commentedon Nov 8, 2026
Batching 2026-11-08 @ 10e1c1b — charter
docs/process/rounds/remediation-round-2026-09-20-batching.md§3.20l, P78 — N1/N2/N4/N7: scope decides meaning (order 6c⁶⁵): this table is P78's generator row (R-LO a). P78 writes it as its first task — N1–N7, S1–S3, D10–D22 as data with rule IDs, store form a closed roster incl. walrus, differential against the compiler with P77a's harness as the executor; it replaces the harness's hand-writtenRuleAxesarms (#2457 cell 1 shows they are compensable). P21b (§3.22) reads the same table forlet/var. Lane / reach: tooling · program. Tracker: #2486.Generated by Claude Code
test(conformance): P78 stage 0: the #2487 rule table replaces RuleAxes
test(conformance): P78 stage 0: ScopeMeaningDifferentialTests
process(plan): plan-777361 (P78) revised after pass 3
process(plan): plan-777361 (P78) revised after pass 4
antonsynd commentedon Nov 21, 2026
The drift guard landed on
devwith PR #2767 (merge668465500); this issue stays open by the owner's ruling (#2423 comment 7039834146, item 6: "Stay open after P78 (Recommended)").Landed (stage 0 of plan-777361, P78):
src/Sharpy.Compiler.Tests/Conformance/name-resolution-rules.txt, one row per cell of both generated pools (NameResolutionDifferentialTests, 8951 cells;ScopeMeaningDifferentialTests, 4963 cells) and a cell per row, with the totality fact and its mutations in the commit bodies (59ac995daonward).The remainder, as the ruling lists it:
docs/design/name-resolution.mdwhen verify pass 1 measured it; every rule id in the table should exist there, and the spec's verdict tables be generated from or checked against the table.Generated by Claude Code
fix(build_tools): check_plan_ready review round 1 — overrides, stamps
feat(build_tools): check_rulings gates ruling records against the laws