Commit 777fa44
committed
fix(york_region): honour the classified markers in _call_client
Addresses the Codex P2 on PR #5. Correct — and the same generalisation gap as
the previous three findings: I converted the raise in york_region/client.py
without checking the handler that catches it.
york_region carries no @upstream_guard; its _call_client helper is the
catch-all (that is why Phase 20.2 skipped its 28 tools). So NotFound raised
for an unknown dataset id fell past NoPortalError and the HTTP arms into the
generic `except Exception` and a routine missing record was reported as an
upstream outage. Marker arms now come first.
Audited the rest behaviourally rather than assuming york_region was the only
one: every module whose own client raises a marker now returns the right code
(york_region/manitoba/saskatchewan/statcan NotFound, ircc/saskatchewan/
manitoba InvalidInput). A first pass over ALL tools reported 118 mishandlings
— that was my probe passing junk arguments like station="x", which trips each
tool's own validation before the mock is reached. Restricted to real paths,
mishandlings are zero.
test_markers_survive_the_module_handler covers the four modules that raise
markers, so a handler that drops one fails loudly. Verified non-vacuous:
reverting york_region/tools.py fails exactly that case.
3170 passed, 97.15% coverage.1 parent 5131cb5 commit 777fa44
2 files changed
Lines changed: 58 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
0 commit comments