Two additions on top of the hyper-optimized VEIL shield.
1) Adaptive optimization (v2/crates/wifi-densepose-privshield/src/optimize.rs):
- optimal_bits_across_snr / model_optimal_bits_for_snr: the throughput-
optimal feedback resolution shifts with SNR (unconstrained optimum 4 bits
at 5-10 dB, 3 bits at 20-40 dB); within the spec {5,7,9} set it stays 5,
which is why the shipped shield is SNR-stable.
- adaptive_shield / min_passes_for_n: derive a shield for a specific
deployment. Finding: the collapse budget is N-independent in this model
(48 passes collapses N in {8,64} alike) — it is set by the fine-subspace
dimension, not the candidate count. Defaults unchanged, so the proof
witness is untouched. 38 tests + doctest pass; clippy -D warnings clean.
2) npm metaharness harness/wifi-densepose-privshield/ (ADR-289), mirroring
wifi-densepose-sar-harness (ADR-286) with two improvements:
- @metaharness/* imported dynamically inside the commands that need them, so
`guidance` and `--help` run with ZERO dependencies installed (offline / pre
`npm install`).
- a dependency-free VEIL `guidance` command: a source-cited, evidence-
labelled, read-only capability map (topics: overview, threat,
countermeasure, compliance, optimization, experiment).
Standard router + flywheel (SYNTHETIC) + Darwin wiring, tailored to VEIL
task axes and policy levers. Tests: smoke + router + flywheel (need install)
and guidance (offline). .harness manifest generated with real per-file
hashes. Validated offline: cli syntax, --help, guidance topics, exit codes,
graceful degradation when deps are absent.
Docs: research bundle 08 gains a per-deployment adaptivity section; 07 and the
crate README point at the harness; ADR-289 added and indexed.
Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01WEXNqzs7UsfNFBcP5yW21p
5.1 KiB
ADR-289: wifi-densepose-privshield-harness — a MetaHarness for the VEIL privacy shield
| Field | Value |
|---|---|
| Status | Proposed — implemented (P1) |
| Date | 2026-08-09 |
| Parent | ADR-288 (wifi-densepose-privshield / VEIL, the crate this harness assists development on) |
| Relates to | ADR-286 (wifi-densepose-sar-harness, the per-crate harness scaffold this one mirrors), ADR-285 (harness/homecore/, the WASM-first @metaharness/kernel pattern), ADR-182 (harness/ruview/, the first minted harness), ADR-282 (L0–L5 evidence ladder) |
| Location | harness/wifi-densepose-privshield/ |
0. PROOF discipline
Every claim below about what is "real" versus "illustrative"/"SYNTHETIC" is checked by a test in this harness's own suite (router + flywheel + install-smoke
- guidance). The dependency-free
guidancesurface is covered by__tests__/guidance.test.ts, which runs even beforenpm install. Nothing here asserts a MEASURED defense result — the harness surfaces the VEIL crate's SYNTHETIC/L0 numbers with that label intact.
1. Context
wifi-densepose-privshield (ADR-288) is the VEIL privacy shield — a new,
narrowly-scoped crate. Following the pattern ADR-286 set for
wifi-densepose-sar, it gets a dedicated per-crate MetaHarness rather than a
bespoke setup: the vertical:coding scaffold (architect/implementer/reviewer/
test-writer, doctor) with @metaharness/router, @metaharness/flywheel, and
Darwin Mode wired in, plus a VEIL-specific, dependency-free guidance surface.
2. Decision
Land the harness at harness/wifi-densepose-privshield/, mirroring
wifi-densepose-sar-harness, with two deliberate improvements:
- Dynamic dependency imports.
bin/cli.jsimports the@metaharness/*packages inside the commands that need them, not at module top. Soguidance,--help, and the guidance test run with zero dependencies installed — useful for offline/air-gapped review and for this repo's CI beforenpm install. Onlyinit/doctor/route/flywheeltouch the kernel/host/router/flywheel packages. - A VEIL
guidancecommand. A self-contained, source-cited, read-only capability map (topics:overview,threat,countermeasure,compliance,optimization,experiment), each entry carrying a summary, repo-relative source citations, focused validation commands, and explicit limitations — theruview_guidanceshape, specialized to VEIL. It labels all defense evidenceSYNTHETIC/L0and states plainly that guidance is navigation, not authority.
The standard three self-improvement/cost pieces are wired as real npm dependencies (not stubs):
@metaharness/darwin(devDependency) —npm run evolve/evolve:drymutates the harness's own operating config, keeping only measurable gains.@metaharness/router—src/router.tswires a real cost-optimalRouter(qualityBar: 0.8, k=1) over two model tiers, with four VEIL-shaped task axes (threatModeling / complianceReview / optimizerTuning / docWriting). Labelled examples are illustrative seed data (honesty note in-file).@metaharness/flywheel—src/flywheel.tswires the realrunFlywheelGenerationspromotion loop (propose → evaluate → gate → promote, Ed25519-signed, independently replayable) with a SYNTHETIC proposer/evaluator (dataSource: 'SYNTHETIC', no model call), over VEIL policy levers (complianceReview,threatTriage).
3. What this explicitly is NOT
- Not a VEIL runtime. The harness does not run a radio, emit RF, or jam. It assists development on the crate; it cannot execute the shield on hardware.
- Not evolving the crate. Darwin/Flywheel mutate the harness's own policy (agent prompts, review-checklist depth), not VEIL's Rust code. The crate's actual hyper-optimization (ADR-288 §opt) was done directly, in the crate.
- Not a live routing/promotion system. The router's examples are seed data;
the flywheel's proposer/evaluator are deterministic stand-ins — both honestly
labelled in-source and in
CLAUDE.md. - Not a replacement for the crate's gates. The authoritative check for a
VEIL change remains
cargo test -p wifi-densepose-privshield. - Not a re-labeller. The harness must never present VEIL's SYNTHETIC results
as MEASURED, and never scaffold interference-based ("jamming") defenses — both
are hard rules in the harness
CLAUDE.md.
4. Consequences
- The harness ships
guidance/doctor/init/route/flywheel;guidanceand--helpwork offline (validated here vianode bin/cli.js), the rest afternpm install+npm run build(CI). .harness/manifest.json+manifest.sha256are generated with real per-file hashes at creation (unlike ADR-286's scaffold, whose manifest was historical).- Scoped to its own name: its plugin, permissions, and (future) MCP surface only
read/assist on
wifi-densepose-privshield. No risk to other harnesses/crates.
5. Validation
cd harness/wifi-densepose-privshield
node bin/cli.js guidance --topic overview # dependency-free
npm ci && npm run build && npm test # full suite (CI; needs registry access)