the format/version stamp is written twice and read by nothing #1520

Closed
opened 2026-11-15 18:01:09 +00:00 by jaylouisw · 0 comments
Owner

format and version are written at engine/topology.js:560 and server/index.js:52, and read by no code anywhere. A document with version: 99 and a bogus format loads without complaint.

Why it matters: it is a guard that looks like a guard and is none - the same species as the rest of this week's findings. Anyone reading the file reasonably concludes the version is checked.

Suggested fix: either read it (refuse an unknown format, migrate a known older version) or delete it and say in docs/ARCHITECTURE.md that documents are versionless. Accepting it and ignoring it is the one option that should not survive.

`format` and `version` are written at `engine/topology.js:560` and `server/index.js:52`, and read by no code anywhere. A document with `version: 99` and a bogus `format` loads without complaint. **Why it matters:** it is a guard that looks like a guard and is none - the same species as the rest of this week's findings. Anyone reading the file reasonably concludes the version is checked. **Suggested fix:** either read it (refuse an unknown `format`, migrate a known older `version`) or delete it and say in `docs/ARCHITECTURE.md` that documents are versionless. Accepting it and ignoring it is the one option that should not survive.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1520
No description provided.