A: record A1-A4 completion and handoff in the workstream log
This commit is contained in:
1 parent
2eb1d2a78b
commit
6bff60c210
1 file changed
+9
-1
@@ -4,7 +4,7 @@ Part of [Phase 5: Consolidator](README.md). Contracts: [contracts.md](contracts.
|
||||
|
||||
| Field | Value |
|
||||
|---|---|
|
||||
| Status | In progress (A0 merged) |
|
||||
| Status | A1 to A4 done on `ws/A`, awaiting merge |
|
||||
| Owner | |
|
||||
| Depends on | none |
|
||||
| Blocks | [WS-B](ws-b-registry.md), [WS-C](ws-c-rest.md), [WS-D](ws-d-mcp.md), [WS-E](ws-e-telemetry.md) can start before A0 lands but cannot compile or merge until it does; A4 `peer check` needs B1/B2 |
|
||||
@@ -70,3 +70,11 @@ Unit tests for validation and loader; a peer-less default config is byte-identic
|
||||
- Not changed, on purpose:
|
||||
- `TODO.md` A0 box stays unticked. This round says the merger ticks it, and `TODO.md` is not an owned file. AGENTS.md's definition-of-done item 4 is the merger's step.
|
||||
- The direct `bytes` dependency stays. The body type in the transport contract is `bytes::Bytes`; axum only re-exports the same crate. Dropping the direct dep would not change the graph, and the 2026-10-19 log already records why it was added.
|
||||
- 2026-10-19 A1 (done): `Config.peers` is `PeersConfig` with `#[serde(default)]`; the scalar `SKYG_PEERS__*` overrides need no bespoke code because the existing figment `Env::prefixed("SKYG_").split("__")` provider already nests them, and peer entries stay file-only (verified by `peers_env_overrides_scalars_and_keeps_file_entries`). `to_toml_redacted` prints `token_file` paths and no token value; `config.example.toml` has the `[peers]` block. Integration test `print_config_shows_peer_paths_and_not_token_contents` runs the real binary with a private token file and asserts neither stream contains the value.
|
||||
- 2026-10-19 A2 (done): `peers::config::validate` covers name regex and uniqueness (via `PeerName::parse` plus a set), the 64-peer cap, URL scheme/userinfo/query/fragment/host, literal-IP `deny_cidrs`, plain-http-to-non-loopback with `allow_plain_http` and a warning that omits the address, absolute `token_file`/`ca_file`, and timeouts below their interval. `enabled` with no peers is a warning. Token readability is checked only for peers the process would call (`peers.enabled && peer.enabled`), so a disabled entry can name a credential that is not on disk yet; a non-empty placeholder file loads (VMs install the real token later). `Cargo.toml`: added `ipnet` for `deny_cidrs` parsing, as the workstream file allows; `cargo tree -i openssl` still empty.
|
||||
- 2026-10-19 A3 (done): `src/peers/secrets.rs` reads the file on every call and returns a `Secret`, so rotation needs no restart and no copy survives the call. It trims one trailing newline (and a preceding `\r`), refuses empty, non-UTF-8, over 4 KiB, non-files and unreadable paths, and refuses group/world-readable files unless the path canonicalizes under `$CREDENTIALS_DIRECTORY`; an empty or unset directory keeps the mode check (fail closed). Errors carry a short reason, never the path or bytes. Unit tests assert redacted `Debug`/`Display`, no log output, size boundaries and the permission rule; the integration test `config_load_uses_the_token_loader_and_rereads_a_rotated_file` exercises `Config::load` for both permission cases and re-reads a replaced file.
|
||||
- 2026-10-19 A4 (done): `src/peers/cli.rs` adds `PeerCmd::{List,Check}` and `Command::Peer` in `src/main.rs`. `peer list` renders name/enabled/URL/token path sorted by name, from configuration only, and needs no database or transport. `peer check <name>` resolves the configured peer, then runs `health::check_once` with the configured timeouts through an injected `PeerTransport` and prints the server/API class and latency plus the auth state. A rejected credential renders as `api up, auth rejected`. It never prints a token; errors name the peer or the missing transport only.
|
||||
- Wiring for WS-B: `cli::real_transport()` is the single seam. When B1/B2 land, replace its body (currently `bail!("peer check: transport not available ...")`) with the real client, including its limits; `check_report` and its tests stay unchanged. Until then the binary lists peers but `peer check` fails with that message; the one-shot probe itself is covered with `FakeTransport` in `src/peers/cli.rs` and `tests/peers_config.rs`, including timeout/TLS classes and a revoked token.
|
||||
- 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.
|
||||
Reference in new issue
Block a user