Skip to content

Data classes at every model boundary: no P2/DP30 to Jev or the task model (#13) - #16

Merged
gadzbi123 merged 1 commit into
mainfrom
data-classes-jev-gate
Oct 3, 2026
Merged

gadzbi123 merged 1 commit into
mainfrom
data-classes-jev-gate

Conversation

@gadzbi123

Copy link
Copy Markdown
Contributor

Closes #13.

What

  • classification in policy/policy.yaml: public < internal < P2 < DP30, a class per tool, and a class on restricted barrier terms (Falcon = DP30).
  • Every message gets its class from a trusted source (the tool the gateway let through, or a restricted term), never from its own content. Masking identifiers never lowers it.
  • Content above max_to_model (P2), or a model's own max_class, is withheld with the neutral barrier message. Search results that mix classes keep the lower items.
  • Jev is an external destination: injection.jev.max_class: internal, never above max_to_model. P2 that the model may see but Jev may not cannot be injection-checked, so the request is blocked, whatever on_error says.
  • Fails closed: an unknown tool, a result relabelled as another tool, or a missing section or limit is blocked; a misspelt class keeps the last good policy. The whole history is re-classified on every request, so a lowered limit applies immediately.
  • A message is skipped by Jev only after Jev has passed it, so replayed blocked prompts and replays after an outage stay blocked (review findings P46/P47).
  • Denials and audit entries name classes and limits only, never the withheld content; /metrics counts them with their latency.

Demo impact (strict defaults, agreed)

  • Marcus (Falcon deal team) can no longer send the deal to any model.
  • Olivia's onboarding stops at the client file (P2). Raising injection.jev.max_class to P2 live restores the per-field quarantine flow.

Tests

tests/test_classification.py (23 tests): synthetic business facts with nothing a regex can find; asserts on what reached the model, Jev (including real JevJudge HTTP payloads through a mocked 429 retry) and the audit log. With the gate removed, 21 of 23 fail. Existing onboarding and demo-judge tests updated to the new behaviour. Full suite: all committed tests pass.

Known limit

For history the gateway never saw, a tool result's class falls back to the tool name the agent claims (decisions.md D6).

🤖 Generated with Claude Code

…odel (#13)

policy.yaml gets `classification` (public < internal < P2 < DP30, class per tool,
restricted terms with a class). Content above max_to_model / a model's max_class is
withheld with the neutral barrier message; content above injection.jev.max_class
(default internal) cannot be injection-checked, so its request is blocked. Classes come
from the source, never the content; masking does not lower them; missing classes or
limits fail closed; the whole history is re-classified on every request.

Messages are skipped by Jev only once it has passed them, so replayed blocked prompts
stay blocked. tests/test_classification.py checks what reached the model, Jev (incl. real
HTTP payloads and retries) and the audit log.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gadzbi123
gadzbi123 merged commit 1e79fed into main Oct 3, 2026
1 check passed
@gadzbi123
gadzbi123 deleted the data-classes-jev-gate branch October 3, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M] Prevent sensitive P2/DP30 input from reaching Jev

1 participant