[codex] fix Hindsight local_external health and API memory cleanup - #24353
Closed
foras910521-lab wants to merge 2 commits into
Closed
[codex] fix Hindsight local_external health and API memory cleanup#24353foras910521-lab wants to merge 2 commits into
foras910521-lab wants to merge 2 commits into
Conversation
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.
What does this PR do?
Narrows the local stability work from #24337 into two low-overlap fixes:
local_externalavailability verify the configured local HTTP endpoint instead of treating config presence as healthy.finallypath.Root cause
local_externalHindsight mode could report available from configuration alone while the local API endpoint was down or unreachable. Separately, API server run handling could leave the agent memory provider open after request handling completed.Changes made
plugins/memory/hindsight/__init__.py: probe/healthand fall back to/versionforlocal_externalavailability.tests/plugins/memory/test_hindsight_provider.py: cover reachable, unreachable, and fallback local endpoint behavior.gateway/platforms/api_server.py: close memory provider after run handling in afinallyblock.tests/gateway/test_api_server.pyandtests/gateway/test_api_server_runs.py: cover provider cleanup.Upstream overlap check
This intentionally excludes Feishu websocket lifecycle, launchd
--replace, and retryable gateway startup changes from #24337. It appears complementary to #22586: that PR checkshindsight_clientimportability, while this PR checks whether the configured local Hindsight HTTP endpoint is actually reachable.Validation
venv/bin/python -m ruff check .scripts/run_tests.sh tests/plugins/memory/test_hindsight_provider.py tests/gateway/test_api_server.py tests/gateway/test_api_server_runs.pyResult:
261 passed.Notes
No system networking, Wi-Fi, DNS, proxy services, launchd service definitions, or third-party proxy app configuration are changed by this PR.