Commit 813fcfc
committed
test(server): pin the JSON-path placement and assert "not charged" as data (BUG-2793)
Codex round 3, on the tests. Two ways they could pass without proving what
their names say.
1. The JSON refusal test sends VALID json, so a gate placed after the decode
would still return 403 and it would stay green. The bundle test covers the
gzip half of the placement claim; nothing covered the JSON half, and the
code comment claims the gate sits above EITHER body read. Added an at-limit
case with an undecodable body: reaching 403 rather than a decode error is
only possible if nothing read the body first.
2. The no-resolved-user test asserted only a 201. A regression that quietly
attributed the import to the at-limit fixture user would also return 201 and
pass. It now asserts the fact instead of inferring it — the user's workspace
count is unchanged across the request, and the created workspace has no
owner.
The mutation matrix now separates the two placements, which is the point of
having both tests:
- gate below the Content-Type dispatch (still above the decode) -> only the
BUNDLE test fails.
- gate below the JSON decode -> the bundle test AND the new JSON test fail.
Neither mutation is caught by the original refusal test, which is what "passes
for the wrong reason" looked like here.
Gates: `go test ./...` under Postgres 17 EXIT=0; gofmt clean; `make lint` 0
issues.
BUG-2793
Claude-Session: https://claude.ai/code/session_011T365kP1N9V88y15HxL4YN1 parent 6c40d1d commit 813fcfc
1 file changed
Lines changed: 49 additions & 1 deletion
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
| |||
163 | 187 | | |
164 | 188 | | |
165 | 189 | | |
166 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
167 | 196 | | |
168 | 197 | | |
169 | 198 | | |
170 | 199 | | |
171 | 200 | | |
172 | 201 | | |
173 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
174 | 222 | | |
0 commit comments