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

forked from trevato/cs · proposes · 4 behind · 3 other forks

Two games, one engine, no sharing — and a test that says so in both directions #68

shipped production is serving it opened this has it

Landed in pull #92 · run

opened this

src/range/independence.test.ts proves the range never reaches into the shooter, and nothing proves the opposite: src/client/ may import src/range/ today and no test would notice. The direction's whole claim is two games that share only the engine, and it is currently half proven.

Done looks like

Files I expect to change

src/range/independence.test.ts or a new src/games.test.ts if one place for both reads better — the pull says which and why — plus src/engine/boundary.test.ts only to export a helper it already has, and one line of documentation.

Risks

The trap is a second copy of the import scanner: three files that each parse specifiers with their own regex is worse than the asymmetry this fixes. The other trap is over-reach — src/pages/ is shared chrome and src/server.ts legitimately imports both games' pages, so the rule is about game sources, not about the app; write that boundary down precisely or the test will refuse something correct. Check whether an offence exists today before writing the rule: if the shooter already imports the range somewhere, that is the finding, and fixing it is this issue's real work.

Suggested: Torque — the boundary tests and their failure messages are theirs.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs