fix(acp): forward resolved credential pool - #70293
Conversation
|
Cross-link for maintainers: we hit the same ACP missing- Your PR (#70293) is the clean minimal fix for pool handoff — thanks for landing that path. We also opened #70465 with the same handoff plus 403-shaped OAuth recovery (xAI often returns |
|
Thanks for the focused ACP handoff fix. Current The one-line change matches the runtime contract in This is an automated hermes-sweeper review. |
|
Merged via #77029. Your credential_pool forwarding fix was cherry-picked with authorship preserved. |
What does this PR do?
ACP resolved complete provider runtime state but dropped the selected
credential_poolwhen constructingAIAgent. Long-lived OpenAI Codex ACP sessions therefore could not use Hermes' existing in-process OAuth 401 refresh/rotation path and required an ACP restart after token expiry.This forwards the already resolved, provider-scoped pool into ACP-created agents. It keeps authentication ownership in Hermes core, preserves existing account/provider guards, and requires no VS Code extension-side token handling or routine ACP replacement.
Related Issue
Fixes #70292
Related to #70097 / #70111, but distinct: those address refresh/adoption once a credential pool is attached; this fixes ACP omitting the pool entirely.
Type of Change
Changes Made
acp_adapter/session.py: forwardruntime["credential_pool"]into ACP-createdAIAgentinstances.tests/acp/test_session.py: extend the ACP construction regression to assert that resolved credential pools are retained.How to Test
openai-codexOAuth and start a long-livedhermes acpprocess.Automated/local verification:
A real patched ACP JSON-RPC smoke request returned exactly
ACP_POOL_OKin the same ACP PID; the temporary session was deleted. A live runtime invariant check also confirmed that the selected pool entry matches the agent API key and that the pool provider matches the agent provider.Full-suite baseline comparison:
scripts/run_tests.shrun reported 28 failures in 17 files outside the changed ACP/Codex scope.c4f5a45dreproduced the same 28 failures.acp_adapter/session.py,tests/acp/,tests/acp_adapter/, or the Codex-response recovery suite.Checklist
Code
AGENTS.md.scripts/run_tests.shCI-parity wrapper.Documentation & Housekeeping
cli-config.yaml.example: N/A; no config keys changed.CONTRIBUTING.md/AGENTS.md: N/A; no architecture or workflow change.Screenshots / Logs