Repository navigation
fix(dispatch): resolve the Mind checkout before the session bootstrap - #550
Merged
Merged
Conversation
ensure_session_environment called resolve_mind, which is defined in agents/_common.sh and never sourced by bin/pyauto-brain. In every remote session each verb printed "resolve_mind: command not found" and silently skipped PyAutoMind/scripts/session_bootstrap.sh, leaving sessions below the Python floor. Source the helpers in a subshell so the dispatcher namespace stays clean; an unresolvable Mind still skips the bootstrap as before. Adds a regression test that runs the dispatcher with CLAUDE_CODE_REMOTE=true against a stub Mind bootstrap (fails before this change, passes after). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8QAki1rcqoS951ubcu
With the dispatcher fix the Mind's session bootstrap really runs in remote sessions, and it registers a .claude/ hook under a declared PYAUTO_ROOT. Tests that point PYAUTO_ROOT at a tmp fixture then had the fixture rewritten under them (e.g. test_refs_resolves_dot_directory_references saw an extra `.claude` sibling and reported `.claude/skills` dead). An autouse fixture sets PYAUTO_SKIP_BOOTSTRAP=1; test_session_bootstrap_dispatch removes it explicitly to exercise the bootstrap against a stub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8QAki1rcqoS951ubcu
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
ensure_session_environmentinbin/pyauto-braincalledresolve_mind, which is defined inagents/_common.sh— a file the dispatcher never sources (introduced in c37ac41). In every remote session (CLAUDE_CODE_REMOTE=true) each verb printedresolve_mind: command not foundand silently skippedPyAutoMind/scripts/session_bootstrap.sh, leaving sessions on the container's Python 3.11 (below the organism floor).Found during a
/healthdashboard review:pyauto-brain health --scope dashboard --jsonemitted the error on stderr.Change
agents/_common.shin a subshell and callresolve_mindthere, so the shared helpers stay out of the dispatcher namespace. An unresolvable Mind still skips the bootstrap, as before.tests/test_session_bootstrap_dispatch.py: runs the dispatcher withCLAUDE_CODE_REMOTE=trueagainst a stub Mind bootstrap; asserts the bootstrap ran, nocommand not found, and thatPYAUTO_SKIP_BOOTSTRAPis honoured.Verification
test_session_bootstrap_dispatch,test_health_conductor,test_grouped_organ_consumers,test_conductor_discovery: 49 passed.Generated by Claude Code