Skip to content

test(evals): measure an extraction classifier for tainted sessions' outgoing calls (#3434) - #4071

Merged
schlessera merged 5 commits into
mainfrom
spike/3434-extraction-classifier
Nov 16, 2026
Merged

schlessera merged 5 commits into
mainfrom
spike/3434-extraction-classifier

Conversation

@schlessera

@schlessera schlessera commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #3434

What changed

This delivers the #3434 spike. It adds a harness that scores a tainted session's outgoing calls for likely data extraction, and a labelled set of 86 Odysseus calls over the keyless fixture corpus. It records the authorized live Jev run, and adds a plan document, docs/plans/extraction-classifier.md. The plan holds:

  • the request schema the classifier sees and the seven deterministic signals;
  • how a verdict combines with the host's own policy;
  • the measured tables, the recommendation and the evasions the card must still catch.

Nothing in the admission path changes.

Held-out sessions: 13 extraction and 33 benign calls. "Realistic" is the held-out benign working session of 22 calls.

Configuration Leaked Extraction recall Benign cards Realistic cards
Shipped #3430 behaviour 4 0.69 19 10
Fingerprint overlap alone 6 0.54 3 2
Heuristics 1 0.92 11 7
Heuristics plus Jev 1 0.92 3 2

Why this shape

  • What allow may relax. The classifier's allow may relax only the ui-sdk: a tainted session's new destination is refused silently instead of asking the user #3430 tainted-destination card; ask and block can escalate anything. Deny, allowlist mode, budgets and outward rules stand. Voice and autonomous turns keep refusing a tainted destination whatever the verdict (decide, evals/3434-extraction-classifier/classify.ts:29-36).
  • Outward actions ask instead of blocking. Strong overlap on an outward action (gist, issue, mail) asks, with the overlap as evidence. That action already has its own card, and the user's own writes legitimately quote their notes (the calendar case).
  • What Jev sees. It gets only the outgoing request, the taint source's name and the overlap score, and only in the ambiguous band. No answer, an unexpected answering model or a sub-floor answer asks.
  • Test tier. The tests live in the experiment tier because every assertion is about the harness (experiment-tier decision). That tier runs offline at the release gate, not in per-PR CI, which is how the issue's keyless-tests-in-CI verification is met here.
  • One revision of the signals. The signal definitions were revised once after a first offline pass, for three harness defects: re-counted trickle matches, /-joined path segments read as base64, and fan-out firing on ordinary repeat use. No case changed. Thresholds and the floor are calibrated on tuning sessions only.
  • No milestone on the new tasks. They are not committed to a release, and turning them on by default is not yet ruled.

Proof

bun run test experiments/3434-extraction-classifier.test.ts: 17 pass.

Failing first. decide initially let an allow band relax a voice or autonomous taint refusal. I tightened the test voice and autonomous turns refuse wherever an interactive turn would ask first, and it failed with Expected: "refuse", Received: "admit". The guard in decide made it pass.

Mutations, each restored afterwards; all 17 pass again:

  • Allow relaxes an outward card (policy === "outward_ask" only when there is no band): allow relaxes only the tainted-destination card… fails with Expected: "ask", Received: "admit". The recorded offline-table test also fails.
  • Overlap not incremental (matched = known(stream)): a trickle counts on the call that completes a phrase… fails with Expected: 0, Received: 12.
  • Unanswered judge allows: no answer, or one below the floor, asks fails with Expected: "ask", Received: "allow". The judge-boundary test fails too.
  • A benign answer ignores the floor: no answer, or one below the floor, asks fails. So does recorded live run: replaying every repetition's Jev answers reproduces the plan's row, because the beacon is admitted and tuning leaks.
  • Calibration reads held-out rows: calibration reads tuning rows only… fails on the threshold equality.
  • Answering model not checked: sends only the judge state and the pinned model… fails, because a jev-1.14.0 answer is accepted.

Typecheck (bun run typecheck, run with NODE_OPTIONS=--max-old-space-size=8192 because the default heap runs out of memory on this host) and bun run lint pass.

