mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-09 11:51:37 -10:00
fix(slice-05): assert bundlePath in audit-write tests (guard B2 repair on f7c5a477) (OPR.0.3.2.5)
Repairs guard BLOCKING-CONCERN B2 on qitem-20260518212247-b0f627d4 /
f7c5a477: the B1 deterministic-tests repair handoff CLAIMED bundlePath
assertions but the tests did NOT actually assert records[0].bundlePath.
Guard discriminator showed bundlePath could be hardcoded to a wrong
value and the suite still passed 35/35 — install history could show
the wrong source bundle path while close-out tests remained green.
Honest acknowledgment: my prior handoff body's claim that the per-
branch tests asserted bundlePath was wrong. Should have verified
before sending.
Fix applied (mirrors guard's fix recipe):
- bundle-routes.test.ts: runApplyAuditTest helper now asserts
records[0].bundlePath === the bundlePath used in the /install
request. Single assertion in the helper applies to all 4 branch
tests (DRY).
Verified locally:
- 35/35 daemon bundle-routes green post-fix (unchanged from prior
count; assertion was added to helper, not new tests)
- Discriminator confirmed: sed-changing the audit record's
bundlePath: opts.bundlePath to bundlePath: "/tmp/wrong-bundle-path
.rigbundle" in routes/bundles.ts causes 4/35 tests to fail (all 4
apply-mode branch tests); restoring returns 35/35
- bundle-audit unchanged (10/10)
- Coherence + audit-every-layer grep clean
Pre-commit discipline applied (banked): git diff --cached --stat
verified the staged scope BEFORE commit — 1 test file only.
Diff: 1 file, +6 / 0 lines. No source files modified.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
1 parent
f7c5a477fa
commit
80f8f9f3b7
1 file changed
+6
@@ -1107,6 +1107,12 @@ describe("Bundle API routes", () => {
|
||||
|
||||
const history = await app.request("/api/bundles/history");
|
||||
const body = await history.json();
|
||||
// Item 4 close-out / guard B2 repair: helper-level bundlePath assertion
|
||||
// applies to all 4 branch tests (DRY). Discriminator: setting
|
||||
// record.bundlePath to a wrong path in routes/bundles.ts must fail
|
||||
// every apply-mode branch test.
|
||||
expect(body.total).toBe(1);
|
||||
expect(body.records[0].bundlePath).toBe(bundlePath);
|
||||
return body;
|
||||
} finally {
|
||||
(setup.bootstrapOrchestrator as unknown as { bootstrap: typeof origBootstrap }).bootstrap = origBootstrap;
|
||||
|
||||
Reference in new issue
Block a user