Conversation
The hindsight memory plugin decides update_mode='append' capability by
version number only (_MIN_VERSION_FOR_UPDATE_MODE_APPEND = 0.5.0). A
server at >=0.5.0 with features.store_document_text=false still rejects
appends ("update_mode='append' is not supported when document text
storage is disabled"), so every retain fails and last_memory_write_at
goes permanently stale.
Probe /version once per process, parse features.store_document_text, and
treat store_document_text=false as "no append support": fall back to the
per-process unique document_id without update_mode, restoring the
feature-aware behavior that predated the version-only gate.
Tests: update capability mocks to the new probe and add a regression
test covering a >=0.5.0 server with store_document_text=false.
Contributor
Duplicate of #84819. Both patches address append retains against text-storage-disabled Hindsight configuration; #84819 is the broader canonical implementation because it resolves the effective per-bank policy and safely fails closed when it cannot be determined. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Hindsight memory plugin gates
update_mode='append'on version number only (_MIN_VERSION_FOR_UPDATE_MODE_APPEND = 0.5.0). A server at >=0.5.0 that has document text storage disabled (features.store_document_text=false) still rejects appends:Result: every retain fails,
last_memory_write_atgoes permanently stale, and the bank accumulates failed retain/batch_retain operations — with only a "Prefetch: server retain visibility timed out" WARNING on the agent side (no ERROR), so the outage is easy to miss.Root cause
_check_api_supports_update_mode_append()probes/versionand reads only the version string, ignoring thefeatures.store_document_textfield the server already reports. The plugin used to be feature-aware (falling back to per-processdocument_idwithoutupdate_mode); the version-only gate regressed that behavior.Fix
/versiononce per process via new_fetch_hindsight_api_meta(), parsing both version andfeatures.features.store_document_text=falseas no append support: fall back to the per-process uniquedocument_idwith noupdate_mode, matching the legacy-server path.Tests
_fetch_hindsight_api_meta).store_document_text=falsemust fall back to per-process doc_id withoutupdate_mode.Verified live against a Hindsight 0.9.0 server with
store_document_text=false: probe now returns "append not supported" and retain falls back correctly. 108 hindsight-related tests pass.