bun run check:pr --base origin/main
{"version":1,"kind":"brain-check-pr-receipt","head":"f1205940585df4918c2a4861a30a4cd2cef14b3b","base":"origin/main","mode":"focused","startedAt":"2026-11-16T13:32:03.757Z","finishedAt":"2026-11-16T13:33:28.989Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12429.00819},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":126.90709799999968},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":108.48320499999863},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":20.77647700000125},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":72527.698556}]}

Collisions: no path collisions (31 closure-only reports), recorded in a comment with the head; rechecked for this head below.

Checklist

Anything left open

The implementation and the band requalification are #4088, #4089 and #4090. Turning either setting on by default needs a maintainer ruling.

🤖 Generated with Claude Code

schlessera and others added 3 commits November 15, 2026 22:08
)

Adds the #3434 measurement harness: the request schema the classifier
scores, seven deterministic signals scored alone and combined, the
policy combination that lets an allow relax only the #3430 card, the
Jev middle-band judge with its spend ledger, and a labelled set of 86
Odysseus calls over the fixture corpus, with adversarial cases per
heuristic. Keyless experiment-tier tests use a deterministic judge stub.

The plan records the schema, signals and the offline heuristics table:
fingerprint overlap alone reaches 0.54 held-out extraction recall, so
the early-stop condition is not met and the live Jev leg is required.

Refs #3434

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #3434

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #3434

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 15, 2026
@schlessera schlessera added type: spike Time-boxed investigation. The deliverable is a written decision, not code. area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. labels Nov 15, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Collision check at head 3f7b7c2598ea2fb151e2b4445ff802c6c6c5ee3f (bun scripts/collisions.ts --json --pr 4071, graph built at that head): no path collisions. 31 closure reports, all with empty paths: shared hosted categories/workspaces only, with #3054, #3056, #3059, #3069, #3581, #3622, #4002, #4018, #4034–#4038, #4040–#4042, #4046, #4050, #4052, #4053, #4055–#4058, #4060, #4062, #4064, #4065, #4067, #4068 and #4070. This PR adds new files under evals/, experiments/ and docs/plans/, and one row in docs/plans/README.md.

…dation (#3434)

jev-1.13.0 answered all 52 ambiguous-band requests for $0.00152, p50
155 ms and p95 194 ms, with identical answers across three repetitions.
On held-out it cuts benign cards from 11 to 3 of 33 with no added leak,
but no held-out extraction call reached its band, and it labelled the
one tuning beacon benign below the 0.9 floor.

The plan now recommends heuristics first, then Jev for the band, each
off by default until the band is requalified, and links the
implementation tasks #4088, #4089 and #4090 under #3428. A replay test
pins the recorded run's table.

Closes #3434

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Collision check at head f1205940585df4918c2a4861a30a4cd2cef14b3b (bun scripts/collisions.ts --json --pr 4071, graph built at that head): no path collisions. 17 closure reports, all with empty paths (shared hosted categories/workspaces only), with #3054, #3056, #3059, #3069, #3581, #3622, #4002, #4036, #4060, #4068, #4070, #4072, #4073, #4074, #4075, #4080, #4084. This head adds only evals/3434-extraction-classifier/results-2026-11-16.json and edits to this PR's own new files plus its docs/plans/README.md row.

@schlessera
schlessera marked this pull request as ready for review November 16, 2026 15:26
@schlessera
schlessera merged commit 80e5d37 into main Nov 16, 2026
24 of 25 checks passed
@github-actions

Copy link
Copy Markdown

This PR's squash 80e5d372f96eaece849d0fdfac95f5a84925845c landed on main while main was red at 05bf0d6a02fb12fd1ead402b8a7638031ddcbeec (incident #4098) without being a declared fix. Merge blocking while red is cooperative; this report is the detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. area: ui-server Hono app factory: turn coordinator, auth, session catalog, routes, cron. type: spike Time-boxed investigation. The deliverable is a written decision, not code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spike: classify a tainted session's outgoing calls for likely data extraction, with heuristics first and JEV for the ambiguous band

1 participant