G: review-1 handoff and deviation log
This commit is contained in:
1 parent
ae1b6fed28
commit
33c70442a1
1 file changed
+14
@@ -58,3 +58,17 @@ Reuse existing DTOs, do not duplicate types for the doc. Read-only, no secrets i
|
||||
**Note on running the checks here.** `devenv shell -- dev-test …` does not start in this worktree: `devenv` aborts with "Failed assertions: - To use 'git-hooks', run the following command: $ devenv inputs add git-hooks github:cachix/git-hooks.nix --follows nixpkgs" (`devenv.yaml` in this worktree lists only the nixpkgs input). The equivalent commands were run directly (`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, `cargo test`). `dev/hooks/select.sh` already maps `src/openapi.rs` to `test-unit:openapi` + `test-it:openapi`, so the hooks pick the new tests up without a change.
|
||||
|
||||
**For the merger.** (1) Tick the G1 to G4 boxes in `TODO.md` (not owned here). (2) `docs/README.md` has no row for `docs/openapi.json` yet; add one under "Reference" (not owned here). (3) `AGENTS.md` "The MCP tool count is 8" can now point at `x-mcp-tools` and `tests/openapi.rs`, which pin both counts (8 peer-less, 10 with peers); not owned here. (4) `config.example.toml` needs nothing: the workstream adds no config key. (5) A crate version bump changes `info.version`, so `docs/openapi.json` must be regenerated in the same commit; the test message says how. If that turns out to be noisy, the alternative is to leave `info.version` out of the committed file, which weakens it. (6) If WS-G is ever allowed to touch `src/sources/mod.rs` and `src/peers/types.rs`, the `ToSchema` derives from the G1 task can replace the schemars bridge and the handwritten peer schemas; until then the bridge is the cheaper way to keep one definition per DTO.
|
||||
|
||||
- 2026-10-20: **Review-1 fixes.** Each finding from `loop/G/review-1.md` (verdict line ignored) was addressed and committed on its own:
|
||||
|
||||
- **F1** `every_documented_path_is_routed` probed with auth on, so `require_token` answered 401 before routing and the test could never fail. It now builds the router with `auth.enabled = false`, sends the method each operation actually declares (not GET for everything), asserts the body is not the fallback's `no such route`, and a new `documented_peer_paths_are_absent_without_peers` checks every `document(false)` path through a peer-less router plus three peer paths that must answer the fallback. Commit `f8595b6`.
|
||||
- **F2** The peer status types now derive `schemars::JsonSchema` (`PeerName` is `#[schemars(transparent)]`), so `PeerStatus`, `ServerStatus`, `ApiStatus` and `AuthState` join the reflected components; the ~150-line handwritten block, `check_properties`, `nullable`, `date_time` and `SINCE_DOC` are gone. `assert_covers` now checks both directions (serialized keys equal documented properties), and the exact schemars parity test covers the peer types too. Commit `9449499`.
|
||||
- **F3** `JournalParams`, `PsParams`, `LogParams` and `UnitsQuery` derive `IntoParams` (`parameter_in = Query`) and the path macros name the structs, so a new query key cannot drift. This also corrected `since` to `format: date-time` and set `minimum: 1` on `lines` and `tail`. Commit `b1b39e8`.
|
||||
- **F4** The route scan now parses `.route` calls independently of formatting (the newlines in `.route(\n "/path"` no longer hide a route), reads the method builders and compares them with the document both ways, requires exactly 15 routes, requires every file that builds a `Router` to contribute a route, walks `src/api` recursively and rejects an unscanned `.nest`/`.nest_service` in `src/api`. A unit test pins a multiline `get(...).post(...)` call. Commit `0f07ee4`.
|
||||
- **F5** `/mcp` now documents all three operations the default `LocalSessionManager` mode serves: `POST` (JSON-RPC), `GET` (standalone SSE, 400/404/406) and `DELETE` (session end, 202). `every_operation_is_read_only` allows the session `DELETE` because it changes no host state, and `docs/api.md` says the same. Commit `8f6c94a`.
|
||||
- **F6** The `health` tag no longer calls `/api/v1/ping` unauthenticated; the auth layer's 503 is documented on `ping`, both peer reads, `openapi.json` and `/mcp`; the `info.description` explains that `[auth] enabled = false` disables the bearer requirement while the host guard can still answer 403 `forbidden_host`. The `since` format and `lines`/`tail` bounds landed with F3. Commit `83b4546`.
|
||||
- **F7** `docs/README.md` gains the `docs/openapi.json` row under Reference. Commit `e17d537`.
|
||||
|
||||
**Deviation from the owned files.** F2 required `src/peers/types.rs`, which the header does not own; the reviewer and the task explicitly allowed this, and it is a strictly smaller deviation than the schemars bridge's handwritten copy. F7 required `docs/README.md`, also outside the owned list; the previous handoff had left that row to the merger. No `src/sources` file was touched. `TODO.md` needs no change: the G1 to G4 tasks were never migrated into it, so there are no boxes to tick, and the merger still owns that move.
|
||||
|
||||
**Handoff (2026-10-20).** All seven findings are fixed and committed separately. `docs/openapi.json` was regenerated with the documented command (`cargo run -- openapi --peers > docs/openapi.json`) after the last spec change. `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings` and `cargo test` are green on the final tree (273 unit tests, 12 in `src/openapi.rs`; 12 integration tests in `tests/openapi.rs`; the peers, MCP, TLS, plain and binary suites unchanged). `cargo tree -i openssl` is still empty. The remaining merger items from the previous handoff are unchanged; the `docs/README.md` row is now done.
|
||||
Reference in new issue
Block a user