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.
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.
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.
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.
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.
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.
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
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.
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.