Skip to content

fix(episodes): summary memory retrieval was refused on its third search; admit each search and record why context falls back - #25379

Merged
Git-on-my-level merged 3 commits into
BasedHardware:mainfrom
Git-on-my-level:lane/q12-retrieval-fix
Nov 15, 2026
Merged

Git-on-my-level merged 3 commits into
BasedHardware:mainfrom
Git-on-my-level:lane/q12-retrieval-fix

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Problem and behavior

Episode summaries discard all profile and memory context when the second search starts after one second or the third search starts at all. Independent single-attempt searches incorrectly share the list reader's one-second/two-attempt retry-admission state. Production class-only logs and a real-SDK regression reproduce MemoryReadAdmissionDenied.

Give each single-attempt logical search independent admission under the original overall context deadline. Preserve the shared process allowance, circuit, no-retry policy, and eight-second context bound. Add one class-only fallback log with stage budget, embedding, vector, or hydrate; never log provider messages or account/content identifiers.

Failure-Class: new

New class: FC-independent-searches-share-retry-admission; reusable regression drives real MemoryService, HTTPX and Pinecone 7.3.0 objects, including name-based host discovery and isolated async transport. Only HTTP responses, owner routing storage, and BYOK lookup are synthetic.

Tuning disclosure: single-attempt admission now uses the caller's remaining context budget instead of the list retry window. No overall budget, process allowance, retry count, model, or production setting changes. Existing EPISODE_COMPOSER_CONTEXT_ENABLED=false is the rollback lever; no new flags. All touched product Python files remain below the 1500-line ratchet; no Line-Count-Exception is required.

Validation measured 2026-11-15T08:14:36Z: affected 15-file backend suite green; required real-clock and gateway scans 38 passed; cross-service deploy contract 33 passed, 3 skipped; canonical bash backend/scripts/typecheck.sh zero errors. Additional owner-summary retrieval coverage passed 16 tests. The installed pre-push hook passed all 40 shared checks, canonical typecheck and 10 tests in its bounded backend unit phase.

Runtime evidence: carrier 51b449ec serves 100% of backend traffic and predates default-context merge #25368, so zero default-context logs is absence of deployed code, not successful collection. No production account content was read. Tier ro-prod only.

Delivery: local lane commit only. No push, PR, merge, deploy, or production mutation. The integration lead owns publication and serving verification.

Product invariants affected

  • INV-MEM-1: retain MemoryService's canonical-first authority, hydration and account scoping; the fix changes operation admission only.
  • INV-MEM-4: preserve canonical lineage collapse, quality rejection and projection authority; no intake, promotion, mutation or external write is added.

Additional owner-summary retrieval suite: 16 passed. Product invariant citations were validated by the installed hook, with no skip flags or guard changes.

Final validation 2026-11-15T08:21:51Z: full installed pre-push hook passed (40 shared checks, canonical typecheck, 10 bounded unit tests). Local head 3e9c6a434ec3a0e0ae1a8fb8d2a9be248ee1be0c. Detailed evidence is in q12-u-retrieval-fix.md; no public CI or deployment is claimed.

Author model: GPT-6.1 Sol; integrated by Claude Fable 5.2.

🤖 Generated with Claude Code

View guided diff

Git-on-my-level and others added 3 commits November 15, 2026 15:14
Failure-Class: FC-independent-searches-share-retry-admission

Keep distinct single-attempt searches within the composer deadline without consuming list retry admission. Record only failure stage and exception class, and cover the locked HTTPX/Pinecone path.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Review found that marking a failure's stage assumed every exception accepts attributes; one
that rejects them raised AttributeError in its place and hid the original from the read
circuit. Marking is now best-effort, with a regression test.

Failure-Class: none

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit b78ea01 into BasedHardware:main Nov 15, 2026
53 checks passed
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