Skip to content

feat(memory): Add on-demand review memory with saved judgments - #538

Draft
gricha wants to merge 2 commits into
mainfrom
codex/on-demand-review-memory
Draft

gricha wants to merge 2 commits into
mainfrom
codex/on-demand-review-memory

Conversation

@gricha

@gricha gricha commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Let Warden choose when repository history would help an investigation. Discovery and verification share find_memories, which returns relevant historical notes with their saved judgments and evidence, and update_memory for evidence-backed corrections. SDK, CLI and Action entrypoints no longer fetch or inject notes before analysis.

Save verifier judgments in the same repository memory store, including the original concern, written rationale, revision, supporting evidence and observed commit. Judgments remain immutable; a verifier can explicitly supersede a retrieved provisional note at its matching version while retaining history. Corrections cannot overwrite administrative or passively extracted notes. Retrieval uses the production full-text, embedding and relevance pipeline, and searches are charged to the run that requested them.

Three additive migrations store revisions, structured judgments and grouped recall accounting. The local runner uses the production HTTP app and Postgres/pgvector, with regression coverage for retrieval, version conflicts, supersession and repository isolation. Historical verdicts remain evidence about the observed code, not proof that later revisions are safe.

The completed Sentry corpus comparison validated 18 shards and 468 exact chunks, with Grok 4.5 high and Luna high verification/consolidation across all arms:

Arm Final corpus-label matches Accounted cost, including memory
Empty memory 41/86 ≥$32.29
Warm replay 43/86 $19.03
Memory disabled 38/86 $28.41

Warm replay cost 33.0% less than the control and gained nine labels while losing four. Quality remains mixed: a saved rejection influenced warm's dismissal of 031; apparent gain 033 repeated unsupported impact reasoning; 006 was emitted by control but lost during extraction. Conflicting provisional notes can remain active after a saved rejection. Six consolidation calls exhausted the unchanged token cap and left duplicates; passive extraction used the observed Gateway fallback after OpenAI schema rejection. All failed-call charges are included; one inspected embedding charge remains unknown in the empty-memory arm only.

This is one identical-code sample per arm, including within-pass reuse and memory overhead. It cannot quantify run variance, isolate caching/provider effects, demonstrate production-scale retrieval, or establish safety after code changes. Inference used frozen 72617e6; the later boundary fixes at cbb70df passed local checks but were not rerun through inference. CI evals remain blocked before inference by the existing missing WARDEN_ANTHROPIC_API_KEY secret. The PR stays draft.

Let discovery and verification search repository history when useful and
receive supporting evidence with each selected note. Remove automatic
recall and prompt injection from SDK, CLI and Action entrypoints.

Preserve immutable verifier judgments and versioned provisional notes in
the production store. Link explicitly superseded note versions without
retiring unrelated concerns, and group search usage with its review run.

Add a local production HTTP/Postgres/pgvector runner and regression tests
for retrieval, corrections, lifecycle history and tenant isolation.

Co-Authored-By: GPT-6 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
warden-prod Ready Ready Preview Sep 28, 2026 9:17pm UTC

Request Review

Comment thread packages/warden/src/sdk/verify.ts Resolved
Restrict ingest corrections to provisional review guidance so admin and passive
memories keep their content and supporting evidence. Ignore malformed optional
supersession links without discarding a valid reject or revise verdict.

Validate the source-inclusive note budget before saving and return feedback to
shorten oversized notes without silently truncating evidence. Cover these
boundaries through the public tools and the local HTTP/Postgres stack.

Co-Authored-By: GPT-6 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – warden-prod — cbb70df8 Deployed Sep 28, 2026 by vercel[bot]
Preview – warden — cbb70df8 Deployed Sep 28, 2026 by vercel[bot]
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.

1 participant