Commit 258bd01
fix(model-apps): run role-privileges in the build's own --verify
Found by a LIVE end-to-end run, and invisible to CI. Against the same deployed
app, the standalone verifier ran 10 checks while `build --apply --verify` ran 8 --
the two missing ones being `role-privileges` for each persona.
`deps.verify` constructed its reader without `httpClient` or `envUrl`, so the
`entityPrivileges` reader was never wired. verify-spec skips role-privileges
unless BOTH readers are functions, so the check was silently absent and the build
reported a clean `verify PASS` having never checked what any persona role
actually grants.
The graceful degradation is deliberate -- an unwired reader must not fire a false
failure -- but it also means a caller that simply forgets to wire it gets silence
rather than an error. `--apply --verify` is the primary path, so the feature was
effectively off for most users while looking green.
`makeSdk` now returns its `httpClient` and main threads it plus `envUrl` into the
reader. Returning the SAME instance rather than constructing a second one keeps
token acquisition and retry state shared.
Verified live end to end: build (10 steps) -> `verify PASS (10/10)` where it had
been 8/8, then a negative spec declaring a privilege the role does not hold fails
correctly with `role-privileges: Live Probe Operator -- lpr_widget.delete: role
does not hold prvDeletelpr_widget` and exit 1, then teardown left 0 leftovers.
An unresolvable job surface is reported by spec-lint as designed.
Tests assert against SOURCE because the wiring lives inside main(), which is not
exported, and a behavioural test would need a live SDK. Red-green verified:
removing the two arguments fails the wiring test.
1488 tests. NOTE: `telemetry-hook-pretool` is flaky under the full runner (it
spawns a process against a local HTTPS probe); it passed on re-run and in
isolation, and is untouched by this change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 42626da2-b66f-4162-acaa-b1127ef23d891 parent 38b20aa commit 258bd01
2 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
434 | | - | |
| 438 | + | |
435 | 439 | | |
436 | 440 | | |
437 | 441 | | |
| |||
484 | 488 | | |
485 | 489 | | |
486 | 490 | | |
487 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
488 | 498 | | |
489 | 499 | | |
490 | 500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
0 commit comments