Commit Graph

4 Commits

Author SHA1 Message Date
Matt Landers e70b412191 Store resolved source_message_ids instead of full batch ID list 2026-07-29 15:37:04 -04:00
Matt Landers 5bce6b951a fix: persist deriver batch message IDs for source index resolution 2026-07-28 15:38:22 -04:00
Ubuntu 11b3603ab1 feat: add source_indices to deriver output for evidence entailment
Each explicit observation now carries source_indices — 0-based indices
into the <messages> block pointing to the messages that directly support
the conclusion. Messages in the prompt are prefixed with [N] indices.

This enables the action-based judge's evidence entailment criterion to
slice the conversation to just the supporting messages instead of using
the full conversation as evidence context (degraded mode).

No text duplication — the LLM outputs indices (cheap, low-error), and
the judge looks up the real message text from the trace input.
2026-07-28 14:35:22 -04:00
Vineeth Voruganti 09a980c2fb
Sanitization and Memory Bug Fixes (#419)
* fix: use WeakValueDictionary for _observation_locks to prevent memory leak

* fix: harden input sanitization across API surface (DEV-1400)

- Parameterize SQL in set_config calls to prevent injection via request context
- Strip NUL bytes from string inputs (message content, queries, peer cards)
- Add JSONB metadata validation (100 key limit, 5 depth limit)
- Add filter recursion depth limit (max 5) to prevent stack overflow
- Update changelogs with unreleased entries

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

* fix: Refactor Schemas into separate files

* fix: Code Rabbit Comments

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 15:01:52 -04:00