Skip to content

ADFA-5270 | Adopt shared secret store, fix terminal-tool dedup, and cover MCP flows - #80

Open
jatezzz wants to merge 1 commit into
mainfrom
refactor/ADFA-5270-adopt-shared-secret-store
Open

ADFA-5270 | Adopt shared secret store, fix terminal-tool dedup, and cover MCP flows#80
jatezzz wants to merge 1 commit into
mainfrom
refactor/ADFA-5270-adopt-shared-secret-store

Conversation

@jatezzz

@jatezzz jatezzz commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

This PR addresses duplicated cryptography logic, fixes an agent loop bug, and improves test coverage:

  • Cryptography Centralization: Delegates AES/GCM encryption for ai-agent-mcp, ai-agent-gemini, and ai-agent-openai to the host's KeystoreSecretStore. The duplicate AndroidKeyStore references have been removed, and plugin.min_ide_version is bumped to 26.35. Each plugin retains its existing distinct alias so previously stored credentials migrate seamlessly.
  • Tool Deduplication: Replaces the hardcoded it.name == RESPOND_TOOL check in ChatViewModel with the isTerminalToolName helper, ensuring backend variations like "Respond" are properly filtered out and the duplicate-turn check matches correctly.
  • MCP Coverage & KDoc: Adds JVM test coverage for MCP session keep-alive across calls (McpSessionLifecycleTest), McpServerStore preferences lock, and McpPlugin scope cancellation. Corrects the McpServerStore.hasHeaders KDoc to accurately reflect its boolean return type.

Details

  • All AI plugins build successfully against the refreshed libs/.
  • JVM test suites pass, providing safe, host-independent validation of MCP connection logic and thread-safe preference locks.
Screen_Recording_20260825_162828_Code.on.the.Go.mp4

Ticket

ADFA-5270
Parent: ADFA-5255

Observation

By eliminating the redundant AES/GCM implementations, we prevent further code drift between the three AI plugins. The deduplication fix will prevent agents from getting stuck in terminal tool loops.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@jatezzz
jatezzz force-pushed the refactor/ADFA-5270-adopt-shared-secret-store branch from e572fe4 to 04bc7bf Compare August 31, 2026 15:03
Also switches ChatViewModel's terminal-tool dedup to isTerminalToolName and adds JVM coverage for MCP keep-alive, the McpServerStore lock and McpPlugin scope cancellation.
@jatezzz
jatezzz force-pushed the refactor/ADFA-5270-adopt-shared-secret-store branch from 04bc7bf to af606a7 Compare August 31, 2026 18:40
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