Skip to content

Fix config repo resolution on slave nodes#48

Merged
jonathonbyrdziak merged 1 commit intomasterfrom
fix/config-repo-slave-resolution
Mar 20, 2026
Merged

Fix config repo resolution on slave nodes#48
jonathonbyrdziak merged 1 commit intomasterfrom
fix/config-repo-slave-resolution

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

  • Config::repo() now auto-detects slave context via NodeConfig::findByActiveDir(), computing the correct config folder name from the node's repo_dir instead of the active release directory
  • Bridge symlink created in ProtocolStart Stage 2 so relative symlinks from release dirs resolve correctly on both host and inside Docker containers
  • LockableTrait::lock() visibility fixed to protected so GitSlave/ConfigSlave subclasses can call it

Test plan

  • Run protocol start on a slave node — verify no "cannot change to main-config" error
  • Verify config repo clones to ~/ghostagent-config/ not ~/ghostagent-releases/main-config/
  • Verify bridge symlink exists at ~/ghostagent-releases/ghostagent-config
  • Verify config:link creates working symlinks inside the release directory
  • Verify docker compose up can mount the config repo via bridge symlink
  • Verify git:slave and config:slave don't error on lock() call
  • Run on a dev/local node — verify no behavior change

🤖 Generated with Claude Code

Four fixes for production/slave node operation:

1. LockableTrait::lock() is private in this Symfony version —
   alias it as protected so GitSlave/ConfigSlave subclasses can call it

2. Config::repo() now auto-detects slave context via
   NodeConfig::findByActiveDir() and resolves the config folder name
   from the node's repo_dir instead of the active release directory

3. ProtocolStart Stage 2 creates a bridge symlink inside the releases
   directory (e.g., releases/ghostagent-config → ../ghostagent-config)
   so relative symlinks and docker volume mounts work from both host
   and container without modifying ConfigLink or docker-compose.yml

4. Config clone in Stage 2 now uses the resolved Config::repo() path
   instead of computing its own basename (which was wrong on slaves)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit b5a145e into master Mar 20, 2026
6 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the fix/config-repo-slave-resolution branch March 20, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant