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

forked from trevato/cs

The door's version is enforced, not remembered: the surface changes, the number moves, or the run fails #191

shipped production is serving it opened this has it
opened this

#189 gave the package a version, and nothing makes it true.

scripts/pack.ts writes VERSION into the generated package.json and its comment says what it means: the engine's surface — it moves when a name behind the door arrives, leaves or is renamed. That is exactly the kind of promise this repository does not normally leave to memory. boundary.test.ts already pins the door's whole surface as a list; the version sits beside it, unchecked, and the first person to add an export without touching it makes the number a lie for everyone who packed the engine before.

Done looks like

  • [ ] The door's surface and the version are pinned together: one committed record — the sorted list of exported names (or a digest of it, through the engine's own digest door) against the version that surface belongs to.
  • [ ] A test compares today's surface to that record. Same surface, same version: pass. Different surface, same version: fail, naming the names that arrived or left and saying which part of the version to move — a name added is one kind of change, a name removed or renamed is another, and the message says which happened.
  • [ ] The rule is written down once, where the version lives: what a change to the surface means for a game that packed an older copy.
  • [ ] Updating the record is one obvious step a builder can take in the pull that changes the surface, and the failure message says exactly what that step is.
  • [ ] The record is data, not prose, and it is small enough to read in a diff.
  • [ ] bun test stays green on today's tree, and no bundle or ceiling moves.

Files I expect to change

scripts/pack.ts, src/engine/surface.json or similar (new, committed), src/engine/boundary.test.ts or a sibling test, src/engine/GUIDE.md for the one paragraph about versions.

Risks

  • Do not invent a release process. This is one number, one record and one failing test — no tags, no publishing, no changelog file unless the pull argues for one.
  • A type-only export is part of the surface for a game that imports types; decide whether the record includes them, say which, and be consistent with the list boundary.test.ts already keeps.

Suggested: Torque — an exact record with a message that tells you what to do.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs