| Suite | Count | Location | Run command |
|---|---|---|---|
| Unit tests | 67 | src/interface/ffi/src/*.zig (inline test blocks) |
zig build test |
| Integration tests | 39 | src/interface/ffi/test/integration_test.zig |
zig build test-integration |
| Smoke tests | 5 | src/interface/ffi/test/smoke_test.zig |
zig build test-smoke |
| Property tests | 14 | src/interface/ffi/test/property_test.zig |
zig build test-property |
| Total tests | 125 |
Benchmarks: 15 scenarios across 7 benchmark groups in src/interface/ffi/bench/bench_main.zig
Run with: zig build bench
| Requirement | Status | Notes |
|---|---|---|
| Unit tests | DONE | 67 tests across 8 modules |
| Smoke tests | DONE | 5 end-to-end pipeline tests |
| Build | DONE | zig build clean (all 3 artefacts) |
| Property-based (P2P) | DONE | 14 invariant tests, P1–P14 |
| E2E | DONE | smoke_test.zig covers full pipeline |
| Reflexive | DONE | result code mapping, enum exhaustiveness |
| Contract | DONE | ABI integer mapping, secret redaction |
| Aspect | DONE | Security tests (command injection, injection strings) |
| Benchmarks | DONE | 15 scenarios, B1–B7 |
File: src/interface/ffi/test/property_test.zig
14 property/invariant tests covering:
- P1
detectFormatis total — never panics on any byte sequence in a 40-entry corpus - P2
detectFormatis deterministic — same input always yields same output - P3
parseAutois total — never panics on valid or malformed inputs - P4
parseAutofield count is always >= 0 (consistent internal state) - P5 Config field keys are always non-empty after
addField - P6
getFieldreturns the exact value supplied toaddField(insertion/lookup consistency) - P7
ActionKindvalues are injective — no two variants share an integer - P7b
ActionKindcovers all 8 expected action types by name - P8
GrooveTargetfixed buffers never overflow on any input (clamping verified) - P9
GrooveTargetname/host round-trip for inputs that fit the buffer - P10
ProfileRegistry.listProfilesalways returns valid JSON (empty or populated) - P11 Every inserted key is retrievable regardless of insertion order
- P12
field_typeis preserved exactly byaddField(including empty string case) - P13
ConfigFormatvalues are injective — no two variants share a u8 value - P14
parseAutois deterministic — two parses of the same input produce identical field lists
File: src/interface/ffi/bench/bench_main.zig
15 benchmark scenarios in 7 groups:
- B1a
detectFormatsmall KV payload (~50 B): 100 000 iterations - B1b
detectFormatmedium JSON payload (~300 B): 100 000 iterations - B1c
detectFormatlarge Lua payload (~2 KB): 100 000 iterations
- B2a
parseAutoKeyValue (small): 5 000 iterations - B2b
parseAutoJSON (medium): 5 000 iterations - B2c
parseAutoLua (large): 5 000 iterations - B2d
parseAutoINI (medium): 5 000 iterations - B2e
parseAutoXML (medium): 5 000 iterations
- B3 batch of ~80 addresses (including injection strings): 100 000 iterations
- B4
addField× 5 fields: 5 000 iterations - B5
getField× 4 lookups (best/average/worst/miss): 100 000 iterations
- B6a
setName+setHost+ read (fits 64/256 B buffers): 100 000 iterations - B6b Same ops with oversized strings (clamping path): 100 000 iterations
- B7a
listProfileson empty registry: 5 000 iterations - B7b
listProfileswith 1 registered profile: 5 000 iterations
- Completion: 100% (all 15 phases complete)
- Tests: 125 Zig tests across 4 suites (unit: 67, integration: 39, smoke: 5, property: 14). All passing.
- Benchmarks: 15 scenarios across
bench/bench_main.zig.zig build benchwired. - Build step:
zig build test-propertyandzig build benchboth registered inbuild.zig.
- isLocalhost edge cases: IPv6, injection strings, whitespace, case
- parseAndDispatch: invalid JSON, empty JSON, unknown action/runtime
- ActionKind integer mapping verification
- executeAction: local podman, systemd journalctl paths
- Empty/whitespace input handling
- XML self-closing and element patterns
- JSON nested object flattening, booleans, nulls
- parseAuto dispatch verification
- Secret detection for password/token/secret keys
- ParsedConfig.getField null for missing keys
- isNumeric edge cases
- Target registry overflow (MAX_TARGETS = 8)
- Buffer truncation for oversized name/host
- TargetStatus enum completeness
- Empty name/host edge cases
- applyDiff: key-value Modified/Added/Removed
- extractA2MLAttr and extractQuotedValue edge cases
- Secret redaction verification
- Fixed
std.json.stringify->std.json.fmt(Zig 0.15.2 compat) - Fixed
std.fs.exists->fileExistshelper (Zig 0.15.2 compat) - Fixed
std.fs.cwd().createFilesignature (Zig 0.15.2 compat) - Fixed broken multiline string in CLI usage text
- Fixed stack-returning helper functions (undefined behavior)
- Fixed multiple missing
catch {}on writeAll calls
- Core: Types.eph, Capabilities.eph, Shell.eph, Bridge.eph, GrooveClient.eph
- GUI: main.eph, 7 panel .eph files
- JavaScript: 5 bridge/glue files
- These require Ephapax compiler + Gossamer runtime
- Layout.idr postulate replaced with constructive proof (
alignUpCeil+alignUpCeilIsMultiple) - No compile-time Idris2 tests wired into CI yet
- Game server lifecycle: discover -> connect -> configure -> monitor -> restart
- Panel system: load panels -> display -> interact
- Groove integration: discover services -> negotiate capabilities
- VeriSimDB integration: store -> query -> dashboard
- No AFL/libFuzzer harness yet (placeholder removed)
- Priority targets:
detectFormat,parseAuto,parseA2MLProfile