Fix subnets validation

This commit is contained in:
2026-10-26 22:59:11 +02:00
parent e141c03c2c
commit ecc5c83d78
11 changed files with 605 additions and 68 deletions
+124 -30
View File
@@ -3279,9 +3279,9 @@ Real IPv6 remains separately unverified by the previously accepted test scope.
### Milestone 10 — Visible styled keyboard quick reference in bottom panel
Status: in_progress (2026-10-26T20:52:01Z). The user retired M9 and explicitly
Status: accepted (2026-10-26T21:07:24Z). The user retired M9 and explicitly
directed development to continue. M1–M8 are accepted; M9 is no longer a
prerequisite. M10 implementation, review, and validation are starting now.
prerequisite. M10's scoped TUI checks and independent review passed.
#### Outcome and scope
@@ -3301,10 +3301,10 @@ paragraph cannot meet the requirement.
| Task | Owner | Scope and expected result | State |
| --- | --- | --- | --- |
| M10.1 | implementer | Inspect `src/tui/render.rs`, `state.rs`, `forms.rs` and `terminal.rs`; derive hints from actual supported keys and screen/form state. Implement the bottom panel with sufficient interior height, styled key/action groups and width-aware packing. | needs_changes: initial 7 render tests passed; independent R1/R2 found compact/form key-hint mismatches; targeted repair pending |
| M10.2 | implementer | Cover resize, narrow/minimum terminals, list/details, forms, progress and QR disclosure with synthetic render/navigation checks. Update README shortcut guidance if needed. | pending |
| M10.3 | reviewer / repairer | Independent review of actual layout, hints versus handlers, readability, clipping and state correctness; repair and re-review actionable findings. | pending |
| M10.4 | coordinator | Run integrated gates, record source/artifact identity and actual results, maintain this plan and make the scoped acceptance decision. | pending |
| M10.1 | implementer | Inspect `src/tui/render.rs`, `state.rs`, `forms.rs` and `terminal.rs`; derive hints from actual supported keys and screen/form state. Implement the bottom panel with sufficient interior height, styled key/action groups and width-aware packing. | complete for task scope: R1/R2 repaired and independently re-reviewed; render 9/9 and forms 7/7 focused tests passed on integrated HEAD |
| M10.2 | implementer | Cover resize, narrow/minimum terminals, list/details, forms, progress and QR disclosure with synthetic render/navigation checks. Update README shortcut guidance if needed. | complete: render 13/13, TUI workflow 6/6 including PTY smoke; integrated review closed |
| M10.3 | reviewer / repairer | Independent review of actual layout, hints versus handlers, readability, clipping and state correctness; repair and re-review actionable findings. | complete: R1 Clippy and R2 README precision repaired and independently re-reviewed with no remaining finding |
| M10.4 | coordinator | Run integrated gates, record source/artifact identity and actual results, maintain this plan and make the scoped acceptance decision. | complete: integrated gates passed; source fingerprints and results in [M10 evidence](docs/evidence/milestone-10.md) |
List/details quick reference must include navigation (`Up/Down`, `Enter`, `Esc`
as applicable), `?` Help and `q` Exit, plus the implemented management keys:
@@ -3326,19 +3326,19 @@ Keep Help as the complete reference and preserve all existing operation semantic
#### Acceptance and validation
- [ ] M10-A1: the lowest bordered panel has visible interior text; at 80x24 all
- [x] M10-A1: the lowest bordered panel has visible interior text; at 80x24 all
applicable list actions are displayed in readable packed rows.
- [ ] M10-A2: key labels are visually distinct with bold/color styling; action
- [x] M10-A2: key labels are visually distinct with bold/color styling; action
text is readable, and meaning remains understandable without color.
- [ ] M10-A3: hints match actual key handlers, uppercase/lowercase and active
- [x] M10-A3: hints match actual key handlers, uppercase/lowercase and active
screen/form prerequisites; no hint implies a disabled operation can run.
- [ ] M10-A4: resizing through 120x30, 80x24, 40x8 and the supported minimum
- [x] M10-A4: resizing through 120x30, 80x24, 40x8 and the supported minimum
34x8 causes no panic, overlapping borders or invisible footer text; compact
layouts retain navigation/Help and indicate omitted commands. Below-minimum
sizes retain a readable resize message.
- [ ] M10-A5: list/detail navigation, forms, progress and QR remain usable;
- [x] M10-A5: list/detail navigation, forms, progress and QR remain usable;
footer rendering exposes no secrets and performs no application mutations.
- [ ] M10-A6: focused synthetic rendering checks and all required Rust gates
- [x] M10-A6: focused synthetic rendering checks and all required Rust gates
pass; independent review closes actionable findings with recorded evidence.
Planned validation: `cargo test --locked tui::`,
@@ -3346,37 +3346,131 @@ Planned validation: `cargo test --locked tui::`,
`cargo clippy --locked --all-targets -- -D warnings`, `cargo test --locked`,
`cargo build --locked --release` and `git diff --check`. Use synthetic fixtures
and Ratatui test buffers; inspect styles as well as rendered text and geometry.
No production or VM operations are needed for this presentation change. These
checks have not been run for M10; no implementation or acceptance is claimed.
No production or VM operations are needed for this presentation change. Actual
integrated results and source identity are in [M10 evidence](docs/evidence/milestone-10.md).
#### Review, evidence and handoff
M10.1 initial implementation added visible styled footer rows and passed
`cargo test --locked tui::render` (7/7), `cargo fmt --all -- --check`, and
`git diff --check`. Independent review found **M10.1-R1 (P2, open)**: compact
rows advertise list navigation/Help during forms, QR, and pending work;
**M10.1-R2 (P2, open)**: generic form Enter is false for draft review and Tab
is missing from tabbed forms. Targeted repair/re-review is next; no acceptance
item is closed yet.
`git diff --check`. Independent review found **M10.1-R1 (P2, closed)**: compact
rows advertised list navigation/Help during forms, QR, and pending work; and
**M10.1-R2 (P2, closed)**: generic form Enter was false for draft review and
Tab was missing from tabbed forms. Targeted repair added secret-free form key
capabilities and context-specific compact rows; independent re-review closed
both findings on current integrated HEAD `e141c03`. Render tests passed 9/9,
forms tests 7/7, format and diff checks passed. M10.2 coverage remains; no
milestone acceptance is claimed yet.
The user removed M9 as
a prerequisite without accepting its unchecked M9-A1–A9 criteria. The project
configuration specifies GPT-6-Sol/medium for the coordinator and GPT-6-Luna/high
for all four custom roles. Start with M10.1, one writer at a time. The
coordinator owns this plan; record detailed evidence in
`docs/evidence/milestone-10.md` only after actual checks exist. No new
dependencies are planned.
M10.2 added synthetic TestBackend coverage for 120×30, 80×24, 40×8, 34×8,
below-minimum fallback, all applicable saved-client list hints, QR Esc/footer
rendering, and key/action styles. README now describes contextual shortcuts.
`cargo test --locked tui::render` passed 13/13 and
`cargo test --locked --test tui_workflow` passed 6/6 including PTY smoke;
`cargo fmt --all -- --check` and `git diff --check` passed. Integrated review
subsequently closed its findings. No VM or production operations were run.
Fresh integrated review found **M10.3-R1 (P2, closed)**: Clippy failed on a
collapsible `if`; repair preserved the action prerequisite and the gate passed.
It also found **M10.3-R2 (P3, closed)**: README overstated narrow-screen Help
availability; repair qualified the claim to list/details. Independent re-review
closed both with no remaining actionable finding. A 34×8 QR assertion confirms
Esc guidance and no fixture payload exposure; compact QR may be too large to
display, but can be cleared. [M10 evidence](docs/evidence/milestone-10.md)
records the integrated results and limitations.
The user removed M9 as a prerequisite without accepting its unchecked M9-A1–A9
criteria. The project configuration specifies GPT-6-Sol/medium for the
coordinator and GPT-6-Luna/high for all four custom roles. No new dependencies
were added.
#### Outcome
Milestone in progress; no M10 acceptance is claimed. Next action: implement
M10.1, then independent review/repair and M10.2–M10.4 checks. M9 stays retired.
Milestone 10 accepted for scoped TUI presentation on the integrated source
identified in [M10 evidence](docs/evidence/milestone-10.md). M9 stays retired
and unaccepted. The user's subsequent AllowedIPs classification request is
handled in M11 below.
### Milestone 11 — Valid subnet routes shown as a capability limitation
Status: accepted (2026-10-26T21:20:07Z). Prerequisite M10 accepted; M9 was
retired by user direction and remains unaccepted. This is the subsequent
user-requested behavior change. No VM work is in scope.
#### Outcome and scope
Keep a peer with valid extra subnet routes in the client list as `inspection
only`, without treating those routes alone as a configuration anomaly or
counting them on the issues screen. Details explain neutrally: “This peer
contains subnet routes. Managing this configuration is not supported yet.”
Malformed addresses, invalid keys, duplicate identities, document issues and
other genuine errors remain visible. Preserve all source bytes and routes;
do not expand the mutable client model, address allocation or restart
verification, or remove safety checks.
#### Context and implementation steps
Read the parser, projection and TUI before editing. `ConfigDocument::parse`
already distinguishes parse errors from valid `IpNet` values outside the
client model. `Application::display_projection` retains all peer issues and
marks projection failures inspection-only. The TUI currently treats every
peer issue as an anomaly in list/details/`!` at the start of M11. Classify valid unsupported
address shape separately at the presentation boundary, while retaining raw
issues for edit/restart safety. A subnet-specific capability notice must be
derived from parsed routes, not from parsing display strings. M2's historical
“inspection issues” wording described visibility; this user-directed change
refines their UI severity without rewriting M2's acceptance evidence.
| Task | Owner | Scope and expected result | State |
| --- | --- | --- | --- |
| M11.1 | implementer | Add explicit error-versus-capability classification and focused parser/projection/TUI regressions for valid subnet routes, normal client and genuine errors; preserve mutation guards. | complete: parser/projection/TUI regressions and safety preservation inspected; integrated review closed |
| M11.2 | reviewer / repairer | Independently review behavior, safety boundaries and tests; repair and re-review actionable findings. | complete: R1 withdrawn after source-based re-evaluation; R2 repaired and independently re-reviewed with no remaining finding |
| M11.3 | coordinator | Run focused and full Rust gates, record source/evidence and make acceptance decision. | complete: integrated gates passed; source fingerprints/results in [M11 evidence](docs/evidence/milestone-11.md) |
#### Acceptance and validation
- [x] M11-A1: a peer with `10.9.0.10/32, 192.168.88.0/24,
192.168.8.0/24` is visible as `inspection only`, with original bytes/routes
intact and the exact neutral details explanation.
- [x] M11-A2: those valid subnet routes alone cause no `! anomaly`, error
count or `UnsupportedAllowedIpShape` text in the list or issues screen.
- [x] M11-A3: a normal supported peer remains mutable and unchanged; malformed
addresses, invalid keys, duplicate identities and document issues remain
visible as errors/ambiguities alongside any valid capability limitation.
- [x] M11-A4: unsupported peers remain protected from TUI/application unsafe
mutations; allocation and restart verification behavior are unchanged.
- [x] M11-A5: focused regressions, independent review and all applicable Rust
completion gates pass on the integrated result.
Planned checks: focused document, application, TUI and config-preservation
tests; `cargo fmt --all -- --check`, `cargo clippy --locked --all-targets --
-D warnings`, `cargo test --locked`, `cargo build --locked --release`, and
`git diff --check`. Use synthetic fixtures only. No Alpine, VM or production
checks are needed for this classification/presentation change.
#### Outcome
Accepted for the requested classification/presentation behavior. **M11-R1
(withdrawn)**: review initially called a second
distinct `/32` route a configuration error; reviewer re-evaluated against
the WireGuard `wg(8)` format and confirmed it is another valid shape beyond
the client model, with no actionable finding. **M11-R2 (coordinator, closed)**:
without any subnet, valid additional host routes or IPv6-only shapes still
appeared as anomalies. The repair classifies parsed-valid shape variants as
capability limitations for display, retains raw issues for safety, and adds a
generic detail notice for non-subnet cases. Independent re-review found no
actionable issue. [M11 evidence](docs/evidence/milestone-11.md) records the
source, focused checks and all Rust gates. An external workspace actor advanced
HEAD to `18f28ee` while M11.1 was underway; the review covered committed and
uncommitted M11 inputs. This team created no commit. No Alpine, VM or
production behavior is claimed. Stop after this milestone.
## Current progress and resume point
- Bounded TUI maintenance (2026-10-26): repaired list arrows opening client details. Up/Down now only move the highlight; Enter opens details and Esc returns. Initial navigation follows the renderer's first-row highlight. Independent review closed NAV-001 with no remaining scoped findings; validation is recorded in [navigation repair evidence](docs/evidence/tui-navigation.md). This does not advance M9 or supply VM/Alpine acceptance evidence; prior artifact identities remain historical after this Rust change.
- Milestones 1–8 are accepted; milestone 9 is retired by user direction and unaccepted. Its real systemd/D-Bus checks remain unverified and are not a prerequisite to M10.
- Milestone 10 is in progress: implement the styled keyboard quick reference in the bottom bordered panel, then review and validate it.
- Milestone 10 is accepted: the styled keyboard quick reference passed independent review, focused synthetic/PTY checks and Rust completion gates.
- Milestone 11 is accepted for valid but unsupported AllowedIPs route presentation; focused and full Rust gates and independent re-review passed. Real systemd/D-Bus and IPv6 behavior remain unverified.
- The approved dependency list is in [DEPENDENCIES.md](docs/DEPENDENCIES.md); container testing methodology is in [TESTING.md](docs/TESTING.md).
- Milestone 1 is expanded and the Rust environment is pinned.
- Milestone 2 delivered a lossless in-memory WireGuard configuration editor, versioned metadata, and behavioral preservation tests.
@@ -3389,7 +3483,7 @@ M10.1, then independent review/repair and M10.2–M10.4 checks. M9 stays retired
- Milestone 8 delivered reviewed opt-in Alpine Testcontainers coverage for real IPv4 WireGuard peers, application lifecycle, saved/runtime separation, restoration, import/reissue, backup failures and the real Rustix reader. Host gates and three fresh real-container runs passed on one stable source fingerprint; M8-A1–A10 accepted. Real IPv6 behavior is unverified by user-authorized scope.
- Milestone 9 is retired and unaccepted: the reviewed disposable VM preparation and guarded first start did not establish Debian/systemd acceptance. The exact VM was powered off after the user stopped work. M9.2–M9.3 were not started; M9-A1–A9 are unchecked.
- Next action: execute M10.1. Do not restart the VM, access production, commit, or deploy.
- Next action: stop after M11 and await user direction. Do not restart the VM, access production, commit, or deploy.
## Plan maintenance