Commit 7e297fa
fix(schedule10): apply the Story 11.3 code review findings
Adversarial code review of Story 11.3 raised 31 findings (6 high, 16 medium,
9 low). Six needed a product call and were decided by Scho; the other 25 were
patched. All 30 resulting patches are here.
Behavioural fixes:
- The "unsaved data will be lost" confirmation on Enter Road Data navigated
without discarding the edit. Returning via Back reopened the panel still
holding it, and Save then wrote it against a freshly re-read revisionCount,
so the lock passed and data the user was told was discarded persisted.
- A stored supply block absent from the CATALOGUE rendered blank: the option
list was built by filtering the served list, so a code that is not a row
yielded nothing. ab7dea8 fixed only the in-catalogue case.
- Any TSA interaction dropped a cross-TSA supply block. The clear was gated on
the prefix not matching, with no check that the TSA had changed, so
re-selecting the SAME TSA cleared it; and clearing the control left an
orphan block, since startsWith('') is always true.
- Check Status discarded road attribution. The backend prefixes roadName and
subzone with the page label only, so on a multi-road page the flattened line
could not say which road failed; the roadDetailLabel is now prefixed.
- Read-only REMOVED Save from the DOM, contradicting AC11 and deviation 7,
which both require every write control rendered and disabled. The test that
codified the removal was flipped.
- A null revisionCount made Save a silent no-op with no banner at all.
- Ballast method N/D coercion is now mirrored in the form and the request body
(material forced to NA, and on N the dimensions, actualCost and otherTransfer
zeroed but ttTransfer kept, per the server's own asymmetry).
- Road Group is blanked when the location is edited rather than showing a value
the server derived from the location as stored.
- The TFL advisory was unreachable behind maxLength={2} while a blank TFL was
ungated; the comments byte cap used 3500 where the column allows 4000, so a
legal save was blocked; an over-length road name returned the off-list
message instead of the server's; a de-listed BEC rendered its raw catalogue
id; five derived money cells inverted the legacy masks; a page edit did not
clear a stale check-status result; the ballast material hint fired before any
method was chosen; and leaving the road level stranded an open delete
confirmation whose Yes then did nothing.
Shared components, additively and with no change for other schedules:
- CodeComboBox gains an opt-in matchMode prop defaulting to today's substring
match, so Schedules 2, 4 and 8 filter exactly as before. Schedule 10's BEC
Zone opts into prefix, which is what AC5 specifies.
- number.ts gains fmtWholeCost, the mask.int.7digits (#,###,##0) formatter the
derived integer totals needed.
Test coverage:
- millId and year were asserted on 2 of 9 endpoints. MSW matches a path
regardless of query string, so dropping the query passed every test and would
have 400'd every write in production. All 9 are now pinned.
- The two new backend code lists shipped with zero coverage: deleting either
@query body, or swapping the two toCodes(...) arguments in the assembler,
left the suite green. Both lists are now pinned, including a transposition
guard.
- Writing that coverage showed the referenced-union leg on both queries had no
coverage AND COULD NOT BE GIVEN ANY as seeded. It reads
"WHERE <date window> OR code IN (<referenced>)", so it can only rescue a code
that HAS a row and fell outside the window; V20260819 deliberately left 16Z
out of its code table on the stated grounds that this kept it representative
of the rows motivating that leg, which is backwards. 16Z is now seeded
EXPIRED and referenced by page 8904, making the leg falsifiable in both
directions. 99A stays absent to pin the boundary that justifies synthesising
a stored code client-side.
- Road-detail delete had no test at all. Three vacuous assertions were
replaced. Range constants were pinned at one bound only, and stSurfaceWidth,
ROAD_NAME_MAX and TFL_MAX were untested entirely.
- AC14's nav-position and not-admin-only halves were unasserted, and AC15's
accessibility assertions were never written. Both are covered now.
- A source-level tripwire guards the shared ComboBox rule in _overrides.scss.
jsdom does not apply the SCSS, so no rendering test can observe the computed
height; this is a tripwire, not a behaviour test.
Verified: frontend 165 Schedule 10 tests green, full suite 979/980 with the one
failure pre-existing (Schedule8 Helicopter, passes 86/86 in isolation); backend
262 unit and 87 integration tests green; lint and Prettier clean.
NOT verified in a browser -- that belongs to Story 11.4 with the axe sweep.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent b03d83e commit 7e297fa
13 files changed
Lines changed: 1212 additions & 83 deletions
File tree
- backend/src/test
- java/ca/bc/gov/nrs/ilcr/schedule10
- resources/db
- frontend/src
- components
- core
- schedule10
- __tests__
- routes/__tests__
- styles/__tests__
- utils
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
332 | 403 | | |
333 | 404 | | |
334 | 405 | | |
| |||
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
| |||
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| 49 | + | |
37 | 50 | | |
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
43 | 61 | | |
44 | 62 | | |
45 | 63 | | |
| |||
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
59 | | - | |
| 78 | + | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | | - | |
74 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
136 | 144 | | |
137 | 145 | | |
138 | 146 | | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
149 | | - | |
| 158 | + | |
| 159 | + | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
157 | 172 | | |
158 | 173 | | |
159 | 174 | | |
| |||
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
176 | | - | |
| 191 | + | |
| 192 | + | |
177 | 193 | | |
178 | 194 | | |
179 | 195 | | |
| |||
196 | 212 | | |
197 | 213 | | |
198 | 214 | | |
199 | | - | |
| 215 | + | |
200 | 216 | | |
201 | 217 | | |
202 | 218 | | |
203 | 219 | | |
204 | 220 | | |
205 | 221 | | |
206 | | - | |
| 222 | + | |
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
210 | 226 | | |
211 | 227 | | |
212 | 228 | | |
213 | 229 | | |
214 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
215 | 235 | | |
216 | 236 | | |
217 | 237 | | |
218 | 238 | | |
219 | 239 | | |
220 | | - | |
| 240 | + | |
221 | 241 | | |
222 | 242 | | |
223 | 243 | | |
| |||
248 | 268 | | |
249 | 269 | | |
250 | 270 | | |
251 | | - | |
| 271 | + | |
252 | 272 | | |
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
256 | 276 | | |
257 | 277 | | |
258 | | - | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
282 | 302 | | |
283 | 303 | | |
284 | 304 | | |
285 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
286 | 315 | | |
287 | | - | |
| 316 | + | |
| 317 | + | |
288 | 318 | | |
289 | 319 | | |
290 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
| |||
0 commit comments