# v3.19.0 — memory hygiene + scoring integrity

## Scoring integrity (the headline)

A 60× auto-capture scoring inversion is fixed at all three roots:

- **Prospective-trigger injection bypass** — 319 garbage keyword triggers harvested from raw tool dumps are deactivated; trigger matching is now word-boundary aware, the taxonomy drops low-signal terms and is capped, and injected triggers are flagged `injected:true`.
- **WRRF de-bias** — the hot and recency pools exclude `post_tool_capture` rows. Mechanical freshness is not importance.
- **Metamemory confidence** — `rate_memory` feedback now wires into rank as a Kraaij-2002 document prior, so useful/not-useful votes actually move results.

## Memory hygiene

- Oversized auto-captures store a deterministic **gist + content-addressed artifact pointer** (`GIST_BUDGET` = measured p90 curated-memory length). The full output is one `Read` away — no truncation. Same gate applies on backfill and import.

## Concurrency governors

- Upstream MCP connection pool is bounded (LRU-evict idle / fail-fast), with the per-server cap regression-tested.
- Constant-memory pipeline closed: automatised-pipeline cross-loop waits are bounded (a wedged subprocess can no longer hang a worker forever), per-query AST accumulators are generators, and `/api/quadtree` streams Arrow record-batches through gzip (constant RAM at any node count).

## Visualization

- `cortex-visualize`: the **Graph galaxy tab is restored** alongside the live Trace view (the build kick, snapshot readiness, and phase loader had all been dead since 3.18.0 — readiness now validates the CXGB header, not file size). Auto-loads through L5; AST symbols load on demand; the HUD shows true in-galaxy memory counts.

## Safety

- **pytest refuses destructive isolation against any populated non-test database** — after the 2026-06-10 incident where 537k production rows were lost to `CI=true` + a production `DATABASE_URL`.

## Benchmarks

Regression-free: LongMemEval R@10 98.4% / MRR 0.916; LoCoMo MRR 0.828; BEAM A/B delta 0.001.

---

Rolls up the **3.18.1–3.18.4** line: progressive graph build (bounded memory, keyset streaming, hash-gated migrations — no more OOM or connection storms on large stores), git-diff + AST symbols for any file type, a self-healing automatised-pipeline MCP bridge, the cross-lens Wiki documentation graph, AP-typed impact panels, and CodeQL path-injection hardening. Full history: <https://github.com/cdeust/Cortex/releases>.
