Day 2: roads, the compiler, explain, CBOR control messages, the via command #1

Merged
mnovak merged 25 commits from feature/roads into main 2026-11-26 05:24:39 +01:00
Owner

After QA (owner session, 2026-11-25)

QA's review (comments 49910–49925, Via/qa/review-via-core-pr1.md) found one blocker and five majors in the model. All are fixed on this branch, one commit each, each removing the #[ignore] of its test in crates/roads/tests/qa_findings.rs in the same commit. Details: docs/02_via-core.md, "QA review of PR #1, and what changed"; state and counts: HANDOVER.md.

Build described: branch head, Windows 10, cargo 1.99.0 stable MSVC, debug profile.

Check Result
cargo test --workspace 90 passed, 0 failed, 0 ignored (was 75 passed, 9 ignored)
clippy -D warnings, fmt --check clean
cargo deny check / cargo audit ok / 80 crates, 0 vulnerabilities
fuzz road_file 631 s, 807,395 executions, 0 crashes, 0 artifacts (features 7,711 → 9,819; corpus 1,080 → 1,289), built at 7342659, Windows MSVC, SanitizerCoverage, no sanitizer
fuzz envelope 331 s, 17,441,113 executions, 0 crashes (features 5,096 → 5,256), same build
# Fix Commit
F-01 blocker services may have their own mesh address; a road to a service that shares its address and a port with another is refused (service.shared); a device: road reaches all of the device's addresses; plans list the device's service addresses 69e3a93
F-02 direct.mesh (a non-default direct subnet holding a mesh address), direct.tunnelled (inside a tunnelled net: dropped), direct[].except (tunnelled nets inside: stay in the tunnel) 80f73a0
F-03 a kill-switch road with an error fails closed, through no exit 3bd87eb
F-04 a dangling owner or group member drops only itself acb98a6
F-09 until: / ports: present but empty is key.empty 93ab087
B-3 app: roads need on: and reach only those devices b482e26
F-05, F-06 classic custom blocks; road.family ecafe19
F-07 store.roads (also: roads/ never followed through a link) b6cf29b
F-08 mesh addresses never internet addresses ff78361
F-10 P-6v6: IPv6 by embedding into fd00::/96 7342659
R-55 QA's renaming property failed ~1 run in 4 (a group renamed to in); fixed in the test, seed pinned 31a46d0

Every fix was mutation-checked: reintroducing the bug fails its test.

Critical self-review of the fixes

  1. major, design: F-01 adds a service address to devices.json. Per-service rules need something the firewall can see; a hostname is not. The alternative, relying on Ianitor's per-host identity gate, was not needed. Day 3 must give the hosting device each service address on its tunnel interface, and Ianitor must listen on it. Until a service has its own address, a road to it is refused whenever it shares a port, so today's "everything behind Ianitor on 443" needs one address per service.
  2. major, design: F-02's except. Every platform must keep the except nets in the tunnel. An app-level bypass (Android's disallowed apps) cannot do that, so such a platform must not apply that entry. Day 5 and Day 6 tests must check it.
  3. minor: the plan format changed in place (services, direct[].except) while still format: 1. Nothing has consumed it; it would need a version bump after v0.1.0.
  4. minor: a kill-switch file that does not parse still applies nothing, only an error. Recorded.
  5. minor: P-6v6 checks IPv6 by isomorphism with IPv4, not against its own oracle. A bug present in both families would pass it; P-1 covers IPv4.

Still open (recorded in docs/02_via-core.md, Gaps)

  • B-1 replay: proto v2 on Day 3 (serial + not_after).
  • F-13 explain / check as admin: blocks the Day 5 web view.
  • F-11 no Linux run (WSL does not start here). Wanted before the tag.
  • F-12 case-sensitive ids: decide with the people directory.

Original description (builder, before QA)

Day 2 of Via Domi: the road model, its validator, the compiler from roads to one plan per device, explain, the versioned CBOR control messages, and the via command. Design: docs/02_via-core.md; formats field by field: docs/FORMATS.md.

Do not merge yet: QA reviews first, then the orchestrator merges and tags v0.1.0.

What is in it

