2.7 KiB
2.7 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| fuzz-target-name-validation | Fuzz target — `name_validation` (core name validation) | pending |
|
narrow | trivial | component | implementation |
|
Description
The §3.3 target: name_validation — the cheapest target, driving core's
already-pub validation surface (alkstore/src/validation.rs:
validate_name over all NameKinds, validate_shared_name,
validate_local_name). No exposure needed.
fuzz_targets/name_validation.rs+shared/src/ name_validation.rs(invariants +#[cfg(test)]replay),[[bin]]entry. Input: arbitrary&[u8]→ strings (lossy + a structured path), lengths spanning the caps, allNameKinds.- Invariants (§3.3, verbatim): total (no panic on any input);
deterministic accept/reject (same input → same verdict, pinned by
double-invocation in the invariant fn); rejection only via typed
Error::InvalidName(orReservedNamewhere the reserved-prefix rule fires — both are the taxonomy's typed rejections; nothing else, no panic); the reserved-prefix rule (__alkstore_, ADR-014 §1's shared namespace) rejects in every casing/boundary form the fuzzer finds; length-boundary exactness at the cap (the ±1 neighborhood — a name at the cap is accepted, one past it rejected, per the pinned rule). - Seeds via
gen_fuzz_seeds.py'sname_validationfunction: cap-boundary lengths (±1, ±2), the reserved prefix in plain / suffixed / embedded forms, empty and whitespace-only strings, unicode and control-char shapes, the reserved listener-reconnected string. Corpus committed; gitignore negation. fuzz/README.mdtargets-table row.
Low expected yield (the doc says so) — the value is the entry-point domain guard demonstrated over the whole string space, the gate's guard-order discipline made continuous.
Acceptance Criteria
fuzz_targets/name_validation.rs+shared/src/ name_validation.rsexist;cargo fuzz buildbuilds the target- All §3.3 invariants implemented and exercised by both the fuzz path and the replay module
- Seed corpus committed, deterministic-generated, gitignore negation in place
cargo test --manifest-path fuzz/shared/Cargo.tomlgreen;sharedclippy/fmt gates green- Root workspace gates still green
References
- docs/research/fuzzing.md §3.3 (target spec), §4, §7
- docs/architecture/core-contract.md §Naming / reserved namespace
- docs/architecture/decisions/014-naming-and-reserved-namespace.md §1 (the reserved-prefix rule the target demonstrates)
- alkstore/src/validation.rs (the surface)
Notes
To be filled by implementation agent
Summary
To be filled on completion