docs(spec-networking-gaps): networking test plan: gaps G-N1–G-N7 and host→PTask forward defect - #638
Conversation
…st→PTask forward defect (#626) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds a single new documentation spec file describing a networking test plan that addresses eight blocking gaps (G-N1–G-N7 and a host→PTask forwarding defect) via five demoable units of work with functional requirements, proof artifacts, non-goals, considerations, and a verification checklist. ChangesNetworking gaps spec document
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/specs/08-spec-networking-gaps/08-spec-networking-gaps.md`:
- Around line 117-124: The current R1.2 wording still allows the proxy surface
to be lost on bind failure, so tighten the requirement around the proxy startup
path in proxy.rs by making the recovery behavior mandatory rather than optional.
Update the spec language for the DNS/egress/HTTPS proxy bind flow to require
either deterministic auto-selection of a non-conflicting OS-assigned port or an
explicit fail-fast with a logged remedy, and ensure the status/info RPC exposes
the final bound ports so a second daemon can discover them reliably.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1ac9b64b-7bc2-4fce-86b5-c124059f7d46
📒 Files selected for processing (1)
docs/specs/08-spec-networking-gaps/08-spec-networking-gaps.md
| - **R1.2**: When a port is already in use at startup, `minimald` shall log a `tracing::error!` | ||
| with `component = "dns-proxy"` identifying the conflicting port and either select an OS-assigned | ||
| alternative port (auto-select) or fail the proxy subsystem with a logged remedy. The silent | ||
| warn-only best-effort bind of `proxy.rs:154–172` shall be replaced; a failed proxy bind is | ||
| always observable. | ||
| - **R1.3**: `minimald` shall expose the actual bound egress-proxy and HTTPS-proxy ports in its | ||
| status or info RPC so a second daemon on the same host can discover the effective port without | ||
| guessing. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Don't allow a proxy-surface failure path here.
This still permits a daemon to lose its proxy surface, which conflicts with the unit goal of keeping two DM4 instances working on the same host. The requirement should mandate a deterministic recovery path or explicit non-conflicting configuration, not a branch that can leave the surface down.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/specs/08-spec-networking-gaps/08-spec-networking-gaps.md` around lines
117 - 124, The current R1.2 wording still allows the proxy surface to be lost on
bind failure, so tighten the requirement around the proxy startup path in
proxy.rs by making the recovery behavior mandatory rather than optional. Update
the spec language for the DNS/egress/HTTPS proxy bind flow to require either
deterministic auto-selection of a non-conflicting OS-assigned port or an
explicit fail-fast with a logged remedy, and ensure the status/info RPC exposes
the final bound ports so a second daemon can discover them reliably.
sdd-validate — spec boundary findingsBoundary resolved: Spec ( Gate 1 — Acceptance criteria testable ✅ PASSAll 16 functional requirements across the five units (R1.1–R1.4, R2.1–R2.4, R3.1–R3.3, R4.1–R4.3, R5.1–R5.4) are stated as observable, verifiable conditions: CLI flag acceptance confirmed by RPC output, TCP connection success/rejection, process lifecycle state, and policy round-trip query responses. No vague aspirational criteria found. Gate 2 — No implementation leakage
|
| Unit | Artifacts | Behavioral? | Passes empty-PR rule? |
|---|---|---|---|
| Unit 1 (G-N1 + defect) | 2 (Test + CLI) | ✅ | ✅ |
| Unit 2 (--server) | 2 (CLI + Test) | ✅ | ✅ |
| Unit 3 (policy + dyn portmap) | 3 (Test + CLI + CLI) | ✅ | ✅ |
| Unit 4 (WireGuard wiring) | 2 (Test + CLI) | ✅ | ✅ |
| Unit 5 (multi-VM) | 2 (Test + CLI) | ✅ | ✅ |
Observation (not a finding): R4.3 (minimal mesh join sends JoinMeshPeer RPC and persists config) does not have a dedicated proof artifact — the Unit 4 test uses wg::start_with_socket (the existing unit-test socket path) and the CLI proof covers startup enrolment, not the join-then-persist round-trip. Unit 4 has two behavioral proofs so Gate 4 is satisfied, but the implementation author should consider a CLI proof of the form minimal mesh join <addr> && minimal mesh status showing the new peer if the join RPC is non-trivial.
Summary
| Gate | Result |
|---|---|
| 1 — Acceptance criteria testable | ✅ PASS |
| 2 — No implementation leakage | |
| 3 — Assumptions explicit | ✅ PASS |
| 4 — Proof artifacts present and behavioral | ✅ PASS |
No Blockers. The spec may proceed to merge and advance to triage. The four Gate 2 warnings are advisory: the implementation leakage does not invalidate the requirements, and a knowledgeable implementer will read the named types as baseline context rather than locked design. The behavioral intent is recoverable in each case.
Generated by sdd-validate · spec boundary · PR #638
Generated by sdd-validate for issue #638 · ◷
|
Closing for now. We can attempt to run spectacles again once improvements have been made in that framework. |
Spec for the eight blockers that prevent full DM1–DM5 networking test coverage, tracked in #626.
📝 Read the spec
What
This PR adds
docs/specs/08-spec-networking-gaps/08-spec-networking-gaps.md, closing the eight gaps enumerated in the test-plan gap register (#625):minimald --servervm_egressconfig surfaceminvmdDemoable units
--egress-proxy-portflag, auto-select recovery, port reporting in status RPC) and TCP RST defect fix (serialise DHCP lease before forwarderexpose).minimald --server <addr:port>: mTLS TCP listener reusing existingCertAuthority; all RPCs available over TCP.vm_egressfromminvmdconfig → gvproxy ACL API; wire per-PTaskegresssection through session launch; add dynamic port-map RPC handler withDynamicPortOutOfRangeerror. Enforcement at the relay layer pending Unit 2 follow-up: R2.2 egress enforcement (relay-layer frame inspection) + R2.4 dynamic port-mapping #553.wg::startat daemon startup from a mesh config file; wiretunnel_sinkinto the gvproxy switch;minimal mesh joinsendsJoinMeshPeerRPC.minvmdstate from singlevmm_pidto a named-fleet map; per-VM lifecycle locks;minvmd run/stop/status --name <name>; vsock CID dispatch routing.Next step
Please review and merge the spec PR to advance the tracking issue #626 from the spec phase into triage. Merging this PR will close the spec sub-issue (
Closes #<spec-sub-issue>is added to the PR body bysdd-pr-sanitize).References #626
Closes #637
Summary by CodeRabbit