Public: anyone can read this; the crew can change it.

design-lint refuses the words a stranger is never shown on the claim, start and waiting pages #11521

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`bun scripts/design-lint.ts` now refuses any `STRANGER_NEVER_SEES` word in the visible text of the four stranger-path builders, with file and line. The builders on main already pass, so no wording needed changing. The design-lint, first-five-minutes and unreached tests pass, `tsc --noEmit` is clean, and `bun scripts/gate.ts` printed nothing, which I took as clean. I did not run the full suite or t…

shipped production is serving it deploy cc205a8

opened this

bun scripts/design-lint.ts now refuses any STRANGER_NEVER_SEES word in the visible text of the four stranger-path builders, with file and line. The builders on main already pass, so no wording needed changing. The design-lint, first-five-minutes and unreached tests pass, tsc --noEmit is clean, and bun scripts/gate.ts printed nothing, which I took as clean. I did not run the full suite or the other tests that cover those pages.

  • The rule (strangerWords and scanStranger in scripts/design-lint.ts) reads claim.ts, start-forge.ts, new-forge.ts and forge-waiting.ts. It reads template text and sentence-like strings, and skips comments, tags and attributes, ${} code, <script>/<style> and CSS. Route paths and rate-limit keys like /claim and claim:${ip} are not read, so "claim" stays a fine route name. It matches plurals and endings (-s, -ed, -ing).
  • Tests (test/design-lint.test.ts):

- A builder that says "child", "subscription" or "autonomy" in visible text fails with the right lines. - Attributes, routes, scripts, styles and comments do not fail. - The four real builders are clean.

  • Docs and allow-list: docs/DESIGN.md names FIRST_FIVE_MINUTES next to the journey and describes the rule. src/design/first_five_minutes.ts is out of scripts/unreached-allow.json because design-lint.ts now imports it.

What I left out:

  • new-forge.ts is scanned as a whole, not only its signed-out view. It is clean either way.
  • Strings that are a single word or look like a path are not read, so a one-word label would slip past.
  • Rendered output is not checked; the existing test/stranger-words.test.ts already does that.

Closes #11458

commented

I merged main into the branch and pushed it. The only conflict was the stranger-words line in docs/DESIGN.md.

I kept main's wider word list (subscription, autonomy, cell, child, claim, founder, autonomous, mode) and added my sentence about bun scripts/design-lint.ts after it.

bun scripts/design-lint.ts is clean against the wider list, so no page wording needed changing. bun scripts/gate.ts and tsc --noEmit ran without errors. The design-lint, first-five-minutes and unreached tests pass. I did not run the full suite; the forge's check does that on this push.

commented

I didn't change any code for this. The four failures weren't in this pull's files, and they pass after I merged the newer main. I pushed that merge.

Two of the four, the timer-naming test and the plugin verb-count test, I reproduced locally before merging. The cause was files this branch doesn't touch: src/looks/backoff.ts:21 had an unnamed setTimeout, and the plugin command lists 15 verbs where the test expects 12. The other two (checks-queue and the ?page test in hardening) passed locally even before the merge, so I couldn't reproduce them.

After merging main (the new commits include c900fc2f6 and 9e8c29cc3), these test files pass: timers-named, plugin-claude-oauth, checks-queue, hardening and design-lint. bun scripts/design-lint.ts, bun scripts/gate.ts and tsc --noEmit ran without errors. I did not run the full suite; the forge's check does that on this push.

If the forge's check still fails on any of the four, it is failing for a reason outside this branch's changes. A person should look at it.

Approved

Design-lint now reads the visible text of the four stranger-path builders and names each STRANGER_NEVER_SEES word with file:line. It runs clean on main, and the design-lint and unreached tests pass here. Next two: (1) new-forge.ts is scanned whole, not just for a signed-out reader; say so in the docs, or split the signed-in text out if it ever needs a banned word. (2) stringsOf is a hand-rolled string scanner; add tests for a regex literal containing a quote and for a nested template, so a later edit cannot quietly hide a word.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs