feat(rustd): afd_db — pools by role, and the migrator that shares Zig's ledger
§2 of M176, plus the lane §2 could not be tested without. **The lane.** M175 §6 deleted `make/test-integration.mk` and kept `make/test-infra.mk` — the compose half. `make test-integration-rustd` is built on what survived: same compose services, same reset, same `KEEP_TEST_STATE=1` escape hatch. Integration tests are `#[ignore]`d, so the unit lane still compiles and lints all five of them and runs none, which is what keeps live Postgres off the fast path. The lane fails on a suite that reports zero passing tests, because a selection matching nothing exits 0 and reads as a pass — the Zig lane learned that one expensively. **The migrator.** sqlx is the driver and nothing more: `migrate` and `macros` are off, because the ledger is shared with the Zig daemon and is therefore a data format. Same advisory key, same bounded `pg_try_advisory_lock` poll, same `audit.schema_migrations` shape, same reap. What is not the format is written as Rust: versions derive from filenames during constant evaluation rather than being restated beside them, the reap list is a bind instead of a rendered `IN (…)` and its stack-buffer arithmetic, an unterminated migration cannot become a statement list at all, and the lock owns the session that holds it. **Two findings the tests made, not the plan.** `PgPoolOptions::connect_with` cannot say why it failed — it retries until the acquire timeout and reports `PoolTimedOut`, the same error a busy pool gives. Against a dead port that read as "pool exhausted", which is the page that sends an operator to raise a limit while the database is down. Boot now opens one connection directly (its error is the real one) before building the pool, and acquire reads the pool's census: below its ceiling and still timing out means the datastore, at its ceiling means capacity. `PgConnectOptions::from_str` accepts `mysql://host/db` and reads it as host `host`, database `db`. `parseUrl` refuses anything but the two Postgres schemes; so does this now. Also: `test_zig_lanes_absent` matched `make test-integration` as a prefix and failed the new lane for existing. It now matches whole target names, with the boundary rule itself under test. Gates: lint-all ✓ · test-unit-all ✓ (277 rustd, 5 ignored) · test-integration-rustd ✓ (5 against live Postgres) · harness-verify 9/9 · check-version 0.26.2.
K
Kishore Kumar committed
c539977ef7f177d967ae53d34ff5cb5feaa11d57
Parent: 3a309ec