Skip to content

feat: expose exact bounded evidence windows - #781

Merged
wesm merged 2 commits into
kenn-io:mainfrom
salmonumbrella:feat/exact-evidence-windows
Oct 4, 2026
Merged

wesm merged 2 commits into
kenn-io:mainfrom
salmonumbrella:feat/exact-evidence-windows

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Applications can resolve a saved citation to the same extracted text through Vault.ReadEvidenceWindow or POST /api/v1/evidence/windows. Each read requires the vault, node, content version and hash, rendition attachment, build, and rendition hash. A stale, hidden, or mismatched reference returns 404 evidence_unavailable without text. Reads never start processing or substitute a newer rendition.

Offsets count Unicode scalars. Windows default to 8,000 characters and accept up to 16,000. Requests are limited to 16 KiB; the character and identity limits keep JSON responses below 128 KiB. The HTTP route uses typed Huma input and output with Cache-Control: no-store. Schema violations return 422, while strict decoding and shared-reader reference failures return 400. Unavailable physical storage uses the existing 503 codes: content_missing, store_fenced, and store_unavailable.

Both window routes share the active-rendition checks in one catalog snapshot. The existing /renditions/windows request fields and defaults remain intact; it now also requires a nonempty source blob hash. Embedded reads hold the vault lease through the internal read and cleanup, releasing it before returning the text.

Closes #780

@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (ea55aa9)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m22s

@wesm
wesm force-pushed the feat/exact-evidence-windows branch from ea55aa9 to 7dc50d2 Compare October 4, 2026 18:25
@wesm
wesm changed the base branch from safe-extraction-diagnostics to main October 4, 2026 18:25
@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (7dc50d2)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 3m44s

Exact evidence reads need the same rendition checks as other readers.
Share those checks within the caller's catalog snapshot so they cannot
drift when rendition validation changes.

Use Huma's typed request and response handling and the existing storage
error codes. Schema violations now follow the standard 422 response;
strict decoding and shared-reader reference errors retain 400 responses.
Remove the unrelated loadfile rewrite from the feature diff.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@roborev-ci

roborev-ci Bot commented Oct 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (bc54b65)

Verdict: No findings at or above medium severity.


Reviewers: 2x codex, codex (security) | Synthesis: codex | Total: 2m27s

@wesm
wesm merged commit 1eda468 into kenn-io:main Oct 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Expose exact bounded text reads for retained citations

2 participants