SIGN IN SIGN UP

fix(rustd): measure where the tests run, own the Lua script, name the literals

Three defects and one relocation, all found after §3 landed.

**The lane picked the wrong toolchain.** `cargo test --manifest-path` leaves
the working directory alone, and rustup selects a toolchain from the working
DIRECTORY — so CI built the workspace with its preinstalled 1.97.1 and every
crate refused it. Local runs passed because `RUSTUP_TOOLCHAIN` is exported
here, which masks the difference exactly. The recipe now `cd`s into rustd/,
which is what `test-unit-rustd` has always done.

**Coverage was measured where the tests do not run.** The integration tests
are `#[ignore]`d, so `test.yml`'s unit-only `cargo llvm-cov` reported every
pool, stream and migrator line as uncovered while the lane that exercises them
said nothing. The number described the instrument's position, not the code.
`make test-coverage-rustd` runs both tiers in ONE instrumented invocation
against live datastores — the milestone's stated route — and the integration
workflow uploads it. test.yml no longer measures what it cannot execute.

Then the gap-closing pass the spec asks for before any bar moves: both error
surfaces walked kind by kind through a `one_of_each_kind` seam, `Pools` across
all three roles, the readiness index's read path, a lock-exhaustion proof, and
a real command timeout (`BLPOP` against a 50ms budget — a fast command against
a 1ns budget completes inside the timer's first tick, which the first version
of that test found out). 86.65% → 92.45% lines.

The floor moves 100% → 90% for `rust-afd`, in this commit, with each residue
named in codecov.yml and the spec: `version_of` is const-evaluated so its lines
cannot execute at runtime, per-command reconnect arms need a Redis that dies
inside a chosen await, and the lock's per-attempt log sits inside a wait the
bound is otherwise proven to end.

**The Lua script moves into the crate.** It was included from
`src/agentsfleetd/`, which M181 deletes at cutover — the crate would have
stopped building the day that landed. Each side owns a copy now, and a test
compares them byte for byte while both exist, so drift fails here rather than
as two binaries disagreeing about whether a code was already redeemed.

**Repeated literals are bound to names.** `audits/ufs.sh` does not scan `.rs`
(its extension list is zig/ts/tsx/js/jsx), so RULE UFS caught none of this;
`redis_client.zig` binds `const S_PING = "PING"` and the Rust did not. Every
command verb and operation name in afd_db and afd_redis is a const now. The
gate gap itself belongs upstream in orly, which materialises that audit.

Also: the README badge guard only knew about test.yml, so moving the upload
made it correctly report `rust-afd` as a badge nothing uploads. It now knows
both workflows.

Gates: lint-all ✓ · test-unit-all ✓ (303 rustd, 19 ignored) ·
test-coverage-rustd ✓ (322 measured, live) · harness-verify 9/9 ·
check-version 0.26.2.
K
Kishore Kumar committed
4f6afd6ba666d45e599c8f74bef3edfad5250f3e
Parent: 1e5ca10