fix(test): name the allowlist test for what it checks #18
No reviewers
Labels
No labels
waiting-on-julian
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/carddav-mcp!18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/allowlist-test-name"
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?
Closes #11.
deployed_allowlist_parsespromised in its name to observe a deployment andobserved nothing. It hardcodes a nine-entry literal, parses it, asserts the
count is nine, and stops. No test in this suite reads an environment variable
(
grep -n 'env::var' src/oauth_redirect.rsis empty), so it could not noticethe deployed value dropping an entry — silently breaking a client — or gaining
one, silently enabling a redirect nobody reviewed.
A green test named for a security allowlist it does not check is worse than
no test, because it is evidence to the next reader that the allowlist is
checked. Measured under the old name: adding
https://attacker.example/callbackto the literal and bumping the count to tenleft all ten tests in the module green.
The rename
mixed_scheme_allowlist_parses_every_entry, which is what it does: theparser's scheme coverage across
https, three private-use schemes and acleartext loopback entry.
Verified the new name is not itself a vacuous claim. Making
validate_redirect_urireject private-use schemes turns it red, along withallowlist_accepts_private_use_schemes,loopback_relaxation_checks_the_entry_schemeandnon_loopback_entries_keep_exact_port_matching— 6 passed, 4 failed. A renamethat swapped one unfalsifiable name for another would have been the same defect
with better wording.
The capability left unbuilt
The comment says what would observe the deployed value rather than leaving it
implied: reading
clusters/fondue/carddav-mcp/deployment.yamlfromoddie-apps/platformand comparing. Another repository, another pipeline, anda network read from a unit test. Not built, and probably not worth building —
the defect was the name, and a known limit stated is not the same object as a
false claim.
For the record, and stated as what it is: the literal and the live value are
byte-identical right now, 9 entries each. That is agreement, not a measurement,
and the mutation above is what shows the difference.
AGENTS.mdno longer names the old test. It now says no test observes thedeployed allowlist and none can from this repository, which survives the next
rename.
Verification
Gates green at
f1ae981b: fmt, clippy-D warnings, 95 tests, and the twomutations above. No behaviour change — a test name and comments — so
v0.1.4stays the release and the pod stays on
sha256:dd915b10….