Repository navigation
Description
Context
Spike #3434 measured a host-side classifier for a tainted session's outgoing calls (design, signals and tables: docs/plans/extraction-classifier.md; harness evals/3434-extraction-classifier/, both from #4071). On its held-out Odysseus sessions, the shipped #3430 behaviour admits 4 of 13 extraction calls (all to hosts already contacted) and asks on 19 of 33 benign calls. The deterministic heuristics alone admit 1 and ask on 11. On the realistic benign session they ask on 7 of 22 calls instead of 10. They cost tens of microseconds per call and send nothing anywhere.
Where it hooks in, verified at main 3b104890f:
- The tainted-destination card:
const narrowing(packages/ui-sdk/src/server/egress-proxy.ts:280) andconst approveTainted(packages/ui-server/src/brain/turn-egress.ts:168), with its copy intaintedDestinationDescription(packages/ui-server/src/brain/turn-egress.ts:39). - Admission, where full inputs are held:
enforcementHookFor(packages/ui-backend-claude/src/permission-hooks.ts:289) andprepareOutwardPlan(packages/ui-sdk/src/server/outward-policy.ts:47). - Ingestion, where read files and taint content are seen:
inputTaintSource(packages/ui-server/src/activity/ingestion-taint.ts:96), consumed infor(const signal(packages/ui-server/src/governance/safety-collector.ts:107).
Part of #3428. Adjacent: #3595 (once/origin/session approval scopes) and #3596 (individual taint review).
Scope
- Host-side session state for a tainted session: four-word shingle hashes of every brain file read, the hosts the tainting content named (extracted at ingestion; the content itself is not kept for this), the contacted hosts and each site's earlier payloads in the session. Internal storage only.
- The request schema and the seven signals as the plan defines them: fingerprint overlap (decoded and stream-scored, plus named brain paths), taint host, encoded blob, volume, write-shaped destination, fan-out and method/tool class.
- The heuristic tiers and their combination with policy as the plan's
decidedoes it:- An
allowrelaxes only the ui-sdk: a tainted session's new destination is refused silently instead of asking the user #3430 card, and only for the hosts a readable call names while that call is in progress. Opaque calls withhold it. askadds the card to any call.blockrefuses the call, and the reason is the only verdict text, given in that call's own tool result.- Strong overlap on an outward action asks, with the overlap as evidence, rather than blocking.
- An
- The card and the refusal name the classifier's reason, such as "contains text from
health/checkup-log.md" or "matches a link from the content that tainted this session". - A governance policy setting that turns the classifier on. It is off by default.
Out of scope
- Jev or any other provider-backed judge for the ambiguous band; that is the follow-up task blocked by this one. Here the ambiguous band asks.
- Enabling the classifier by default. That needs a maintainer ruling on this issue after the tracked qualification.
- Changing
deny,allowlistmode, budgets, outward-action rules or what taints a session. - Wire-level HTTPS inspection, and shell-argument taint detection (ui-server: an ordinary shell command taints a governed session even when the egress proxy records real connections #3429's ruling).
Acceptance criteria
- With the setting on, in a tainted interactive session, a WebFetch to a new host with no signal is admitted without the ui-sdk: a tainted session's new destination is refused silently instead of asking the user #3430 card. The same call with the setting off still raises the card. The test fails before the change.
- A call that posts the text of a brain file read in the session to a new host is refused. The tool result names the cause, and no
egress_connectionis recorded for it. - A call to an already-contacted host that carries a strong overlap, or a taint host plus volume or encoded text, raises the card. Today it is admitted silently.
- Deny,
allowlistmode, budgets and outward-action cards are unchanged whatever the band, includingallow. Voice and autonomous turns still refuse every tainted new destination, and refuse wherever an interactive turn would ask. - An opaque call (a script file,
python -c) never receives theallowrelaxation for connections it opens. - No classifier state, verdict or evidence enters the provider-facing conversation except the refusal text in that call's own tool result. The keyless provider-history guard passes.
- The keyless Spike: classify a tainted session's outgoing calls for likely data extraction, with heuristics first and JEV for the ambiguous band #3434 labelled set, run through the production classifier, reproduces the plan's heuristics row: held-out 1 leak and 11 benign cards; realistic 7 of 22. A ranking change is a reviewed diff.
- Mutation receipts in the PR: letting
allowrelax an outward card, and dropping the opaque-call withhold, each fail a named test.
Verification
ui-server and ui-sdk unit tests at the lowest shared request method, a turn-egress test through the real proxy for the admit, ask and refuse paths, the provider-history guard, and the fixture regression above.
Contract impact
The policy setting is an additive schema change, documented with a CONTRACT: commit and a changeset. If the card or refusal gains a field, rather than only new description text, that field is additive too and documented in the same commit.
Activity
test(evals): record the live Jev extraction-band run and the recommen…
schlessera commentedon Nov 16, 2026
Claimed for implementation. Claim token:
claim-ad73b1d9. Branch:feat/4088-extraction-heuristics.Builds on #4071 (spike/3434-extraction-classifier, unmerged). Path collision: #4002 touches packages/ui-server/src/activity/ingestion-taint.ts; others are closure-only.
test(evals): measure an extraction classifier for tainted sessions' o…
CONTRACT: feat(ui-server,common): judge a tainted session's outgoing …
schlessera commentedon Nov 16, 2026
Merged in #4095 as
a7169cb19through the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.