A: share tracing capture and peer config fixtures in tests (gate round 1)

This commit is contained in:
ari committed 2026-10-19 22:31:29 -04:00
1 parent 6bff60c210
commit d3bef6bd94
5 files changed
+106 -136

No files matched your search

+3
View File
@@ -78,3 +78,6 @@ Unit tests for validation and loader; a peer-less default config is byte-identic
- 2026-10-19 Handoff (WS-A): A1 to A4 are committed on `ws/A` in task order (`A: A1 ...`, `A: A2 ...`, `A: A3 ...`, `A: A4 ...`) on top of A0. `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test` and `cargo tree -i openssl` (no match) are clean. Owned files touched: `src/peers/{cli,config,secrets,mod}.rs`, `src/config.rs`, `src/main.rs`, `config.example.toml` `[peers]`, `tests/peers_config.rs`, plus `ipnet` in `Cargo.toml`/`Cargo.lock`. Nothing outside the owned list changed and `TODO.md` was left for the merger.
- Still open for others: `peer check` against a real peer (needs B1/B2 and `real_transport`); `PeerRegistry::reload` must call the loader (B4) for reload-time re-reads; the registry/serve wiring and SIGHUP fan-out are WS-B. No Nix files changed here, so no VM test was run; when one is needed the command is `nix build && nix flake check`.
- Contract issue carried over from A0 (unchanged): section 3's `PeerConfigError` is implemented as an alias of `config::ConfigError`; no contracts.md edit was made from this workstream.
- 2026-10-20 Gate round 1 (`loop/A/gate-2.log`):
- Duplication: the `tracing` capture layer both peer test modules used now lives once in `src/peers/testing.rs` as `capture::logged` (test-only, `#[cfg(test)]`), so `config.rs` and `secrets.rs` tests share it instead of each carrying `Capture`/`FieldVisit`. `tests/peers_config.rs` uses one `PeerFixture` (private token file plus the single-`beta` config, with a `scalars` argument for the timeout lines) instead of writing the same TOML three times.
- `Cargo.toml`: `ipnet` is the one dependency this workstream adds, and the plan allows it for A2 `deny_cidrs` (see the A2 entry above). No other dependency changed; `cargo tree -i openssl` is still empty. The gate's ownership step flags `Cargo.toml`, which the plan authorises; the file is listed in the shared-file seam for exactly this case.