Repository navigation
docs(adr): ADR-0029 — config file v1: schema, parser crate, StrictModes checks - #127
Conversation
…es checks Implementing ADR for RFC-0010, locking what the RFC left open: - Schema v1 = exactly today's surface (schema_version, [server], [auth], [logging]); deferred policy sections land with their features, before the 0.1.0 freeze. - Durations as integer seconds (symmetric with --handshake-timeout); no bespoke value grammars. - Parser: basic-toml + serde derive with deny_unknown_fields — serde is already in the binary's build graph via tracing-subscriber, so the lockfile delta is one crate. - All five Phase-1 flags retained as overrides plus --config; the file is optional-but-primary per the RFC's recommendation. - StrictModes: full integrity + confidentiality predicate set over rustix, applied to the trusted-file set whether paths come from flags or config. Status: Proposed — flips when the implementing PR merges. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
|
Here is my review of ADR-0029 against the review criteria. Review: ADR-0029 — Configuration file v1The ADR implements RFC-0010 by locking the operative details the RFC deferred. It is a design doc; this review assesses design soundness against the MANIFIESTO commitments and threat model, not code correctness. Verdict: Approve with two minor notesAll five MANIFIESTO commitments are satisfied. The design is sound and well-justified. Two minor edge-case observations for the implementing PR follow. MANIFIESTO #1 — Memory-safe by construction ✓No first-party MANIFIESTO #2 — Post-quantum by default ✓The v1 schema covers only the five Phase-1 flags ( MANIFIESTO #3 — Zero legacy ✓No legacy crypto, compression, or authentication modes are introduced. The deferred keys ( MANIFIESTO #4 — Small surface, sharp edges ✓The lockfile delta is one crate ( MANIFIESTO #5 — Permanently open ✓All proposed crates ( Threat model alignment
Two minor notes for the implementing PR1. Under-specified error classification for ancestor-walk stat failures (§Negative, line 119). The ADR maps all StrictModes failures to 2. ClassificationPer the review criteria for |
There was a problem hiding this comment.
Pull request overview
Adds ADR-0029, the implementing ADR for RFC-0010, to lock down the Phase-2 TOML config-file v1 details (schema surface, parsing approach, CLI precedence, and StrictModes-style permission checks) ahead of implementation work.
Changes:
- Define config v1 schema keys/sections and value grammars (integer seconds, std parsers for paths/addrs).
- Choose
basic-toml+serdederive with fail-closeddeny_unknown_fields. - Specify StrictModes startup permission predicates for config + trusted files (host key + authorized_keys) and where the implementation should live (binary crate).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… error classes, fix wording Review feedback on #127: - Symlink bypass closed: trusted paths are canonicalised (std::fs::canonicalize) before the predicate walk, so the check runs over the real file's ancestors, not a symlink's — matching OpenSSH secure_filename() on the resolved path (claude-review). - A predicate failure (insecure_permissions) is now distinct from a check that could not run (ENOENT/EACCES/dangling symlink → the missing-file class); the audit trail must not conflate them (opencode). - schema_version carved out of the every-key-is-optional blanket (claude-review). - Links section describes the workspace-pins layout instead of implying crate-local versions (Copilot). Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
|
Re the two opencode notes:
|
Review: ADR-0029 — Configuration file v1The ADR implements RFC-0010 by locking the operative details the RFC left open. It is a design document only (no Rust changed). Per the review criteria, this assessment is of design soundness against the MANIFIESTO commitments and threat model. Verdict: Approve with one noteThree prior review findings were addressed in commit MANIFIESTO #1 — Memory-safe by construction ✓
MANIFIESTO #2 — Post-quantum by default ✓The v1 schema covers only the five Phase-1 flags — no KEX or cipher configuration, so nothing to downgrade. RFC-0010:342-345 already bounds the future surface: "no non-hybrid or classical-only KEX may ever be expressible via config." MANIFIESTO #3 — Zero legacy ✓No legacy crypto, compression, or authentication modes are introduced. Deferred keys ( MANIFIESTO #4 — Small surface, sharp edges ✓One new crate ( MANIFIESTO #5 — Permanently open ✓All proposed crates ( Threat-model alignment
The canonicalisation-first order (line 81-84) now correctly closes the symlink-bypass gap. The error-class split (lines 96-100: One note for the implementing PR
|
…endency-change claim opencode's re-review on #127: the workspace pins rustix with features ["std", "process"] only; rustix::fs::stat is gated behind the fs feature. The ADR now states the implementation adds fs to the existing pin — a feature flag on a crate already in the tree, not a new dependency. Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
|
Re the remaining note — adopted in b0974a0: verified against |
Review: ADR-0029 — Final passThe ADR has been through three rounds of automated review (opencode, claude, copilot). All five prior flagged issues are resolved in the current HEAD (commits Verdict: ApproveAll five MANIFIESTO commitments are satisfied. No remaining high-signal findings. Issues resolved in earlier rounds
Cross-reference verification
No remaining issuesThe document is internally consistent, correctly cross-references all authority documents, and faithfully implements RFC-0010 without introducing scope creep. Ready to flip to Accepted when the implementing PR lands. |
…le_unavailable claude-review on #127, second pass: - deny_unknown_fields is a per-container serde attribute; only root coverage rejects an unknown section, so "on every section" left the deferred [limits]/[session] tables fail-open. The ADR now mandates the attribute on the root document struct and every section struct. - The stat/canonicalisation failure path gets a named message value, file_unavailable, so the implementing PR has an authoritative structured value instead of a prose label (ADR-0024 discipline). Claude-Session: https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa Signed-off-by: Gonzalo Fleming <[email protected]>
Review: ADR-0029 — Configuration file v1 (final pass)This is a design document only (no Rust changed). I assess design soundness against the MANIFIESTO commitments and threat model. The ADR has been through four prior rounds of automated review; all flagged issues are resolved in the current HEAD (commits Verdict: ApproveAll five MANIFIESTO commitments are satisfied. No remaining high-signal findings. MANIFIESTO cross-check
Threat-model alignment
Issues resolved in prior rounds (confirmed)
Verified cross-references
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
What
The implementing ADR for RFC-0010 (Accepted, #112/#116) — the keystone Phase-2 workstream in #109. Per project practice, the ADR lands before the implementation. It locks the operative details the RFC deferred:
schema_version,[server] listen/host_key/handshake_timeout,[auth] authorized_keys,[logging] format. Deferred policy ([limits],[session].accept_env,trusted_user_ca_keys) lands with its features, pre-freeze — fail-closed refuses it until then, which is correct--handshake-timeout <SECS>); paths/addresses as strings through the samestdparsers the flags usebasic-toml+ serde derive:serdeis already in the binary's build graph (tracing-subscriber JSON), so the lockfile delta is one crate;deny_unknown_fieldsgives the fail-closed schema with zero first-party parser code. Fulltoml(winnow/indexmap/toml_datetime/serde_spanned) rejected on surface--config; file optional-but-primary;CLI > config > defaultrustix— applied to the trusted files whether named by flag or configHonest costs called out: StrictModes is a behaviour change for flag-only deployments (dev setups with sloppy modes will now refuse to start — the interop harness must chmod its fixtures), and
serde_derivestarts compiling.Status: Proposed — flips to Accepted when the implementing PR merges (#86 pattern).
Refs #109. Implements RFC-0010.
https://claude.ai/code/session_01J2SZwLuDm1KjfYyPM8npTa