widen the write-guard parity test to the full-URL mode and the normalized path #789
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#789
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?
The write-guard parity test from #785 proves a passthrough write calls the guard, but only for the relative and absolute raw modes, and it never checks the path the guard receives. Two gaps remain.
Gap 1: no case asserts a full-URL-mode write calls the guard. The guard call runs for every raw mode, so a full-URL write is guarded in the code today, but nothing locks it. A later change could drop the full-URL mode out of the guarded path and the gate would stay green.
Gap 2: no case asserts the endpoint the guard receives. The absolute-mode case checks only that the guard was called once, not that the
/api/v1prefix was stripped. The effect matcher classifies a write by this path, so a wrong path changes the decision.rawGuardPathnormalizes the path for all three modes and no assertion covers its output.Safety note: the guard refuses any endpoint it cannot match, so a normalization bug over-refuses a valid write rather than letting a write through. These gaps are test coverage, not an open hole.
Fix:
rawGuardPathfails the test.Acceptance:
rawGuardPathreturns the wrong path for any mode.Refines #785. Part of the write-guard work (#670).