Skip to content

M3 G5 prep: W-49 twins, and probe twins chosen by class - #71

Merged
VirtualMachinist merged 3 commits into
mainfrom
m3/g5-astro-core
Nov 20, 2026
Merged

VirtualMachinist merged 3 commits into
mainfrom
m3/g5-astro-core

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

This is the first of two PRs for M3's step that proves the Astro rules live. It adds the W-49 twins and makes the law probe pick its twins by the file kinds each class can lint. The 62 accessibility twins follow in the step PR, once law rule entries can be limited to a class.

What it does

  • Twins: fixtures/laws/W-49/ holds a bad and a clean .astro twin for each of W-49's 9 rules. The W-22 .tsx twin is already on main.
  • Twins chosen by class: the probe uses only the twins that a class's preset can lint.
    • An .astro twin proves a law for astro-site, and for web-app only when the project depends on astro.
    • Skipped twins are named, with the reason, in both the text and the --json output.
    • A law left with nothing to judge for the class is dropped and reported. A probe with no law left exits 2.
  • Typed Astro rules: the probe's scratch tsconfig now includes **/*.astro, so typed Astro rules find their twins.
  • judged: m3 laws are probed as well as v0.1 ones, so W-49 is proven.
  • A real-tool test takes an astro-site project through W-22 and W-49. It then turns one rule off and expects only that rule's twin to go red.

Declared exceptions

The probe's own files belong to another lane. Its author reviews these edits:

  • src/laws/probe/{types,twins,judge,run,format,source}.ts and their tests;
  • src/cli/laws-probe.ts;
  • src/cli/laws-probe-{fake,ui}.test.ts;
  • src/laws/probe/fixtures.test.ts, whose ES-module check skips .astro.

src/cli/laws-probe-astro.test.ts is new. This PR edits no WEB_TOPS.md.

Gate on this head

  • 4,493 tests pass.
  • layers: 5 in range, 5 ran, 0 failed, 0 not-evaluated.
  • Mutation: 528 killed, 0 unexplained survivors, 381 excluded. Earlier survivors in the report code were killed with tests, not ledgered.
  • The highest CRAP score is 4.00.

🤖 Generated with Claude Code

VirtualMachinist and others added 3 commits November 20, 2026 07:27
…class lints

W-49 gets a bad and a clean twin for each of its nine rules. The probe now
proves a law judged m3 like a ticked one, names .astro files in its scratch
tsconfig so the typed Astro rules find the twins, and leaves out the .astro
twins of a class whose preset cannot lint them: an astro-site always lints
them, a web-app only when the project depends on astro. Each skipped twin is
named with its reason in the text and the JSON, and a probe with nothing left
to judge exits 2 rather than passing. A real-tool test takes an astro-site
project through W-22 and W-49 and turns one rule off to see its twin go red.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…empty probe is a report

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ns were skipped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@VirtualMachinist
VirtualMachinist merged commit a421221 into main Nov 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant