feat(multi-machine): instar join --dir targets a chosen home (§1.3 fix)#661
Open
JKHeadley wants to merge 1 commit into
Open
feat(multi-machine): instar join --dir targets a chosen home (§1.3 fix)#661JKHeadley wants to merge 1 commit into
JKHeadley wants to merge 1 commit into
Conversation
The git-URL branch of joinMesh forced the clone target to <cwd>/<repo-name> and ignored --dir, so a join could never land in a caller-chosen home — blocking an orchestrator (the Track-E test-as-self harness) from joining a mesh into a specific throwaway home. Extract the decision into a pure, unit-tested resolveJoinDir(); honor --dir for git URLs while preserving the historical default when absent (non-breaking). Add -d/--dir to the join CLI. Spec: MULTI-MACHINE-BOOTSTRAP-ROBUSTNESS-SPEC §1.3 (approved 2026-05-27). Tests: tests/unit/joinDir.test.ts (12) — both sides of the boundary; tsc clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 1, 2026
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.
What
instar joincan now join a mesh into a directory you choose (-d/--dir). The git-URL branch ofjoinMeshforced the clone target to<cwd>/<repo-name>and ignored--direntirely — so a join could never land in a caller-chosen home. That's the directory-targeting half of the §1.3 init→join confusion flagged inMULTI-MACHINE-BOOTSTRAP-ROBUSTNESS-SPEC(approved 2026-05-27), and it blocks any orchestrator (the Track-Etest-as-selftwo-machine harness) from joining a mesh into a specific throwaway home.Fix
Extracted the directory-targeting decision into a pure, exported
resolveJoinDir(repoUrl, options)in a new tiny modulesrc/commands/joinDir.ts(so the decision is unit-testable withoutmachine.ts's heavy import graph):--dir→ resolved--dir(NEW)--dir→<cwd>/<repo-name>(historical default, UNCHANGED)--dir→ resolved--dir--dir→process.cwd()(UNCHANGED)joinMeshnow calls it;-d, --diradded to thejoinCLI command. Non-breaking: every no---dirpath is byte-identical to the prior behavior.Tests
tests/unit/joinDir.test.ts(12) — both sides of the decision boundary (git/SSH/tunnel ×--dir/no---dir, relative-dir → absolute,isGitCloneUrldiscrimination). Each no---dirbranch asserted unchanged.tsc --noEmitclean; full pre-commit + pre-push ship-gate green.Scope
Foundational, independently-useful fix. The Track-E two-machine
test-as-selfharness (--join-mesh/--code/--teardownjoin-mode) that consumesinstar join --diris the next PR. No config/schema/migration — picked up by existing agents on the normal dist update.Opened for review (not auto-merged): it executes an approved spec but changes a core mesh-join command, so a human merge is appropriate.
🤖 Generated with Claude Code