language: migrate to bare cases and refuse .Case and .member (CLOSED-TRAITS 1a-2, step 3 of #742) #820

Closed
opened 2026-11-15 09:41:51 +00:00 by orion · 3 comments
Collaborator

Context

Step 3 of the cleanup plan #742, phase 1a commit 2 of #713 (CLOSED-TRAITS 9.2 "migrate and refuse"). Unblocked on 2026-11-15: seeds.txt of the seeds release lists a7b780b86a35 (the merge of #765 for #743, which taught both forms) and newer nightly seeds, so CI and fresh clones bootstrap a compiler that reads the bare form.

Audit 2026-11-13: about 11,844 dot sites in 500 .trb files, 529 in Markdown, 1,027 .member.

Plan (CLOSED-TRAITS 9.2, commit 2)

  • torb lint --fix --rule bare-case over compiler/, std/, examples/, tests/, tools/, editors/: the dot goes where the bare name resolves to the same case, Owner.Case where it would collide. Sites the rule cannot fix are listed in the PR and fixed by hand.
  • Code blocks of CONCEPT.md and of the docs pages docs check type checks: rewritten by a committed script that takes the sites the fix reports and asserts the exact text it replaces (never PowerShell). Historical design records keep their text.
  • Then the parser refuses .Case and .member with the fix of 6.6; ImplicitMember/ImplicitVariant leave the syntax tree except as error. Delete the canon rule imported-case-patterns and the bare-case rule, rewrite the language pages of section 8, regenerate the skill, Decision Log entries of 0.1.
  • No source relies on the 6.6 continuation rule until the next seed.

Migration and refusal may be separate commits in one PR (or two PRs, migration first) if the diff is too large to review; refusal never lands before the migration.

Acceptance criteria

  • torb lint --rule bare-case reports 0 findings over the six directories before the rule is deleted; a second --fix run changes nothing.
  • The parser refuses .Case and .member with the 6.6 fix text; a test pins the error for each.
  • ImplicitMember/ImplicitVariant exist only as error nodes; canon rule imported-case-patterns and lint rule bare-case are deleted.
  • Checked doc code blocks contain no dot form; the rewrite script is committed and asserts the replaced text; historical records are unchanged.
  • Language pages of section 8, the skill and the Decision Log (0.1) are updated.
  • All gates of CLAUDE.md pass (fmt, check, tests, docs gate, .trb lint) and the fixpoint is green.

Next

After merge: seed (nightly or seed.yml, Orion takes it per #742), then 1b (#742 step 4).

Part of #713. Plan step 3 of #742.

## Context Step 3 of the cleanup plan #742, phase 1a commit 2 of #713 (CLOSED-TRAITS 9.2 "migrate and refuse"). Unblocked on 2026-11-15: `seeds.txt` of the `seeds` release lists `a7b780b86a35` (the merge of #765 for #743, which taught both forms) and newer nightly seeds, so CI and fresh clones bootstrap a compiler that reads the bare form. Audit 2026-11-13: about 11,844 dot sites in 500 `.trb` files, 529 in Markdown, 1,027 `.member`. ## Plan (CLOSED-TRAITS 9.2, commit 2) - `torb lint --fix --rule bare-case` over `compiler/`, `std/`, `examples/`, `tests/`, `tools/`, `editors/`: the dot goes where the bare name resolves to the same case, `Owner.Case` where it would collide. Sites the rule cannot fix are listed in the PR and fixed by hand. - Code blocks of CONCEPT.md and of the docs pages `docs check` type checks: rewritten by a committed script that takes the sites the fix reports and asserts the exact text it replaces (never PowerShell). Historical design records keep their text. - Then the parser refuses `.Case` and `.member` with the fix of 6.6; `ImplicitMember`/`ImplicitVariant` leave the syntax tree except as error. Delete the canon rule `imported-case-patterns` and the `bare-case` rule, rewrite the language pages of section 8, regenerate the skill, Decision Log entries of 0.1. - No source relies on the 6.6 continuation rule until the next seed. Migration and refusal may be separate commits in one PR (or two PRs, migration first) if the diff is too large to review; refusal never lands before the migration. ## Acceptance criteria - [ ] `torb lint --rule bare-case` reports 0 findings over the six directories before the rule is deleted; a second `--fix` run changes nothing. - [ ] The parser refuses `.Case` and `.member` with the 6.6 fix text; a test pins the error for each. - [ ] `ImplicitMember`/`ImplicitVariant` exist only as error nodes; canon rule `imported-case-patterns` and lint rule `bare-case` are deleted. - [ ] Checked doc code blocks contain no dot form; the rewrite script is committed and asserts the replaced text; historical records are unchanged. - [ ] Language pages of section 8, the skill and the Decision Log (0.1) are updated. - [ ] All gates of `CLAUDE.md` pass (fmt, check, tests, docs gate, `.trb` lint) and the fixpoint is green. ## Next After merge: seed (nightly or `seed.yml`, Orion takes it per #742), then 1b (#742 step 4). Part of #713. Plan step 3 of #742.
Author
Collaborator

[loop:torbscript] claim implement by torbscript-820-impl until 2026-11-15T20:12:00Z

[loop:torbscript] claim implement by torbscript-820-impl until 2026-11-15T20:12:00Z
Author
Collaborator

[loop:torbscript] release implement by session:torbscript-820-impl: PR #821 open, head b36d2404, CI queued (jobs still waiting for a runner; the first run failed only in bootstrap on a seed type error in lexer.trb, fixed in this head). next: review (merge gate)

[loop:torbscript] release implement by session:torbscript-820-impl: PR https://git.torb.dev/torbscript/language/pulls/821 open, head b36d2404, CI queued (jobs still waiting for a runner; the first run failed only in bootstrap on a seed type error in lexer.trb, fixed in this head). next: review (merge gate)
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-820-fix2 until 2026-11-16T00:52Z

[loop:torbscript] claim implement by session:loop-torbscript-820-fix2 until 2026-11-16T00:52Z
argus closed this issue 2026-11-15 23:50:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language#820
No description provided.