test(rustd): five assertions that had never been run, and were wrong
The integration lane had never executed on this branch. Running it turned up
five red tests, none of them a production defect — every one an assertion or a
fixture that encoded something the daemon does not do.
- `test_renew_coverage_refuses_an_empty_wallet` asserted the CREDITS refusal
and got the BUDGET one. `claude-fixture` is in no catalogue, so the estimate
is `Unpriceable`, its floor is zero, a zero balance covers zero, and the
credits gate ADMITS — fail-open, and deliberately so: an unpriced model must
not strand a tenant. A test naming the credits refusal has to seed past that
rather than assume the default reaches it. The new `seed_model_rate` fixture
prices the model; its rates are Anthropic-shaped because the issue estimate
prices a hundred tokens each way and integer division floors anything below
ten thousand nanos per million to zero.
- `test_report_dedup_idempotent` asserted the two-rows-per-event invariant
against a fixture that could only ever produce one. `Leases::record_received`
opens the narrative log; the receive LEDGER row is `Accounts::debit_receive`,
reached through `money_gates` on the plane. The fixture drove the store and
skipped it. Fixed in the fixture — weakening the assertion to one row would
have deleted the invariant.
- `test_report_stale_fence_rejected` asserted the lifetime-counter row was
absent. It is never absent: `INSERT_LEASE_WITH_EVENT` creates it with
`acquired = 1` at issue. It now pins BOTH `succeeded` and `failed` to zero,
which is what a wrongly-gated `tally` would actually break.
- `test_boot_to_ready_on_compose` predated §6 putting four sweepers under the
supervisor. The four names are now `pub` — as `serve::ACCEPT_LOOP` already
was — so the test names the same constant the daemon spawns under. A literal
would survive a rename and leave a sweeper unsupervised, green.
- `test_only_the_ported_routes_are_mounted` said twelve. §4 mounted the mint.
Also: `docs/architecture/data_flow.md` cited M181, whose spec is in
`docs/v2/pending/`, and the architecture gate resolves pending ids from
`roadmap.md` alone — an architecture page asserts facts about what ships. The
sentence now points at the roadmap instead. Pre-existing, and it is what stood
between this branch and a green `make lint-all`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> K
Kishore Kumar committed
c9ac0686ef76a2b3d8d394c60f487fd81a223e84
Parent: a2cec9e