# Automated signal-to-noise gate
One executable process, no model calls or live banks:
```sh
CARGO_BUILD_JOBS=1 cargo run --locked --offline --example signal-gate -- \
/absolute/baseline/instinct /absolute/candidate/instinct \
"$PWD/bench/signal-fixtures.json" /absolute/new-report-directory
```
The report directory must not exist. The process verifies frozen fixture hashes, banks the same 80 authored lessons in isolated homes, asks the same 120 queries of both binaries in alternating order, checks all returned IDs, derives metrics from per-query predictions, and writes `report.json` plus metric-only rows. Binary hashes are checked before and after scoring. It preserves scratch banks for audit; no user bank or config is opened intentionally.
## Decision rule
- **REJECT, exit 1:** any previously correct first result is lost; any query gains a wrong extra lesson; a previously silent negative starts delivering; or overall recall/precision regresses.
- **IMPROVED, exit 0:** the no-regression rules hold and correct first results increase or wrong deliveries decrease.
- **NO_REGRESSION, exit 0:** metrics hold, without claiming improvement.
- **ERROR, exit 2:** corrupt/missing fixtures, failed or timed-out CLI, changed binary, unknown returned IDs, malformed output, or inconsistent arithmetic. Errors are never scored as silence/success.
Top-k is fixed at five, so a correct first answer cannot hide wrong additional suggestions. Positive and negative controls are mandatory. Signal is a correct returned lesson; noise is each incorrect returned lesson. Precision and recall are explicit. A zero denominator gives JSON null, not an infinite improvement claim. Counts and per-query invariants are asserted, not accepted from a generator's booleans.
`signal-gate --self-test` exercises ten scorer controls, including deliberate wrong extras, false deliveries, lost answers, duplicate predictions and changed labels. CLI controls also verify existing report directories remain untouched and failed executables produce ERROR rather than a green report.
## Automatic execution
The candidate workflow compiles the runner and executes self-tests. For pull requests it builds the exact PR base in a separate worktree, compares it with the candidate, and makes a rejected/error result fail the existing verification job. Metric reports are retained as CI artifacts even on failure. Once the manifest exists on the base, the job refuses changes to it; fixture replacement is a separately reviewed protocol change, not a way to tune the gate green.
This wiring is local until the workflow change is reviewed and merged. It does not publish, merge, or activate production behavior.
## First local run
120 queries: 80 positive, 40 negative. Baseline and candidate each had 47 correct first results, 16 wrong lesson deliveries, one negative query with a delivery, and 63 total delivered lessons. Precision was 47/63 (74.6%); signal/noise was 47/16 (2.94). Verdict: **NO_REGRESSION**, not improvement. Ten scorer controls passed. These are authored retrieval cases, not a fresh unseen test or proof of downstream agent answer-use, general intelligence, or real-world utility.
The process keeps a change from quietly worsening known behavior. Removing existing noise requires a separate candidate that passes this gate and an independently frozen confirmation set.