test: deployed_allowlist_parses asserts nothing about the deployment, and had already rotted in one of four #7
Labels
No labels
blocked
waiting-on-julian
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/caldav-mcp#7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A test named after the running system, that takes no input from the running system
All four of
caldav-mcp,carddav-mcp,jmap-mcpandtypst-mcpcarry this, copy-pasted alongsideoauth_redirect.rs:rawis a literal in the test.allowed.len()counts whatrawparsed to. The deployment is not an input, so the assertion cannot fail when the deployment changes. The doc comment makes a claim about production that nothing checks, and the test passes forever regardless of whether the claim is still true.It had already rotted in one of the four
Found by the
typst-mcpworker, then verified across the set against the live cluster rather than assumed:caldav-mcpcarddav-mcpjmap-mcptypst-mcptypst-mcp's deployment is missing the threeclaude:///cowork://entries the fixture lists, and carrieshttp://localhost:8787/oauth/callback, which the fixture does not. Three were accurate by luck and one was not, and no test could have told you which was which — they all passed.Why this is worth a change rather than a shrug
A green test named
deployed_allowlist_parsesreads as evidence that the deployed allowlist is what you think it is. It is not evidence of anything except that a string literal parses. That is the same failure theAGENTS.mdrule about status files describes: something that ages into a confident description of a system that has moved, while looking healthy.It also nearly cost real work.
typst-mcp's two deployed loopback entries share a scheme, host and port and differ only by path, so a port-relaxation that also relaxed the path would silently merge them in production. The fixture would have said nothing, because it did not know they existed.The repair, already done in typst-mcp
Split it in two:
deployed_allowlist_parses— the actual live set, with the date it was verified in the doc comment. Still cannot fail on drift, but now it is a dated claim rather than an undated one, and the date tells the next reader how much to trust it.allowlist_accepts_the_shapes_we_support— the same parsing assertions with no claim about production at all.The general rule, worth putting in each repo's
AGENTS.mdunder Known Pitfalls: a test named after the deployment is a claim about the running system, and it rots silently. Either feed it the running system or do not name it after it.Optional, and probably better
A CI step that reads the live allowlist and diffs it against the fixture would make drift loud. It needs cluster access from the runner, which is a bigger change than this issue is asking for. Noted rather than proposed.
Related: #3 — same "five copies, and they diverge" shape.