[ahma_mcp/http_bridge/tui] Orphan-stdio prevention, bridge client-response routing, daemon/TUI tool routing#263
Merged
Merged
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.
Summary
A multi-area reliability/correctness pass ("fixup2") covering MCP process lifecycle, HTTP-bridge request routing, daemon/TUI tool routing, and the
simplifyanalyzer. New behavior is codified in SPEC.md (R-LIFECYCLE.2, R10.6–R10.8, R-SETUP.1/2).Frontend orphan prevention — orphaned
ahma serve stdiostorm (SPEC R-LIFECYCLE.2)ahma_mcp/src/utils/parent_watchdog.rs: the IDE-facing stdio frontend pollsgetppid()andexit(0)s within a few seconds when reparented (parent IDE hard-killed without closing stdin).initializewithinFRONTEND_HANDSHAKE_DEADLINE_SECS(default 30, test-overridable), the spawned-and-abandoned frontend exits. Disarmed once the first message is forwarded, so live-but-idle sessions are never killed.HTTP bridge: client response → request mapping (SPEC R10.6)
roots/list,sampling/createMessage). A clientresultonly triggers roots-parsing / sandbox-lock when its ID matches an outstandingroots/list. Keepalive-ping and sampling responses no longer spuriously parse roots or emit invalid-roots warnings.ahma_http_bridge/tests/client_response_routing_test.rs.Daemon & TUI chat MCP base-URL resolution (SPEC R10.7, R10.8)
McpChatConfig.base_urlto the local MCP bridge endpoint (not the LLM provider URL), so local tool calls (e.g.read_file) route back to the bridge.McpChatConfigfor proper tool routing / sampling. Includes a substantialahma_tui/src/llm_bridge.rssimplification.Setup/timeouts documentation (SPEC R-SETUP.1/2)
Misc
simplifyanalyzer: newanalysis/conversion.rs, lizard/model tweaks.Cargo.lock/Cargo.toml),deny.toml, install-script touch-ups.Verification (local, macOS)
cargo fmt --all --check— cleancargo clippy --all-targets— cleancargo nextest run— 2612/2616 pass, 2 skipped, 4 failingThe 4 failures are pre-existing, environment-induced, and unrelated to this branch — all are macOS Seatbelt sandbox-enforcement tests that require an OS sandbox the local shell cannot apply (nested/unavailable sandbox-exec):
progress_token_http_integration_test::{test_http_progress_token_is_echoed…, test_http_no_progress_token…}— confirmed failing identically onmain(bridge can't start under sandbox-exec → health timeout).sandbox_security_red_team_test::red_team_command_write_escape_blockedandsandbox_roots_handshake_test::test_working_directory_outside_sandbox_rejected— fail because Seatbelt isn't enforced here, so an out-of-scope write is not OS-blocked. These pass on CI runners where the sandbox is active (Landlock/Seatbelt).No source files involved in these tests were changed by this branch.
🤖 Generated with Claude Code