# Runtime Convergence Detectors

**Owner:** frame-divergence-gate (E8). **Scope:** five mid-run signals, trip thresholds, trip-on-first-signal doctrine. Gate stages and divergence math in their own references. Zero overlap.

## Framework anchor and WEAK-ANALOG label

Gama et al. (2014), *A Survey on Concept Drift Adaptation*, ACM CSUR 46(4): canonical toolkit -- ADWIN (adaptive sliding windows), Page-Hinkley (CUSUM on deviation), DDM (error-rate inflation).

**Label:** designed for ML-distribution drift, not epistemic-frame drift. Adaptation is structural, not empirically validated here. Outputs labeled **"drift indicator," NOT "frame-capture proof"** -- mandatory on every runtime_log entry and every abort message.

Philosophical hook: Quine's indeterminacy of translation -- as Evaluator ingests RAM output, its working manual can drift toward RAM without Evaluator noticing.

## The five signals

### Signal 1 -- Lexical convergence

Running Jaccard (or cosine) similarity between Evaluator's active vocabulary in the last window and RAM's transcript vocabulary in the same window. Feed the similarity sequence into Page-Hinkley.

**Trip:** PH statistic exceeds `lambda` with `delta = 0.005, lambda = 50` as the Gama 2014 default.

### Signal 2 -- Inference-rule mirroring

Count of Evaluator justifications in the last `N = 10` turns that are structurally isomorphic to a RAM justification seen earlier in the audit. "Structural isomorphism" means same premise schema and same inference-rule class.

**Trip:** count >= 3 in the last N turns.

### Signal 3 -- Prior-shift

KL divergence between Evaluator's running prior on the answer space and its pre-run prior recorded at gate-decision time. A shrinking KL toward RAM's prior indicates Evaluator is being pulled toward RAM.

**Trip:** KL drops below `prior_shift_kl_threshold` (default: 30% of pre-run KL magnitude).

### Signal 4 -- Frame-term leakage

Unique RAM frame-terms appearing in Evaluator output without scare-quotes, without explicit rejection, and without a neutral-language restatement. Frame-terms are the RAM lexicon tokens NOT on Evaluator's loaded lexicon.

**Trip:** count >= `frame_term_leakage_count_threshold` (default: 3 unique tokens).

### Signal 5 -- Error-rate shift (DDM-analog)

Evaluator's objection rate (objections raised per audit turn) vs the `error_rate_baseline` supplied by Audit Method Engine before the run. A sustained drop in objection rate is a DDM-style indicator of capture.

**Trip:** objection rate drops below baseline by >= 2 sigma, sustained across two consecutive windows.

## ADWIN wrapper

ADWIN (adaptive sliding windows) wraps signals 1, 3, and 5 to set the window length adaptively. The window grows when the signal is stable and shrinks when a change is detected, reducing false-positive rate on stable stretches.

## Trip-on-first-signal doctrine

If **any one** of the five signals trips, abort immediately. Never wait for a second signal. Never "wait and see." Never raise the threshold. Never smooth the signal. Silent capture is the failure mode this detector exists to prevent; "wait and see" is ceremony.

## Logging rules

Append every observation to `runtime_log.observations` with `{timestamp_utc, detector, signal_value, triggered_abort}`. On `triggered_abort = true`, set `runtime_log.aborted = true`, record `abort_reason = <detector>`, and emit the abort signal to E2 and E7.

## Recalibration note

Defaults are the Gama 2014 adaptation baseline. If Phase 9 shows high false-positive rate, recalibrate window lengths first, then per-signal thresholds. Never change trip-on-first-signal.
