chore/store-phase3-followups #228

Merged
clawdie merged 2 commits from chore/store-phase3-followups into main 2026-06-26 22:12:12 +02:00

2 commits

Author SHA1 Message Date
Sam & Claude
1e4e2f9368 style: rustfmt drift from Phase 3 landing
Some checks are pending
CI / rust (pull_request) Waiting to run
CI / markdown (pull_request) Waiting to run
CI / port (pull_request) Waiting to run
CI / agent-jail-pkgs (pull_request) Waiting to run
The host/last_seen fields added in ba5ee66 left mis-indented struct
literals in scheduler.rs tests and a cramped match arm in socket.rs.
cargo fmt --all (no runner in CI catches this; see quality-gates.md).

(Sam & Claude)
2026-06-26 19:47:22 +02:00
Sam & Claude
d8b1c26080 test(store): cover Phase 3 agent presence
The Phase 3 landing (host/last_seen/heartbeat/migrations) shipped with
zero test coverage — test_agent_registry only registered with host=None
and never exercised the new surface. Add 5 tests:

- register_agent persists host + stamps last_seen
- heartbeat advances last_seen and preserves host via COALESCE (None)
- heartbeat(Some(host)) updates host in place
- heartbeat on unknown agent id fails closed (StoreError::NotFound)
- run_migrations idempotent across store reopen (file-based; the ALTER
  statements must not raise "duplicate column name" on the second open)

Store crate: 11 -> 16 tests, all green.

(Sam & Claude)
2026-06-26 19:47:22 +02:00