cli: remove the torb canon alias, and name the formatter's rewrite modules for what they are #751

Closed
opened 2026-11-13 12:39:37 +00:00 by orion · 6 comments
Collaborator

Context

torb canon is a deprecated alias of torb format (compiler/src/main.trb:789, the usage line at 117; docs/ROADMAP.md line 64; the page docs/tooling/torb-canon.md). The project's rule before 1.0 is that a replaced name is deleted in the same change, without an alias. The directory compiler/src/canon/ (bindings, calls, command, edit, loops, patterns, strings, walk) is no longer a command: it is the rewrite engine that compiler/src/format/ imports (format/width.trb:40-43, format/layout.trb:37, format/typed.trb:23, format/command.trb:27-28).

Source

  • Cleanup audit 2026-11 (#742), finding F8; the report is docs/project/2026-11-cleanup-audit.md.

Goal

One command, one name: torb format. The modules live where their one user is.

Design record point

docs/design/CLI.md (the command table); the rule "no deprecated alias before 1.0" of the project's conventions.

Acceptance criteria

  • torb canon answers like any unknown command, with the suggestion torb format; the usage text no longer names it
  • docs/tooling/torb-canon.md is deleted, the index of docs/tooling/ is regenerated, and no page, skill or message mentions the command
  • The modules of compiler/src/canon/ are under compiler/src/format/ (for example format/rewrite/), with every import updated; no behaviour changes, the format tests are unchanged and green
  • ROADMAP line 64 drops the sentence about the alias
  • The four gates and the fixpoint are green

Dependencies

None. Step 1a-2 of #713 deletes the canon rule imported-case-patterns; whichever lands second rebases.

Seed

None (no syntax; the seed builds the moved files as it builds any file).

Size

One PR, two commits (the alias and its page, then the move).

## Context `torb canon` is a deprecated alias of `torb format` (`compiler/src/main.trb:789`, the usage line at 117; `docs/ROADMAP.md` line 64; the page `docs/tooling/torb-canon.md`). The project's rule before 1.0 is that a replaced name is deleted in the same change, without an alias. The directory `compiler/src/canon/` (bindings, calls, command, edit, loops, patterns, strings, walk) is no longer a command: it is the rewrite engine that `compiler/src/format/` imports (`format/width.trb:40-43`, `format/layout.trb:37`, `format/typed.trb:23`, `format/command.trb:27-28`). ## Source - Cleanup audit 2026-11 (#742), finding F8; the report is `docs/project/2026-11-cleanup-audit.md`. ## Goal One command, one name: `torb format`. The modules live where their one user is. ## Design record point `docs/design/CLI.md` (the command table); the rule "no deprecated alias before 1.0" of the project's conventions. ## Acceptance criteria - [ ] `torb canon` answers like any unknown command, with the suggestion `torb format`; the usage text no longer names it - [ ] `docs/tooling/torb-canon.md` is deleted, the index of `docs/tooling/` is regenerated, and no page, skill or message mentions the command - [ ] The modules of `compiler/src/canon/` are under `compiler/src/format/` (for example `format/rewrite/`), with every import updated; no behaviour changes, the format tests are unchanged and green - [ ] ROADMAP line 64 drops the sentence about the alias - [ ] The four gates and the fixpoint are green ## Dependencies None. Step 1a-2 of #713 deletes the canon rule `imported-case-patterns`; whichever lands second rebases. ## Seed None (no syntax; the seed builds the moved files as it builds any file). ## Size One PR, two commits (the alias and its page, then the move).
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261113 until 2026-11-14T02:00:00Z

[loop:torbscript] claim implement by session:loop-torbscript-20261113 until 2026-11-14T02:00:00Z
Author
Collaborator

[loop:torbscript] implement: #768, head e590f2cd, CI pending (all four checks still pending after the 30 min wait), next: review (CI result to be read on the PR). Two commits: (1) remove the torb canon alias (answers as an unknown command: usage, exit 2, with a CLI regression check), delete its page, fold its rule docs into torb-format; (2) move compiler/src/canon/* to compiler/src/format/rewrite/, imports updated, no behaviour change. check-commits.sh clean. Skills copy and index pages were hand-edited to the generator's output (no local torb binary), so watch the docs index and skills gates. Seed untouched. Worker token estimate: ~900k.

[loop:torbscript] implement: https://git.torb.dev/torbscript/language/pulls/768, head e590f2cd, CI pending (all four checks still pending after the 30 min wait), next: review (CI result to be read on the PR). Two commits: (1) remove the `torb canon` alias (answers as an unknown command: usage, exit 2, with a CLI regression check), delete its page, fold its rule docs into torb-format; (2) move `compiler/src/canon/*` to `compiler/src/format/rewrite/`, imports updated, no behaviour change. check-commits.sh clean. Skills copy and index pages were hand-edited to the generator's output (no local torb binary), so watch the docs index and skills gates. Seed untouched. Worker token estimate: ~900k.
Author
Collaborator

[loop:torbscript] claim review by session:loop-torbscript-20261113 until 2026-11-13T21:27Z

[loop:torbscript] claim review by session:loop-torbscript-20261113 until 2026-11-13T21:27Z
Author
Collaborator

[loop:torbscript] review: pdisc failed on PR #768 (CLAUDE.md, compiler/CONTRIBUTING.md, compiler/README.md bodies changed without a restamp); rebased on current main and restamped them with pdisc.py stamp (commit "docs: restamp the docs touched by the canon alias removal"), pdisc is green now. The VS Code job is skipped on this head (not red; the earlier failure was inherited from main). Head 3fd8c373, CI pending (bootstrap, tier A/B queued on the congested runners), next: waiting (CI and review)

[loop:torbscript] review: pdisc failed on PR #768 (CLAUDE.md, compiler/CONTRIBUTING.md, compiler/README.md bodies changed without a restamp); rebased on current main and restamped them with `pdisc.py stamp` (commit "docs: restamp the docs touched by the canon alias removal"), pdisc is green now. The VS Code job is skipped on this head (not red; the earlier failure was inherited from main). Head 3fd8c373, CI pending (bootstrap, tier A/B queued on the congested runners), next: waiting (CI and review)
Author
Collaborator

[loop:torbscript] release review: head 3fd8c373 pushed, pdisc green, remaining CI queued, nothing more to do until CI and the merge gate move

[loop:torbscript] release review: head 3fd8c373 pushed, pdisc green, remaining CI queued, nothing more to do until CI and the merge gate move
argus closed this issue 2026-11-13 21:53:04 +00:00
Author
Collaborator

Done via PR #768 (merged, merge commit f4bbbdc918, reviewed by argus). torb canon alias removed; compiler/src/canon/ rewrite modules renamed to compiler/src/format/rewrite/. No After-merge steps; the repo publishes nightly tags, not x.y.z release tags, so no release cut is due.

Done via PR #768 (merged, merge commit f4bbbdc9188073b7e5a732f343b96935b6a11c65, reviewed by argus). `torb canon` alias removed; `compiler/src/canon/` rewrite modules renamed to `compiler/src/format/rewrite/`. No After-merge steps; the repo publishes nightly tags, not x.y.z release tags, so no release cut is due.
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#751
No description provided.