fix(shell): run autoSyncState before docker compose up (#158)#165
Merged
skulidropek merged 1 commit intomainfrom Mar 18, 2026
Merged
fix(shell): run autoSyncState before docker compose up (#158)#165skulidropek merged 1 commit intomainfrom
skulidropek merged 1 commit intomainfrom
Conversation
…unt inode invalidation - Moves autoSyncState() call before runDockerUpIfNeeded() in runCreateProject - Prevents git reset --hard from recreating .orch/auth/codex while Docker bind-mount is active - Adds test verifying ∀p: stateSyncProbeIndex(p) < dockerComposeUpIndex(p) Fixes #158 Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
autoSyncState()beforerunDockerUpIfNeeded()inrunCreateProject(create-project.ts)create-project-state-sync-order.test.tswith 1 new testProblem
codexfails to start inside Docker containers with "Error loading configuration: No such file or directory (os error 2)":docker compose upstarts with bind-mount:.orch/auth/codex→/home/dev/.codexautoSyncState()runs after Docker is up — callsgit reset --hardon the hostgit reset --harddeletes and recreates.orch/auth/codex→ new inode/home/dev/.codexis empty →codexcannot findconfig.tomlFix
Reorder: sync state first, then start Docker — ensures
.orch/auth/codexinode is stable whendocker compose upmounts it.Invariant:
∀p: synced(p) ∧ stable_inode(.orch/auth/codex, p) → valid_mount(docker_up(p))Test plan
create-project-state-sync-order.test.tsverifies∀p: stateSyncProbeIndex(p) < dockerComposeUpIndex(p)— git rev-parse (autoSyncState probe) appears beforedocker compose upin recorded command sequenceCloses #158
🤖 Generated with Claude Code