Skip to content

fix(hindsight): surface retain timeouts clearly - #59842

Open
ai-ag2026 wants to merge 2 commits into
NousResearch:mainfrom
ai-ag2026:upstream/pr-a3-hindsight
Open

fix(hindsight): surface retain timeouts clearly#59842
ai-ag2026 wants to merge 2 commits into
NousResearch:mainfrom
ai-ag2026:upstream/pr-a3-hindsight

Conversation

@ai-ag2026

Copy link
Copy Markdown
Contributor

Make Hindsight memory-provider retain timeouts explicit instead of failing silently, so a slow/unreachable retain surfaces a clear signal rather than a swallowed error.

Testing

pytest tests/plugins/memory/test_hindsight_provider.py → 117 passed, on current main.

(cherry picked from commit 38de0dc12571529d87b8905c57a0ba2ce4c9226c)
(cherry picked from commit fabc245c382da529ad6deab5786dfee2a75a414e)
@alt-glitch alt-glitch added type/bug Something isn't working tool/memory Memory tool and memory providers comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have labels Jul 6, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing an actual visibility gap. On current main, _run_sync propagates the blank-message timeout from future.result() (plugins/memory/hindsight/__init__.py:274-281), and hindsight_retain exposes str(e) directly (plugins/memory/hindsight/__init__.py:1725-1727).

Problems

  • The added production call uses operation_name="hindsight client operation" (plugins/memory/hindsight/__init__.py:1157), so retain calls do not produce the retain-specific wording used by the new test. The test supplies "hindsight retain" directly to the private bridge instead (tests/plugins/memory/test_hindsight_provider.py, added test in PR commit 61aa2ad3ce62).
  • The regression test does not exercise the public retain-tool response or the queued auto-retain path, whose failures are logged by the writer (plugins/memory/hindsight/__init__.py:1124-1126).

Suggested changes

  • Thread a retain-specific operation name through _run_hindsight_operation from each aretain_batch caller.
  • Assert the actual hindsight_retain JSON error contains the timeout and duration; cover queued retain logging if that path is in scope.

This is an automated hermes-sweeper review.

Comment thread plugins/memory/hindsight/__init__.py
@teknium1 teknium1 added sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@ai-ag2026

Copy link
Copy Markdown
Contributor Author

@teknium1 Current head 5f0deff0a0c4a97477377b056c8e1bc71f658a5a addresses the timeout-label blocker across all retain paths with public-path regression coverage. Full CI is green (23 successful checks); ready for re-review.

@teknium1 teknium1 added the area/memory Memory subsystem: store, providers, sync, background reviews label Jul 19, 2026
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

Two PRs address the Issue's timeout-visibility cause, while #57612 also bundles separate compression and environment-snapshot hardening. #59842 carries the Hindsight fix further than #57612 by propagating retain-specific operation names through public retain, auto-retain, and flush-on-switch paths, with public-path regression coverage.

Related pull requests

Duplicates

#57612 and #59842 overlap on the core Hindsight timeout-handling change, but they are not fully identical: #59842 adds retain-specific operation-name propagation through public retain, auto-retain, and flush-on-switch paths. The Hindsight portion of closed #57612 can therefore be treated as superseded by #59842; its compression and environment portions are separate slices.

Suggested consolidation

Keep #59842 open with a salvage path: request re-review from the contributor who posted the COMMENTED keep_open review, explicitly confirming the visible diff's public retain, auto-retain, and flush-on-switch coverage. Keep #57612's existing consolidation closure in place rather than issuing a new close action; this follows the discussion's maintained-destination evidence despite the earlier automated keep_open verdict, and its overlapping Hindsight slice can be considered superseded by #59842.

Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 27 kB of PR diffs, 2 kB of issue/PR text, 3 kB of discussion (3 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/memory Memory subsystem: store, providers, sync, background reviews comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants