fix(org-import): use ws.FilesDir as persona-dir lookup + docker-cli-buildx in dev image #134
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/org-import-persona-env-files-dir"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the persona-env injection silent-no-op + unblocks dev-image local-build mode.
org_import.go change
loadPersonaEnvFile(ws.Role, envVars)→loadPersonaEnvFile(ws.FilesDir, envVars).In the dev-tree org.yaml shape,
role:carries multi-line descriptive prompt text andfiles_dir:carries the persona-dir slug (core-lead,dev-lead, ...).isSafeRoleNamesilently rejected the multi-word role text, so every imported workspace booted with zeroworkspace_secretsrows — no ANTHROPIC/CLAUDE_CODE/MINIMAX auth in the container env, claude_agent_sdk wedged onquery.initialize()60s timeout.After fix: /org/import on dev tree gives 8 secrets per workspace (Gitea identity + provider creds), 5 of 6 leads boot online.
Dockerfile.dev change
Added
docker-clianddocker-cli-buildxso the platform binary can shell out to/var/run/docker.sockfor local-build mode. Pre-fix, every claude-code/tier-2 workspace POST fail-fasted withexec: "docker": executable file not foundthen withBuildKit is enabled but buildx component is missingafter I added docker-cli only. Both packages now in the dev image.Stage A — verified
Imported dev-only template (27 personas). All 27 receive 8 workspace_secrets each. Lead workspaces (claude-code OAuth) boot online. Non-lead minimax workspaces still wedge — caused by a separate workspace-template-claude-code repo bug (filed separately).
Stage B — N/A
Local-dev-only path. Production tenants use
Dockerfile.tenant, untouched.Refs
feedback_per_agent_gitea_identity_defaultwork)## org_import.go — persona env injection root-cause fix The Phase-3 fix from earlier today (`feedback/per-agent-gitea-identity-default`) introduced loadPersonaEnvFile to inject persona-specific creds into workspace_secrets on /org/import. It passed `ws.Role` as the persona-dir lookup key, but in our dev-tree org.yaml shape `role:` carries the multi-line descriptive text the agent reads from its prompt ("Engineering planning and team coordination — leads Core Platform, Controlplane, ..."), while `files_dir:` holds the short slug (`core-lead`, `dev-lead`, etc.) matching `~/.molecule-ai/personas/<files_dir>/env`. isSafeRoleName silently rejected the multi-word role text → no persona env loaded → every imported workspace booted with zero workspace_secrets rows → no ANTHROPIC / CLAUDE_CODE / MINIMAX auth in the container env → claude_agent_sdk wedged on `query.initialize()` with a 60s control-request timeout. After the fix, /org/import on the dev tree (27 personas) populates 8 workspace_secrets per workspace (Gitea identity + MODEL/MODEL_PROVIDER + provider-specific token), 5 of 6 leads boot online, and the remaining wedges trace to a separate runtime-template-repo bug (workspace-template-claude-code's claude_sdk_executor.py doesn't dispatch on MODEL_PROVIDER=minimax — filed separately). ## Dockerfile.dev — docker-cli + docker-cli-buildx Without these, every claude-code/tier-2 workspace POST fails-fast: - docker-cli alone produces `exec: "docker": executable file not found` - docker-cli alone (no buildx) fails on `docker build` with `ERROR: BuildKit is enabled but the buildx component is missing or broken` Both packages are now installed in the dev image; verified with `docker exec molecule-core-platform-1 docker buildx version`. ## Stage A verified Local /org/import dev-only path: 27 workspaces created, all 27 receive persona env injection (8 secrets each — Gitea identity + provider creds). Lead workspaces (claude-code-OAuth tier) boot online. ## Stage B — N/A Local-dev-only path (docker-compose.dev.yml + dev image). Tenant EC2 provisioning uses Dockerfile.tenant (untouched). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>