You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So a broken harness is indistinguishable from a passing suite. Observed: test result: ok. 1 passed in 0.01s — far too fast to have created a pool, run init_db, registered a device, and driven submit/retrieve/ack.
This is pre-existing on main and independent of #630.
Evidence
Instrumenting the helper to panic instead of returning None:
Against the existing dsm_storage database → DIAG init_db failed: db error. That DB has mixed table ownership (dsm vs cryptskii), so CREATE TABLE IF NOT EXISTS … fails and every DB test has been silently inert.
Against a fresh database (createdb dsm_ack_test) → the harness genuinely engages and enters the test body.
Any regression in a DB-backed path is invisible: the suite is green while executing nothing. DSM_RUN_DB_TESTS=1 looks like an opt-in switch but does not actually guarantee the tests ran.
Proposed work
Fail loudly. When DSM_RUN_DB_TESTS=1 is set, a setup failure must panic! with the underlying error, never return None. Self-disabling is only acceptable when the opt-in is absent.
Isolated clean database. Create/drop a per-run database (or schema) rather than reusing a long-lived one with drifted ownership.
Repair the auth fixture so an authorized submit reaches the handler (the current 401 blocks every stateful path).
real spooled row + valid minimal ack → 204and the row becomes acked
repeated ack → idempotent success
mixed valid/invalid batch → no partial state mutation (the entry preceding the bad one stays unacked)
Item 4 was deliberately not shipped in #630 — writing tests that were never observed to pass would have left a landmine for whoever enabled the harness.
Context
#630 fixed the /b0x/ack route-contract defect and is proven by 18 ungated wire-contract tests plus a mutation reproducing the exact Err(400) seen on hardware. The stateful properties above are complementary, not a substitute.
Summary
The
dsm_storage_nodeDB-backed tests pass vacuously.maybe_state_and_authreturnsNoneon any setup failure, and every DB test opens with:So a broken harness is indistinguishable from a passing suite. Observed:
test result: ok. 1 passedin 0.01s — far too fast to have created a pool, runinit_db, registered a device, and driven submit/retrieve/ack.This is pre-existing on
mainand independent of #630.Evidence
Instrumenting the helper to panic instead of returning
None:dsm_storagedatabase →DIAG init_db failed: db error. That DB has mixed table ownership (dsmvscryptskii), soCREATE TABLE IF NOT EXISTS …fails and every DB test has been silently inert.createdb dsm_ack_test) → the harness genuinely engages and enters the test body.POST /api/v2/b0x/submitwith 401 Unauthorized — an auth-fixture gap. Reproduced identically on unmodifiedmain, so it is not caused by fix(storage): give /b0x/ack its own minimal wire contract (route-contract mismatch broke every acknowledgement) #630.Why it matters
Any regression in a DB-backed path is invisible: the suite is green while executing nothing.
DSM_RUN_DB_TESTS=1looks like an opt-in switch but does not actually guarantee the tests ran.Proposed work
DSM_RUN_DB_TESTS=1is set, a setup failure mustpanic!with the underlying error, neverreturn None. Self-disabling is only acceptable when the opt-in is absent.submitreaches the handler (the current 401 blocks every stateful path).204and the row becomes ackedItem 4 was deliberately not shipped in #630 — writing tests that were never observed to pass would have left a landmine for whoever enabled the harness.
Context
#630 fixed the
/b0x/ackroute-contract defect and is proven by 18 ungated wire-contract tests plus a mutation reproducing the exactErr(400)seen on hardware. The stateful properties above are complementary, not a substitute.