Open
Conversation
… types When an agent's type is not registered (e.g., created remotely by someone with a plugin we don't have), we cannot determine the expected process name for lifecycle state detection. Previously this resulted in REPLACED, which is misleading since the agent may actually be running correctly -- we just don't know what process to look for. The new RUNNING_UNKNOWN_AGENT_TYPE state distinguishes this case from true replacement. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The determine_lifecycle_state() call in ModalProviderInstance._build_single_agent_details() did not pass the new is_agent_type_known parameter, so modal-hosted agents with unrecognized types would still show as REPLACED instead of RUNNING_UNKNOWN_AGENT_TYPE. Fix: Import check_agent_type_known and pass the result to determine_lifecycle_state(), matching the pattern already used in base_agent.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lution Problem: The parent_type resolution logic was duplicated verbatim between resolve_expected_process_name and check_agent_type_known in hosts/common.py. Fix: Extracted a shared _resolve_effective_agent_type helper function that both functions now call, eliminating the duplication. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: check_agent_type_known in libs/mngr/imbue/mngr/hosts/common.py was decorated with @pure, but it calls is_agent_class_registered which reads from _agent_class_registry, a global mutable dictionary. This violates the @pure contract that a function "returns the same output for the same inputs." Fix: Removed the @pure decorator and added a comment explaining why it is not marked pure. The decorator is advisory-only so this has no behavioral impact. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: test_check_agent_type_known_for_registered_type and test_check_agent_type_known_for_custom_type_with_registered_parent call register_agent_class() without resetting the global registry afterwards, leaking state to subsequent tests. Fix: Wrap both tests in try/finally blocks that call reset_agent_class_registry(), matching the established pattern used in agent_config_registry_test.py and mngr_claude_mind/plugin_test.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…coverage Problem: The new check_agent_type_known call in _build_single_agent_details added 2 uncovered lines, pushing mngr_modal coverage from 75.01% to 74.99%, below the 75% threshold. Fix: Added unit tests for _build_single_agent_details that exercise the lifecycle state determination and the missing-id early return paths, restoring coverage to 76.05%. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Automated PR created by Claude Code session.