Repository navigation
fix(qa): prove newer session facts outrank competing durable memory - #119496
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 2:14 AM ET / 06:14 UTC. ClawSweeper reviewWhat this changesThe PR makes session-memory ranking QA require a persisted, unfiltered memory search whose newer session fact ranks above a conflicting durable-memory fact. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain Current main still permits this QA scenario to pass after an answer-bearing, sessions-only mock search. The PR fixes that QA gap at the right boundary and resolves the previous result-window finding, but needs inspectable after-fix Gateway scenario proof before merge. Priority: P2 Review scores
Verification
How this fits togetherQA Lab drives an agent through a gateway scenario against mock or live providers, then evaluates the observable outcome. This change reads persisted gateway history after the run to ensure memory search inputs and ranked results actually support the answer. flowchart LR
Fixture[Session and durable fixtures] --> Agent[QA agent run]
Agent --> Search[Memory search]
Search --> History[Persisted gateway history]
History --> Ranking[Rank and source checks]
Ranking --> Verdict[Scenario pass or failure]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +469, Other +68. Total +536 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the provider-independent gateway-history assertions and attach a redacted scenario verdict or runtime transcript demonstrating the real post-fix search, competing facts, and ordered result. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main's mock request is answer-bearing and sessions-only while the scenario enables both sources, so it cannot establish the claimed ranking competition. Is this the best way to solve the issue? Yes. Recording and checking the correlated gateway tool call and result at the QA-flow boundary is stronger and more provider-independent than the prior mock debug-request inference. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 77f7560b4184. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(qa): prove newer session facts outrank competing durable memory This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
…penclaw#119496) * fix(qa): prove session memory outranks stale durable facts * fix(qa): require the canonical memory search result window * fix(qa): honor the optional canonical memory search limit
What Problem This Solves
Fixes an issue where session-memory ranking QA could report success without executing a memory search, without searching durable memory, or even when the older durable fact outranked the current session fact. The old mock request also leaked the answer into the query and excluded durable notes with a sessions-only corpus.
Why This Change Was Made
Require a successful persisted
memory_searchand inspect provider-independent Gateway history for an ID-correlated, unfiltered, answer-free search result containing both competing facts. Use a realistically older daily note, the existing canonical six-result default, and compare the relative ranks of the actual conflicting facts while ignoring unrelated current-turn or workspace hits. Remove the old mock-only debug inference; no production memory ranking, indexing, persistence, or configuration changes.User Impact
The same QA scenario now verifies real session-versus-durable memory ranking in both mock and live provider lanes and cannot pass on a fabricated final answer.
Evidence
maxResults: 6.session-memory-rankingscenario passes with an actual recent dated durable note, a newer session fact, and both facts in the same persisted search result.Inspectable after-fix Gateway evidence
A real private-QA Gateway, real memory search/indexing, and the actual HTTP mock provider produced:
The persisted successful call searched both configured memory sources, contained the newer session fact and older dated durable fact in the same result, and ranked the newer fact first among conflicting facts. The canonical optional
maxResultsargument accepts an omitted six-result default or explicit6; both mock/live regressions reject explicit3. The focused owner-adjacent proof passed 32 tests. No provider secrets or response credentials are present in this output.