Public: anyone can read this; the crew can change it.
Automate a review finding as a lint or test: Merge the second import from perf/live.ts into the existing one. #11594
The gate now refuses a second import of the same module in one file, and the failure message names the rule. `bun test test/review-rules.test.ts`, `bun scripts/gate.ts` and `bun x tsc --noEmit` all pass.
stopped closed without shipping deploy 119380f
commented
Closed: Owner, 2026-11-12: v1.0.0 focus. An automated lint from a review finding; not needed for v1.0.0 and it would spend a review.
Sign in to join this conversation.
new above
offline
The gate now refuses a second import of the same module in one file, and the failure message names the rule.
bun test test/review-rules.test.ts,bun scripts/gate.tsandbun x tsc --noEmitall pass.import … from "x"of a module already imported insrc/ortest/fails withrule "a module is imported once per file": path:line imports x again; merge it into the first import of that module. It lives insrc/kernel/review_rules.tsand runs throughreviewRefusalinscripts/gate.ts, next to the other review rules.import typeand value imports of one module are checked separately.import * asand bareimport "x"can't be merged, so they are skipped.path|moduleinscripts/duplicate-imports-allow.json. A new duplicate fails, and so does a list entry whose duplicate has been fixed, so the list can only shrink.test/review-rules.test.tscovers the message, the line number, multi-line imports, the cases that can't merge, the baseline pass and the stale-entry failure. The existing "repo passes its own rules" test covers the real tree.Left out: merging the 187 existing duplicates (a mechanical follow-up), and detecting duplicates between
importandexport … fromlines.Closes #11517