Open
Conversation
When creating a new mind, after cloning the repo: 1. Record the parent branch and commit hash 2. Checkout a new branch named minds/<mind_name> 3. Write a .parent file (git config format) tracking the parent URL, branch, and commit hash 4. Commit the .parent file Add a "mind update <agent-name>" CLI command that: A) Stops the mind (mng stop) B) Fetches and merges the latest code from the parent repository C) Updates all vendored git subtrees (git subtree pull) D) Starts the mind back up (mng start) Also makes run_git and ensure_git_identity public in vendor_mng.py so they can be reused by parent_tracking.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… helper - Use GitUrl, GitBranch, and new GitCommitHash primitives in ParentInfo instead of bare str fields (style guide compliance) - Create MindAgentRecord FrozenModel for find_mind_agent return type instead of raw dict[str, object] - Extract shared make_git_repo helper to forwarding_server conftest.py to eliminate duplication between parent_tracking_test and vendor_mng_test - Find agents by name (--include 'name == "..."') instead of by label - Deduplicate run_mng_stop/run_mng_start into _run_mng_command helper - Remove unused _MNG_COMMAND_TIMEOUT_SECONDS constant - Add logger.trace for swallowed JSONDecodeError in _parse_agents_from_output - Fix pull_subtree docstring reference to private function Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rename _parse_agents_from_output to parse_agents_from_mng_output (public) and have testing.py's parse_mng_list_json delegate to it, eliminating the duplicate JSON parsing logic - Move make_git_repo from forwarding_server/conftest.py to testing.py per project convention (conftest.py is for fixtures, testing.py is for explicitly imported helper functions) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix test function names: test_parse_* (was missing underscore after test) - Move parse_agents_from_mng_output to config/data_types.py (shared module) so neither testing.py nor cli/update.py depends on the other Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The docstring referenced cli.update but the function was moved to config.data_types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move parse_agents_from_mng_output tests from cli/update_test.py to config/data_types_test.py (where the function lives) - Remove now-empty cli/update_test.py - Restore CLAUDE_CODE_MAX_OUTPUT_TOKENS env var in .claude/settings.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add GitOperationError base class with ParentTrackingError subclass; VendorError now inherits from GitOperationError - Add error_class parameter to run_git so callers can specify the appropriate error type (defaults to VendorError for compatibility) - parent_tracking.py now raises ParentTrackingError instead of VendorError - Use AgentName and GitUrl domain types in setup_mind_branch_and_parent and checkout_mind_branch signatures - Extract parse_mind_agent_record as a testable function - Add unit tests for MindAgentRecord and parse_mind_agent_record - Restore CLAUDE_CODE_MAX_OUTPUT_TOKENS env var in .claude/settings.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ParentTrackingError inherits from GitOperationError (not VendorError), so the except block needs to catch GitOperationError to handle failures from both vendor operations and parent tracking operations. 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.