Crate What
roads road files (roads/<id>-<slug>.md, Pensum's strict header subset, unknown keys are errors, 6-character random Crockford ids), directory.json and devices.json snapshots (serde deny_unknown_fields, no flatten), 57 rule codes, deny-by-default compiler, explain read from the compiler's own grants
proto CBOR envelope v1: plan-request, plan (with a SHA-256 digest of the plan's CBOR), plan-ack, refused; the version is read before the body; unknown fields, trailing bytes, >1 MiB, nesting >32 and a wrong digest are refused
via-cli via check, via compile --device <name|key> [--format json|cbor], via explain <device> <place>; exit 0 / 1 (problems or denied) / 2 (usage)

#![forbid(unsafe_code)] in every crate and unsafe_code = "forbid" in the workspace lints.

Id formats used (read from the owning code)

  • Road id and file name, problem lines, unknown keys: Pensum, Fabrica/core/crates/pensum/src/id.rs:5-12, problem.rs:3-34, ticket.rs:11-12, 372-375, core/docs/FORMATS.md:14-42, 85-97, 161-165.
  • Device key: Tessera device subkey, Ed25519 public key, base64url without padding (43 chars, canonical): Fundamentum/docs/TESSERA.md:29, 53-55.
  • App id: Tessera id, Fundamentum/crates/tessera/src/id.rs:5-20.
  • Service: Ianitor host = hostname, hosts/<hostname>.toml: Ianitor/crates/core/src/routes.rs:5-16, 41-42; rules validate.rs:693-730.
  • Person and group ids: no people directory exists in Fundamentum (Liber/Liber/docs/05_together.md:13), so an opaque newtype, 1-64 of [A-Za-z0-9_-].

Tests

72 tests, all passing (cargo test --workspace, Windows, debug):

File Tests
roads unit tests (header, ids, net, ports, road, id) 16
roads/tests/validation.rs (66 fixture files + 6 generated cases; all 57 rules covered, meta-test fails on a rule without a fixture) 5
roads/tests/revocation.rs 9
roads/tests/least_privilege.rs (proptest: P-1 5,000 cases; invalid/expired 500; P-3/P-4 500 = 6,000 cases) 5
roads/tests/determinism.rs (twice, shuffled, CRLF, 7 golden plans) 4
roads/tests/explain.rs 6
roads/tests/custom.rs 6
roads/tests/attacks.rs (QA cases) 8
proto/tests/roundtrip.rs 6
via-cli/tests/cli.rs (separate processes, byte-identical) 7

Of the 5,000 P-1 cases in the measured run, 1,688 had at least one firewall rule, and 4,322 rules and 7,560 allowed IPs were checked against the oracle (the counter prints with --nocapture). The other two thirds are worlds where every road is refused or inactive, which the property also covers.

Regression-verified by reintroducing the bug (each made the property fail, then reverted):

  1. subnet grants widened to the router's whole route (QA R-02) → P-1 fails on the oracle's exact-subnet check;
  2. the receiving side's peer widened from the client's /32 to a /24 (QA R-10) → P-1 fails ("source has no peer of its own");
  3. until made inclusive (< instead of <=) → P-1 and the invalid/expired property fail, and revocation fails.

The validation fixtures were not each mutation-checked; each asserts its own rule code, file and field, and asserts that every plan stays byte-identical to the baseline.

cargo deny check: advisories ok, bans ok, licenses ok, sources ok (warnings: unused allowed licences, two syn versions).
cargo audit: 80 crates scanned, 0 vulnerabilities, 0 warnings. chrono was flagged unmaintained (RUSTSEC-2026-0543), so dates moved to jiff.
cargo clippy --workspace --all-targets: clean.

QA's attack plan

Via/qa/02_roads_attacks.md is answered case by case in docs/02_via-core.md, "What QA's attack plan changed". The five it ranked first: R-10 (property + attacks.rs), R-35 (no serde on road headers; untill and Until fixtures; a guard against serde(flatten), R-26 (Plan.expires on both sides), R-42 (names refuse line breaks, U+0085, U+2028/9, zero-width and bidi characters), R-02 (no aggregation; the oracle requires exact equality). Also added from it: wg-quick hooks refused in raw blocks (R-41), public, special and IPv4-embedding ranges refused as routes (R-05/07/08), the kill switch winning over going direct to the internet (R-47).

Critical self-review

  1. major: proto v1 has no serial or epoch. Once Day 3 signs plans, an old, validly signed plan can be replayed to bring back revoked access. v2 must carry a monotonic serial that devices refuse to go below, as well as the signature. Not fixed here.
  2. major: "no plans when a snapshot has an error" pushes a hard choice onto Day 3. An engine that treats it as an empty plan cuts the whole household off over one typo in devices.json; one that keeps the old plan keeps revoked access. This needs a decision, probably "keep the old plan, but never past its expires".
  3. major: app: subjects reach every device in the mesh. app:steam goes-direct 0.0.0.0/0 applies to everyone's devices, including other people's. It only ever narrows protection (traffic leaves the tunnel), but it is wider than a reader of the sentence would guess. It should probably be app at a device or person.
  4. major: a kill switch with an error turns the protection off. "Grants nothing" is the right rule for grants and the wrong one for restrictions. Conflicting kill switches fail closed; an invalid one does not (open question 1).
  5. minor: classic.unacknowledged fails the whole road. One classic device owned by a person blocks that person's road for all their devices until classic: true is added. It is safe, but surprising.
  6. minor: explain uses overlap. A tcp/443-only road "explains" device:<x> as a whole; the CLI prints the ports, but a UI must too.
  7. minor: a missing roads/ folder compiles to empty plans without a problem. With --store pointing at a folder that holds only the snapshots, every access disappears silently.
  8. minor: roads/ itself is followed if it is a symbolic link (entries inside are refused, the folder is not).
  9. minor: a kill switch through an exit the device has no exits-through road to leaves it offline. That is the literal meaning, but nothing warns about it.
  10. process: the doc came first, but the tests and the code were written together, not tests-then-code. The commits say so.

Not verified

  • Only on Windows. The #[cfg(unix)] symbolic-link case of QA R-32 has never run, and the golden files were produced and checked on Windows only (R-54 asks for both).
  • No fuzzing of the header parser or the CBOR decoder (the decoder's nesting limit is tested once with 10,000 levels).
  • R-55 (renaming every id gives the same plan) is not done; P-2 (completeness) is not a property.
  • Nothing here touches a network or a real key: device keys in fixtures are 32 repeated bytes.

Open questions (also in the doc)

Kill switch on an invalid road; how the people directory will key people; where a service's device comes from (Ianitor names hosts, not Tessera keys); whether classic: true is the right acknowledgement; Address/DNS in raw blocks; global IPv6 routes; a BOM in a road file (refused today, QA would read it).

## After QA (owner session, 2026-11-25) QA's review (comments 49910–49925, `Via/qa/review-via-core-pr1.md`) found one blocker and five majors in the model. All are fixed on this branch, one commit each, each removing the `#[ignore]` of its test in `crates/roads/tests/qa_findings.rs` in the same commit. Details: `docs/02_via-core.md`, "QA review of PR #1, and what changed"; state and counts: `HANDOVER.md`. **Build described:** branch head, Windows 10, `cargo 1.99.0` stable MSVC, debug profile. | Check | Result | |:--|:--| | `cargo test --workspace` | **90 passed, 0 failed, 0 ignored** (was 75 passed, 9 ignored) | | clippy `-D warnings`, `fmt --check` | clean | | `cargo deny check` / `cargo audit` | ok / 80 crates, 0 vulnerabilities | | fuzz `road_file` | **631 s, 807,395 executions, 0 crashes, 0 artifacts** (features 7,711 → 9,819; corpus 1,080 → 1,289), built at `7342659`, Windows MSVC, SanitizerCoverage, no sanitizer | | fuzz `envelope` | **331 s, 17,441,113 executions, 0 crashes** (features 5,096 → 5,256), same build | | # | Fix | Commit | |:--|:--|:--| | F-01 blocker | services may have their own mesh address; a road to a service that shares its address **and** a port with another is refused (`service.shared`); a `device:` road reaches all of the device's addresses; plans list the device's service addresses | `69e3a93` | | F-02 | `direct.mesh` (a non-default direct subnet holding a mesh address), `direct.tunnelled` (inside a tunnelled net: dropped), `direct[].except` (tunnelled nets inside: stay in the tunnel) | `80f73a0` | | F-03 | a kill-switch road with an error fails closed, through no exit | `3bd87eb` | | F-04 | a dangling owner or group member drops only itself | `acb98a6` | | F-09 | `until:` / `ports:` present but empty is `key.empty` | `93ab087` | | B-3 | `app:` roads need `on:` and reach only those devices | `b482e26` | | F-05, F-06 | classic custom blocks; `road.family` | `ecafe19` | | F-07 | `store.roads` (also: `roads/` never followed through a link) | `b6cf29b` | | F-08 | mesh addresses never internet addresses | `ff78361` | | F-10 | P-6v6: IPv6 by embedding into `fd00::/96` | `7342659` | | R-55 | QA's renaming property failed ~1 run in 4 (a group renamed to `in`); fixed in the test, seed pinned | `31a46d0` | Every fix was mutation-checked: reintroducing the bug fails its test. ### Critical self-review of the fixes 1. **major, design: F-01 adds a service address to `devices.json`.** Per-service rules need something the firewall can see; a hostname is not. The alternative, relying on Ianitor's per-host identity gate, was not needed. Day 3 must give the hosting device each service address on its tunnel interface, and Ianitor must listen on it. Until a service has its own address, a road to it is refused whenever it shares a port, so today's "everything behind Ianitor on 443" needs one address per service. 2. **major, design: F-02's `except`.** Every platform must keep the `except` nets in the tunnel. An app-level bypass (Android's disallowed apps) cannot do that, so such a platform must not apply that entry. Day 5 and Day 6 tests must check it. 3. **minor: the plan format changed in place** (`services`, `direct[].except`) while still `format: 1`. Nothing has consumed it; it would need a version bump after v0.1.0. 4. **minor: a kill-switch file that does not parse** still applies nothing, only an error. Recorded. 5. **minor: P-6v6 checks IPv6 by isomorphism with IPv4**, not against its own oracle. A bug present in both families would pass it; P-1 covers IPv4. ### Still open (recorded in `docs/02_via-core.md`, Gaps) - **B-1** replay: proto v2 on Day 3 (serial + `not_after`). - **F-13** `explain` / `check` as admin: **blocks the Day 5 web view**. - **F-11** no Linux run (WSL does not start here). Wanted before the tag. - **F-12** case-sensitive ids: decide with the people directory. --- ## Original description (builder, before QA) Day 2 of Via Domi: the road model, its validator, the compiler from roads to one plan per device, `explain`, the versioned CBOR control messages, and the `via` command. Design: `docs/02_via-core.md`; formats field by field: `docs/FORMATS.md`. **Do not merge yet: QA reviews first, then the orchestrator merges and tags v0.1.0.** ## What is in it | Crate | What | |:--|:--| | `roads` | road files (`roads/<id>-<slug>.md`, Pensum's strict header subset, unknown keys are errors, 6-character random Crockford ids), `directory.json` and `devices.json` snapshots (serde `deny_unknown_fields`, no `flatten`), 57 rule codes, deny-by-default compiler, `explain` read from the compiler's own grants | | `proto` | CBOR envelope v1: `plan-request`, `plan` (with a SHA-256 digest of the plan's CBOR), `plan-ack`, `refused`; the version is read before the body; unknown fields, trailing bytes, >1 MiB, nesting >32 and a wrong digest are refused | | `via-cli` | `via check`, `via compile --device <name\|key> [--format json\|cbor]`, `via explain <device> <place>`; exit 0 / 1 (problems or denied) / 2 (usage) | `#![forbid(unsafe_code)]` in every crate and `unsafe_code = "forbid"` in the workspace lints. ## Id formats used (read from the owning code) - Road id and file name, problem lines, unknown keys: Pensum, `Fabrica/core/crates/pensum/src/id.rs:5-12`, `problem.rs:3-34`, `ticket.rs:11-12, 372-375`, `core/docs/FORMATS.md:14-42, 85-97, 161-165`. - Device key: Tessera device subkey, Ed25519 public key, base64url without padding (43 chars, canonical): `Fundamentum/docs/TESSERA.md:29, 53-55`. - App id: Tessera id, `Fundamentum/crates/tessera/src/id.rs:5-20`. - Service: Ianitor host = hostname, `hosts/<hostname>.toml`: `Ianitor/crates/core/src/routes.rs:5-16, 41-42`; rules `validate.rs:693-730`. - Person and group ids: **no people directory exists in Fundamentum** (`Liber/Liber/docs/05_together.md:13`), so an opaque newtype, 1-64 of `[A-Za-z0-9_-]`. ## Tests 72 tests, all passing (`cargo test --workspace`, Windows, debug): | File | Tests | |:--|--:| | `roads` unit tests (header, ids, net, ports, road, id) | 16 | | `roads/tests/validation.rs` (66 fixture files + 6 generated cases; all 57 rules covered, meta-test fails on a rule without a fixture) | 5 | | `roads/tests/revocation.rs` | 9 | | `roads/tests/least_privilege.rs` (proptest: P-1 5,000 cases; invalid/expired 500; P-3/P-4 500 = **6,000 cases**) | 5 | | `roads/tests/determinism.rs` (twice, shuffled, CRLF, 7 golden plans) | 4 | | `roads/tests/explain.rs` | 6 | | `roads/tests/custom.rs` | 6 | | `roads/tests/attacks.rs` (QA cases) | 8 | | `proto/tests/roundtrip.rs` | 6 | | `via-cli/tests/cli.rs` (separate processes, byte-identical) | 7 | Of the 5,000 P-1 cases in the measured run, 1,688 had at least one firewall rule, and 4,322 rules and 7,560 allowed IPs were checked against the oracle (the counter prints with `--nocapture`). The other two thirds are worlds where every road is refused or inactive, which the property also covers. **Regression-verified by reintroducing the bug** (each made the property fail, then reverted): 1. subnet grants widened to the router's whole route (QA R-02) → P-1 fails on the oracle's exact-subnet check; 2. the receiving side's peer widened from the client's /32 to a /24 (QA R-10) → P-1 fails ("source has no peer of its own"); 3. `until` made inclusive (`<` instead of `<=`) → P-1 and the invalid/expired property fail, and revocation fails. The validation fixtures were not each mutation-checked; each asserts its own rule code, file and field, and asserts that every plan stays byte-identical to the baseline. `cargo deny check`: advisories ok, bans ok, licenses ok, sources ok (warnings: unused allowed licences, two `syn` versions). `cargo audit`: 80 crates scanned, 0 vulnerabilities, 0 warnings. `chrono` was flagged unmaintained (RUSTSEC-2026-0543), so dates moved to `jiff`. `cargo clippy --workspace --all-targets`: clean. ## QA's attack plan `Via/qa/02_roads_attacks.md` is answered case by case in `docs/02_via-core.md`, "What QA's attack plan changed". The five it ranked first: R-10 (property + `attacks.rs`), R-35 (no serde on road headers; `untill` and `Until` fixtures; a guard against `serde(flatten`), R-26 (`Plan.expires` on both sides), R-42 (names refuse line breaks, U+0085, U+2028/9, zero-width and bidi characters), R-02 (no aggregation; the oracle requires exact equality). Also added from it: wg-quick hooks refused in raw blocks (R-41), public, special and IPv4-embedding ranges refused as routes (R-05/07/08), the kill switch winning over going direct to the internet (R-47). ## Critical self-review 1. **major: proto v1 has no serial or epoch.** Once Day 3 signs plans, an old, validly signed plan can be replayed to bring back revoked access. v2 must carry a monotonic serial that devices refuse to go below, as well as the signature. Not fixed here. 2. **major: "no plans when a snapshot has an error" pushes a hard choice onto Day 3.** An engine that treats it as an empty plan cuts the whole household off over one typo in `devices.json`; one that keeps the old plan keeps revoked access. This needs a decision, probably "keep the old plan, but never past its `expires`". 3. **major: `app:` subjects reach every device in the mesh.** `app:steam goes-direct 0.0.0.0/0` applies to everyone's devices, including other people's. It only ever narrows protection (traffic leaves the tunnel), but it is wider than a reader of the sentence would guess. It should probably be `app` at a device or person. 4. **major: a kill switch with an error turns the protection off.** "Grants nothing" is the right rule for grants and the wrong one for restrictions. Conflicting kill switches fail closed; an *invalid* one does not (open question 1). 5. **minor: `classic.unacknowledged` fails the whole road.** One classic device owned by a person blocks that person's road for all their devices until `classic: true` is added. It is safe, but surprising. 6. **minor: `explain` uses overlap.** A tcp/443-only road "explains" `device:<x>` as a whole; the CLI prints the ports, but a UI must too. 7. **minor: a missing `roads/` folder compiles to empty plans without a problem.** With `--store` pointing at a folder that holds only the snapshots, every access disappears silently. 8. **minor: `roads/` itself is followed if it is a symbolic link** (entries inside are refused, the folder is not). 9. **minor: a kill switch through an exit the device has no `exits-through` road to leaves it offline.** That is the literal meaning, but nothing warns about it. 10. **process:** the doc came first, but the tests and the code were written together, not tests-then-code. The commits say so. ## Not verified - **Only on Windows.** The `#[cfg(unix)]` symbolic-link case of QA R-32 has never run, and the golden files were produced and checked on Windows only (R-54 asks for both). - No fuzzing of the header parser or the CBOR decoder (the decoder's nesting limit is tested once with 10,000 levels). - R-55 (renaming every id gives the same plan) is not done; P-2 (completeness) is not a property. - Nothing here touches a network or a real key: device keys in fixtures are 32 repeated bytes. ## Open questions (also in the doc) Kill switch on an invalid road; how the people directory will key people; where a service's device comes from (Ianitor names hosts, not Tessera keys); whether `classic: true` is the right acknowledgement; `Address`/`DNS` in raw blocks; global IPv6 routes; a BOM in a road file (refused today, QA would read it).
mnovak added 3 commits 2026-11-25 07:57:14 +01:00
Road files in Pensum's strict header subset (unknown keys are errors, random ids), the
directory and device snapshots, deny-by-default compilation to one plan per device,
explain from the compiler's own grants, CBOR envelope v1 with version-first refusals.

Tests: the six mandatory ones (validation fixtures for every rule, revocation, the
least-privilege property against an independent oracle, determinism with golden plans,
explain, custom round-trip), QA's attack cases, the protocol and the CLI.
mnovak added 5 commits 2026-11-25 08:26:37 +01:00
A proptest (300 seeds) renames every road id, person id, group id, device key,
device name and service hostname of the home store plus five roads that hit the
order-sensitive paths (an exit conflict each way round, two kill switches through
different exits, two path hints to one peer), compiles both, maps the output back
and compares plans, problems and explain.

Mutation-checked and reverted: 'first exit by key wins' on an exit conflict, and
'smallest road id wins' on disagreeing kill switches, each fail the property.
Eight tests, each #[ignore]d with its finding id (F-01 to F-08 in
Via/qa/review-via-core-pr1.md), each verified to FAIL on this code for the reason
it names (cargo test -p roads --test qa_findings -- --ignored: 0 passed, 8 failed):

F-01 a service road opens every service on the same host and port (explain admits it)
F-02 goes-direct may name mesh addresses or tunnelled subnets, kill switch or not
F-03 a kill switch whose exit stops being one fails open
F-04 deleting a person from directory.json leaves no plan for anybody
F-05 a custom block on a classic device is labelled classic: false
F-06 a road across address families compiles into a rule that never matches
F-07 a missing roads/ folder is not reported
F-08 a public address is accepted as a mesh address
road_file: any bytes as one road file in the home store. The parser never panics;
a road that parses renders to canonical text that parses back to the same road
and rendering is a fixed point; compile never panics; and a file that does not
parse, or a road the compiler reports an error for, leaves every plan
byte-identical (deny by default).

envelope: Envelope::decode never panics; whatever it accepts re-encodes, decodes
to the same envelope and encodes stably.

Own workspace, as cargo fuzz lays it out. On Windows with the stable MSVC
toolchain and no sanitizer, build.rs links win_sections.c, which gives the
SanitizerCoverage counters their COFF section bounds (compiler-rt only ships them
inside a sanitizer runtime); the exact command is in road_file.rs.
until: with no value (or only a comment) reads as absent, so a temporary grant
becomes permanent; ports: with no value reads as all traffic. No problem is
reported. Verified to fail on this code.
Author
Owner

QA review of this PR, at head b9c0e764. I read the docs, FORMATS.md and every source file.

The core claims hold: R-10 (spoofing a source), R-35 (a misspelt key), R-26 (plan expiry), R-02 (no aggregation) and determinism. The problems this review finds are in the model, not coding slips. The blocker is F-01: a service road grants the whole host:port. Each finding below is its own comment.

Pushed to feature/roads (no merge):

  • d02bbff: R-55, renaming every id gives an isomorphic plan. A 300-seed property; two reintroduced order bugs each made it fail.
  • 828962a, 635d380: tests/qa_findings.rs, one test per finding (F-01 to F-09). Each is #[ignore]d with its finding id and fails on this code. Remove the #[ignore] in the commit that fixes the finding.
  • d5917e7: fuzz/, the road_file and envelope targets.
  • 7087b06: rustfmt only.

Tests: 72 passing before. After: 75 passing, 9 ignored (all 9 fail with --ignored), 0 failing. Clippy and fmt are clean.

Fuzz (Windows, no sanitizer):

  • road_file: 721 s, 1,116,471 executions, 0 crashes. It checks: the parser never panics, the render round trip holds, compile never panics, and a refused road changes no plan.
  • envelope: 331 s, 20,086,677 executions, 0 crashes.

Not verified: nothing ran on Linux (WSL would not start), and the fuzzing had no sanitizer.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA review of this PR, at head `b9c0e764`.** I read the docs, FORMATS.md and every source file. The core claims hold: R-10 (spoofing a source), R-35 (a misspelt key), R-26 (plan expiry), R-02 (no aggregation) and determinism. The problems this review finds are in the model, not coding slips. The **blocker is F-01**: a service road grants the whole host:port. Each finding below is its own comment. **Pushed to `feature/roads`** (no merge): - `d02bbff`: R-55, renaming every id gives an isomorphic plan. A 300-seed property; two reintroduced order bugs each made it fail. - `828962a`, `635d380`: `tests/qa_findings.rs`, one test per finding (F-01 to F-09). Each is `#[ignore]`d with its finding id and **fails on this code**. Remove the `#[ignore]` in the commit that fixes the finding. - `d5917e7`: `fuzz/`, the `road_file` and `envelope` targets. - `7087b06`: rustfmt only. **Tests:** 72 passing before. After: 75 passing, 9 ignored (all 9 fail with `--ignored`), 0 failing. Clippy and fmt are clean. **Fuzz (Windows, no sanitizer):** - `road_file`: 721 s, 1,116,471 executions, 0 crashes. It checks: the parser never panics, the render round trip holds, compile never panics, and a refused road changes no plan. - `envelope`: 331 s, 20,086,677 executions, 0 crashes. **Not verified:** nothing ran on Linux (WSL would not start), and the fuzzing had no sanitizer. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-01, blocker. a service road opens every service on the same host and port (blocker)

What. Place::Service(h) compiles to Net::host(device.address) with the service's ports
(compile.rs:355-364). The firewall sees jana → 100.96.0.2 tcp/443. In the home fixture, photos.home.arpa
and git.home.arpa are both served on tcp/443 by home-server. So the road "Jana can reach Photos" also
lets her reach Git, by setting the SNI or Host header to git.home.arpa.

Evidence.

  • Take the home store without k3f9q2 (the household road).
  • explain(jana-phone, service:git.home.arpa) returns [7tq0mz]. That is the photos road. The test is
    f01_a_service_road_grants_only_that_service.
  • The least-privilege oracle models a service as its device's address plus ports
    (least_privilege.rs, may_reach, Obj::Service). The oracle shares the compiler's model, so the property
    cannot see this.

Why it matters. It is exactly Mark's risk: a road reads as one place, but a whole host:port is granted.
Day 4's sentence view will say "Jana can reach Photos".

Fix, pick one.

  1. Refuse (service.shared-port) a service road whose ports overlap another service on the same device,
    naming the other services.
  2. Make the service grant explicit as "host:port". The sentence and explain then say so, and a test proves
    that Ianitor's per-host identity gate stops the cross-service request.

Either way, the oracle must model services by hostname.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-01, blocker.** a service road opens every service on the same host and port (blocker) **What.** `Place::Service(h)` compiles to `Net::host(device.address)` with the service's ports (`compile.rs:355-364`). The firewall sees `jana → 100.96.0.2 tcp/443`. In the home fixture, `photos.home.arpa` and `git.home.arpa` are **both** served on tcp/443 by home-server. So the road "Jana can reach Photos" also lets her reach Git, by setting the SNI or Host header to `git.home.arpa`. **Evidence.** - Take the home store without `k3f9q2` (the household road). - `explain(jana-phone, service:git.home.arpa)` returns `[7tq0mz]`. That is the *photos* road. The test is `f01_a_service_road_grants_only_that_service`. - The least-privilege oracle models a service as its device's address plus ports (`least_privilege.rs`, `may_reach`, `Obj::Service`). The oracle shares the compiler's model, so the property **cannot** see this. **Why it matters.** It is exactly Mark's risk: a road reads as one place, but a whole host:port is granted. Day 4's sentence view will say "Jana can reach Photos". **Fix, pick one.** 1. Refuse (`service.shared-port`) a service road whose ports overlap another service on the same device, naming the other services. 2. Make the service grant explicit as "host:port". The sentence and explain then say so, and a test proves that Ianitor's per-host identity gate stops the cross-service request. Either way, the oracle must model services by hostname. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-02, major. goes-direct can take mesh addresses and tunnelled subnets out of the tunnel (major)

What. A goes-direct object is only checked to be a canonical subnet. The kill switch removes it only when
it reaches_internet() (compile.rs:513-547), and 100.64.0.0/10, 10/8, 172.16/12 and 192.168/16
are all "not internet". So the following compile cleanly, with the kill switch on:

  • device:mark-pc goes-direct subnet:100.96.0.0/16, which covers every mesh address;
  • goes-direct 192.168.100.0/24, which mark-pc also reaches through the tunnel by road h2x8vd.

Evidence.

  • f02_going_direct_never_overlaps_what_the_tunnel_carries: goes-direct 100.96.0.0/16 overlaps 100.96.0.2/32, which the plan sends through the tunnel.

Why it matters.

  • On a hostile network, traffic addressed to mesh peers or to the home LAN leaves in the clear, onto a network
    that may use the same private range. That is the TunnelVision / LocalNet class.
  • Which one wins, the bypass or the route, is left to Day 3 and Day 6, per platform.

Fix. Refuse (or, with a kill switch, drop) any direct subnet that overlaps a mesh address or any
non-default allowed IP in the same plan. Report it like direct.kill-switch.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-02, major.** goes-direct can take mesh addresses and tunnelled subnets out of the tunnel (major) **What.** A `goes-direct` object is only checked to be a canonical subnet. The kill switch removes it only when it `reaches_internet()` (`compile.rs:513-547`), and `100.64.0.0/10`, `10/8`, `172.16/12` and `192.168/16` are all "not internet". So the following compile cleanly, with the kill switch on: - `device:mark-pc goes-direct subnet:100.96.0.0/16`, which covers every mesh address; - `goes-direct 192.168.100.0/24`, which mark-pc also reaches *through* the tunnel by road `h2x8vd`. **Evidence.** - `f02_going_direct_never_overlaps_what_the_tunnel_carries`: `goes-direct 100.96.0.0/16 overlaps 100.96.0.2/32, which the plan sends through the tunnel`. **Why it matters.** - On a hostile network, traffic addressed to mesh peers or to the home LAN leaves in the clear, onto a network that may use the same private range. That is the TunnelVision / LocalNet class. - Which one wins, the bypass or the route, is left to Day 3 and Day 6, per platform. **Fix.** Refuse (or, with a kill switch, drop) any direct subnet that overlaps a mesh address or any non-default allowed IP in the same plan. Report it like `direct.kill-switch`. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-03, major. an invalid kill-switch road fails open (major; the builder's own #4, made concrete)

What. Any check() error makes a road grant nothing (compile.rs:318-321), and for
never-online-without "nothing" means no kill switch. The realistic trigger is not a typo. It is the exit
device dropping exit: true, or leaving devices.json. Then object.not-exit or object.unknown turns off
every kill switch through that exit, while the rest of the store compiles normally.

Evidence. f03_a_kill_switch_whose_exit_goes_away_fails_closed. With home-server's exit removed,
mark-pc's plan has kill_switch: null.

Fix. A restrictive road whose references fail should still apply its restriction in the closed form
(through: null, mesh only), as the conflict case already does. Report it as an error as well. Answers open
question 1.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-03, major.** an invalid kill-switch road fails open (major; the builder's own #4, made concrete) **What.** Any `check()` error makes a road grant nothing (`compile.rs:318-321`), and for `never-online-without` "nothing" means *no kill switch*. The realistic trigger is not a typo. It is the exit device dropping `exit: true`, or leaving `devices.json`. Then `object.not-exit` or `object.unknown` turns off **every** kill switch through that exit, while the rest of the store compiles normally. **Evidence.** `f03_a_kill_switch_whose_exit_goes_away_fails_closed`. With home-server's `exit` removed, mark-pc's plan has `kill_switch: null`. **Fix.** A restrictive road whose *references* fail should still apply its restriction in the closed form (`through: null`, mesh only), as the conflict case already does. Report it as an error as well. Answers open question 1. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-04, major. one dangling owner means no plans for anybody (major; the builder's #2, made concrete)

What. Deleting a person from directory.json is the upstream event, and nothing forces devices.json to be
edited at the same time. The leftover "owner": "petr" is devices.owner, which is a snapshot error, so
compile returns no plans at all (compile.rs:291).

Evidence.

  • f04_deleting_a_person_revokes_them_and_nobody_else: devices[5].owner: petr is not a person … no plans at all.
  • The existing R-20 test only passes because it also edits devices.json by hand.

Why it matters. Revocation is the Day 2 gate. Here it becomes "Day 3 decides". If Day 3 keeps the old plan,
Petr keeps his access. If it sends an empty plan, the household goes offline.

Fix. A dangling owner becomes an ownerless device (reached only by device: roads) plus an error naming it.
Keep "no plans" for structural problems only: bad JSON, a wrong format, a duplicate key or address.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-04, major.** one dangling owner means no plans for anybody (major; the builder's #2, made concrete) **What.** Deleting a person from `directory.json` is the upstream event, and nothing forces `devices.json` to be edited at the same time. The leftover `"owner": "petr"` is `devices.owner`, which is a snapshot error, so `compile` returns **no plans at all** (`compile.rs:291`). **Evidence.** - `f04_deleting_a_person_revokes_them_and_nobody_else`: `devices[5].owner: petr is not a person … no plans at all`. - The existing R-20 test only passes because it also edits `devices.json` by hand. **Why it matters.** Revocation is the Day 2 gate. Here it becomes "Day 3 decides". If Day 3 keeps the old plan, Petr keeps his access. If it sends an empty plan, the household goes offline. **Fix.** A dangling owner becomes an ownerless device (reached only by `device:` roads) plus an error naming it. Keep "no plans" for structural problems only: bad JSON, a wrong format, a duplicate key or address. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-09, major. an emptied until: or ports: silently widens the road (major)

What. FORMATS.md says an empty value means absent (header.rs:99-128, road.rs get filters Absent).
For the two narrowing conditions, absent is the widest value:

  • until: becomes a permanent grant;
  • ports: becomes all traffic;
  • until: # Sunday (a comment only) also becomes a permanent grant.

None of them is reported.

Evidence. f09_an_emptied_narrowing_condition_is_an_error: until: compiled as a permanent grant with no problem reported.

Why it matters. This is the R-35 failure, a temporary grant made permanent, reached by deleting a value
instead of misspelling the key. It is also what a UI writes when the user clears a field.

Fix. until: or ports: present but empty becomes key.empty (an error). Leaving the key out keeps its
current meaning.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-09, major.** an emptied `until:` or `ports:` silently widens the road (major) **What.** FORMATS.md says an empty value means *absent* (`header.rs:99-128`, `road.rs` `get` filters `Absent`). For the two narrowing conditions, absent is the widest value: - `until:` becomes a permanent grant; - `ports:` becomes all traffic; - `until: # Sunday` (a comment only) also becomes a permanent grant. None of them is reported. **Evidence.** `f09_an_emptied_narrowing_condition_is_an_error`: `until: compiled as a permanent grant with no problem reported`. **Why it matters.** This is the R-35 failure, a temporary grant made permanent, reached by deleting a value instead of misspelling the key. It is also what a UI writes when the user clears a field. **Fix.** `until:` or `ports:` present but empty becomes `key.empty` (an error). Leaving the key out keeps its current meaning. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA B-1, major. proto v1 has no serial, so an old signed plan can be replayed (major, the builder's #1, agreed)

Envelope, Body::Plan {digest, plan} has no monotonic serial and no not_after. Day 3's v2 must carry both,
and devices must refuse a serial at or below the last one, persisted across restarts (QA 03, E-07 and E-08). No
test here: v1 is unsigned by design.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA B-1, major.** proto v1 has no serial, so an old signed plan can be replayed (major, the builder's #1, agreed) `Envelope`, `Body::Plan {digest, plan}` has no monotonic serial and no `not_after`. Day 3's v2 must carry both, and devices must refuse a serial at or below the last one, persisted across restarts (QA 03, E-07 and E-08). No test here: v1 is unsigned by design. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA B-3, major. app: subjects reach every device, including other people's (major, the builder's #3, agreed)

Subject::App(_) => true (compile.rs:101 and :150). In the golden plans, e5yj1s (steam goes direct to
0.0.0.0/0) is on friend-node (Petr's exit), home-server (the exit), router (a classic third-party router,
which has no apps), and both of Jana's devices. Whoever can write one road changes the tunnel of every device
in the mesh. Scope it to the writer's person or device. Approvals (Day 4) must count it as a change to other
people's devices.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA B-3, major.** `app:` subjects reach every device, including other people's (major, the builder's #3, agreed) `Subject::App(_) => true` (`compile.rs:101` and `:150`). In the golden plans, `e5yj1s` (steam goes direct to `0.0.0.0/0`) is on friend-node (Petr's exit), home-server (the exit), router (a classic third-party router, which has no apps), and both of Jana's devices. Whoever can write one road changes the tunnel of every device in the mesh. Scope it to the writer's person or device. Approvals (Day 4) must count it as a change to other people's devices. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-05, minor. a custom block on a classic device is labelled post-quantum (minor)

plan::Custom.classic comes from road.is_classic() (compile.rs:446), not from the device. Remove
classic: true from x1d7qa, and the router's raw block is carried as classic: false. Peers take the flag
from the device, correctly. Custom blocks should too, or the road should be refused.
Test: f05_a_custom_block_on_a_classic_device_is_labelled_classic.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-05, minor.** a custom block on a classic device is labelled post-quantum (minor) `plan::Custom.classic` comes from `road.is_classic()` (`compile.rs:446`), not from the device. Remove `classic: true` from `x1d7qa`, and the router's raw block is carried as `classic: false`. Peers take the flag from the device, correctly. Custom blocks should too, or the road should be refused. Test: `f05_a_custom_block_on_a_classic_device_is_labelled_classic`. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-06, minor. a road across address families compiles into a rule that never matches (minor)

A device has one mesh address. An IPv4-addressed subject that reaches an IPv6 route gets a forward rule with
src 100.96.0.1/32 and dst fd00:1::/64, with no problem reported. That road grants nothing, and nobody is
told. Test: f06_a_road_across_address_families_is_reported.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-06, minor.** a road across address families compiles into a rule that never matches (minor) A device has one mesh address. An IPv4-addressed subject that reaches an IPv6 route gets a `forward` rule with `src 100.96.0.1/32` and `dst fd00:1::/64`, with no problem reported. That road grants nothing, and nobody is told. Test: `f06_a_road_across_address_families_is_reported`. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-07, minor. a missing roads/ folder is not reported (minor, the builder's #7, agreed)

Store::load_dir skips a missing roads/ silently. Every plan is then empty, kill switches included.
Test: f07_a_missing_roads_folder_is_reported.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-07, minor.** a missing `roads/` folder is not reported (minor, the builder's #7, agreed) `Store::load_dir` skips a missing `roads/` silently. Every plan is then empty, kill switches included. Test: `f07_a_missing_roads_folder_is_reported`. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-08, minor. mesh addresses may be public addresses (minor)

devices.address refuses only special and IPv4-embedding ranges, so 198.51.100.4 is accepted. An exit's
forward … internet rule then covers that device's mesh address. Confine mesh addresses to the mesh range
(100.64.0.0/10 or a ULA). Then internet and the mesh never meet, and QA R-09 (granting the tunnel pool)
becomes checkable. Test: f08_mesh_addresses_are_never_internet_addresses.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-08, minor.** mesh addresses may be public addresses (minor) `devices.address` refuses only special and IPv4-embedding ranges, so `198.51.100.4` is accepted. An exit's `forward … internet` rule then covers that device's mesh address. Confine mesh addresses to the mesh range (`100.64.0.0/10` or a ULA). Then `internet` and the mesh never meet, and QA R-09 (granting the tunnel pool) becomes checkable. Test: `f08_mesh_addresses_are_never_internet_addresses`. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-10, minor. the least-privilege property never generates IPv6 (minor)

least_privilege.rs world() uses only 100.96.0.x addresses and 10.0.0.0/22 routes. The IPv6 paths are
covered only by unit tests and fixtures: Net::host as /128, the /128 source on its own peer, and v6 subnets
inside v6 routes. Add a v6 family to the generator, for example routes inside fd00::/56 and addresses in a
ULA /64. No test added.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-10, minor.** the least-privilege property never generates IPv6 (minor) `least_privilege.rs` `world()` uses only `100.96.0.x` addresses and `10.0.0.0/22` routes. The IPv6 paths are covered only by unit tests and fixtures: `Net::host` as /128, the /128 source on its own peer, and v6 subnets inside v6 routes. Add a v6 family to the generator, for example routes inside `fd00::/56` and addresses in a ULA /64. No test added. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-11, minor. Linux has never run these tests (minor, the builder's "not verified", agreed)

The #[cfg(unix)] symlink case (R-32) has never executed, and the golden files were produced on Windows only
(R-54). It needs one Linux CI run before v0.1.0.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-11, minor.** Linux has never run these tests (minor, the builder's "not verified", agreed) The `#[cfg(unix)]` symlink case (R-32) has never executed, and the golden files were produced on Windows only (R-54). It needs one Linux CI run before v0.1.0. Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-12, minor. person and group ids are case-sensitive, so person:Jana ≠ person:jana (minor)

is_opaque_id allows A-Z. Two directory entries that differ only in case are two people, and a road for one
reads identically to a road for the other. If Fundamentum's directory turns out to be case-insensitive, roads
will silently stop matching. Decide this when PersonId gets its real format (open question 2).

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-12, minor.** person and group ids are case-sensitive, so `person:Jana` ≠ `person:jana` (minor) `is_opaque_id` allows `A-Z`. Two directory entries that differ only in case are two people, and a road for one reads identically to a road for the other. If Fundamentum's directory turns out to be case-insensitive, roads will silently stop matching. Decide this when `PersonId` gets its real format (open question 2). Durable copy: `Via/qa/review-via-core-pr1.md`.
Author
Owner

QA F-13, minor. explain and check answer as an administrator (minor here, a blocker for the Day 5 web view)

These are QA R-49 and R-51, and the builder has already listed the gap. Recorded so that Day 5 cannot ship
without it.

Durable copy: Via/qa/review-via-core-pr1.md.

**QA F-13, minor.** `explain` and `check` answer as an administrator (minor here, a blocker for the Day 5 web view) These are QA R-49 and R-51, and the builder has already listed the gap. Recorded so that Day 5 cannot ship without it. Durable copy: `Via/qa/review-via-core-pr1.md`.
mnovak added 12 commits 2026-11-25 09:12:08 +01:00
Clearing a narrowing field (until:, until: # comment, ports:) used to read as
absent, which is the widest value: a permanent grant or all traffic. It is now
an error, so the road grants nothing. Three fixtures, FORMATS.md updated, and
the F-09 test is no longer ignored.
A store folder without roads/ compiled to plans with no access and no problem,
kill switches included. It is now an error naming roads. A roads/ that is a
file or a symbolic link is refused the same way (the builder's self-review #8):
entries inside were already refused, the folder itself was followed.
Deleting a person from directory.json without editing devices.json left a
dangling owner, a snapshot error, and so no plans for anybody. A well-formed
owner or member id that is not a person is now reported on its own codes
(devices.owner-unknown, directory.member-unknown) and removed: the device is
ownerless, the member leaves the group. Malformed ids, duplicates and bad JSON
still stop every plan. Two new structural fixtures keep devices.owner and
directory.member covered.
Any check() error used to make a road grant nothing, and for
never-online-without nothing meant no kill switch: an exit that stopped being
one (or left devices.json) silently turned off every kill switch through it.
The road is still reported as an error, but its subject's kill switch stays
on through no exit (only the mesh), and going direct to the internet is still
dropped. An expired kill switch ends as written. The road_file fuzz target's
deny-by-default check now allows exactly that narrowing and nothing else.
The R-55 property mapped renamed strings back anywhere in the output, so a
group renamed to `in` turned every firewall "direction": "in" into the
group's old name and failed about once in four runs (seed
8124609985917702487). The renaming now reserves every string the plans and
problems hold; the seed is kept as a fixed test, which fails without the
reservation. No change to the compiler.
devices.address refused only special and IPv4-embedding ranges, so a public
address was accepted, and an exit's forward-to-internet rule then covered that
device's mesh address. Mesh addresses now stay inside the not-internet ranges
(100.64.0.0/10, RFC 1918, ULA). Two fixtures, IPv4 and IPv6.
F-05: plan.custom took classic from the road only, so a raw block on a classic
device without classic: true was labelled post-quantum. The device's flag now
counts too, as it already did for peers.

F-06: a device has one mesh address, so a can-reach road from IPv4 devices to
an IPv6 place compiled to rules that could never match, silently. Those
devices now get nothing for that road, and the road is reported inactive
(road.family) naming them.
A goes-direct subnet was only checked to be canonical, and the kill switch
dropped it only when it reached the internet, so 100.96.0.0/16 (every mesh
address) or the home LAN that the plan routes into the tunnel compiled cleanly.

Now, decided here because the plan has to say which route wins:
- a goes-direct subnet other than /0 that holds a mesh address is refused
  (direct.mesh);
- per device, a direct subnet inside a net the plan tunnels is dropped and
  reported (direct.tunnelled);
- a direct subnet that holds tunnelled nets keeps them in the tunnel, listed
  in the new plan field direct[].except. A platform that cannot honour except
  (an app-level bypass) must not apply the entry.

The F-02 test now checks that every overlap is covered by except, and that
only the mesh subnet is refused. Golden plans and the pinned jana-phone digest
are regenerated: the only change is the except lists. Plan format 1 has not
been released, so it changes in place.
A firewall sees an address and a port, never a hostname, so a road to
photos.home.arpa compiled to home-server:443 and also opened git.home.arpa
there. Rules are now per service:

- devices.json services may carry their own mesh address (same rules as a
  device address, unique among all of them). A road to such a service compiles
  to that address only; the hosting device's plan lists it in the new field
  services[] so it answers on it, and DNS points there.
- A road to a service that shares its address and a port with another service
  is refused (service.shared), naming the others, instead of opening both.
  Narrowing ports: to a port nobody else serves on that address is allowed.
- A device: road reaches the whole device: its own address and its services'
  own addresses.

No Ianitor identity check is needed for this. The home fixture gives photos
its own address (100.96.1.2); tests that encoded the old host:port model are
updated, three new snapshot fixtures cover the address rules, and the golden
plans and pinned digest are regenerated. Mutation-checked: dropping the
refusal, or ignoring the service address, each fails an F-01 test.
subject: app:<id> applied to every device in the mesh, so whoever could write
one road (app:steam goes-direct 0.0.0.0/0) changed the tunnel of other
people's devices, an exit and a classic router. An app road now needs the new
header key on: (a person, group or device), and reaches only those devices;
on: is forbidden on any other subject. The home fixture's steam road is on
Mark's devices, so it leaves Jana's, Petr's and the router's plans. Four
fixtures, a B-3 test (fails if app roads reach every device again), the
property generator scopes app roads to a person, and the R-55 renaming
rewrites on: like subject:.
The least-privilege oracle works in u32, so P-1 never saw an IPv6 address.
P-6v6 (1,000 cases) writes the same generated world with every IPv4 address a
as fd00::a and every /L as /(L+96) (the default route as ::/0), compiles both,
and requires the IPv6 plans to equal the IPv4 plans mapped the same way, with
the same problems. So every IPv6 path behaves like the IPv4 one P-1 checks
against the oracle. Mutation-checked: IPv6 hosts as /127 fails it at once.
02_via-core.md now describes the model as built after the QA fixes (service
addresses, app on:, fail-closed kill switch, the tunnel winning over going
direct, dangling references, empty narrowing keys, missing roads/), maps every
finding to its resolution, and lists what is recorded rather than fixed:
B-1 replay (Day 3 proto v2), a kill-switch file that does not parse, the
app-level /0 bypass, case-sensitive ids, no Linux run, and explain/check as
admin, which blocks the Day 5 web view.
mnovak added 1 commit 2026-11-25 09:24:33 +01:00
Author
Owner

Owner session: QA findings fixed (branch head 18e0c50).

F-01 to F-10 and B-3 are fixed, one commit each; every #[ignore] in qa_findings.rs is gone. cargo test --workspace: 90 passed, 0 failed, 0 ignored (debug and release). clippy, fmt, deny and audit are clean. Fuzz on the final library code (7342659): road_file 631 s, 807,395 executions; envelope 331 s, 17,441,113 executions; 0 crashes.

F-01 is solved without Ianitor: a service may have its own mesh address, and a road to a service that shares an address and a port with another is refused (service.shared). F-02 adds direct[].except. B-1, F-11, F-12 and F-13 are recorded as gaps in docs/02_via-core.md; F-13 blocks the Day 5 web view.

QA's resolutions table in Via/qa/review-via-core-pr1.md is filled in. Not merged or tagged yet: one Linux run (F-11) and the signed-release question are still open.

**Owner session: QA findings fixed** (branch head `18e0c50`). F-01 to F-10 and B-3 are fixed, one commit each; every `#[ignore]` in `qa_findings.rs` is gone. `cargo test --workspace`: **90 passed, 0 failed, 0 ignored** (debug and release). clippy, fmt, deny and audit are clean. Fuzz on the final library code (`7342659`): `road_file` 631 s, 807,395 executions; `envelope` 331 s, 17,441,113 executions; 0 crashes. F-01 is solved without Ianitor: a service may have its own mesh address, and a road to a service that shares an address and a port with another is refused (`service.shared`). F-02 adds `direct[].except`. B-1, F-11, F-12 and F-13 are recorded as gaps in `docs/02_via-core.md`; F-13 blocks the Day 5 web view. QA's resolutions table in `Via/qa/review-via-core-pr1.md` is filled in. Not merged or tagged yet: one Linux run (F-11) and the signed-release question are still open.
mnovak added 1 commit 2026-11-25 10:59:01 +01:00
Mark, 2026-11-25, "Leave classic out": a grant to a person or a group covers
only their post-quantum devices. A classic router is reached only through a
device: road of its own, which says classic: true. Before, a person grant
covered their classic devices and so needed classic: true itself, and one
classic device blocked every road of its owner (builder's self-review #5).
New test a_person_grant_never_covers_their_classic_device, which fails with
the old compiler. Docs and HANDOVER updated: 91 tests, debug and release.
mnovak added 1 commit 2026-11-26 04:21:17 +01:00
Mark, 2026-11-26: the Linux run goes on Fabrica's server runner. The flake gives only the
toolchain (nixos-26.05, locked as Ianitor's); the pipeline runs cargo test --workspace in debug
and release. It builds and switches nothing on the server.
mnovak added 1 commit 2026-11-26 04:24:38 +01:00
mnovak added 1 commit 2026-11-26 05:24:25 +01:00
mnovak merged commit 175cb5dc60 into main 2026-11-26 05:24:39 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/via-core#1