Skip to content

Binding/scoping rule table: N1–N7, S1–S3 and D10–D22 as data with rule IDs, store form a closed roster (incl. walrus), loaded by the P77a classifier #2487

Open

Description

@antonsynd

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):

Where the verdicts come from today (to be transcribed, not re-decided)

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 in name-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/ComprehensionSlot without 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

  1. added
    lane:toolingDocs, formatter, LSP, build tools, tests, CI
    reach:programAn ordinary program a Python programmer would write hits it
    on Nov 8, 2026
  2. antonsynd commented on Nov 8, 2026

    @antonsynd
    OwnerAuthor

    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-written RuleAxes arms (#2457 cell 1 shows they are compensable). P21b (§3.22) reads the same table for let/var. Lane / reach: tooling · program. Tracker: #2486.


    Generated by Claude Code

  3. antonsynd commented on Nov 21, 2026

    @antonsynd
    OwnerAuthor

    The drift guard landed on dev with PR #2767 (merge 668465500); 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 (59ac995da onward).

    The remainder, as the ruling lists it:

    • the rows for the 8951 existing cells were derived by script from the generator's output at the time, so they detect drift from then on and are not an independent model: rows written from the rules are still owed;
    • the generator still computes its own verdict beside the table, where this issue asks for the classifier to read the verdict from it;
    • 36 of 48 rule ids were absent from docs/design/name-resolution.md when 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

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

    lane:toolingDocs, formatter, LSP, build tools, tests, CIreach:programAn ordinary program a Python programmer would write hits it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions