Skip to content

Surface unsubstituted placeholders during init#61

Closed
adamw wants to merge 1 commit into
masterfrom
fix/init-placeholder-substitution-issue-59
Closed

Surface unsubstituted placeholders during init#61
adamw wants to merge 1 commit into
masterfrom
fix/init-placeholder-substitution-issue-59

Conversation

@adamw
Copy link
Copy Markdown
Member

@adamw adamw commented May 8, 2026

Closes #59: After sandcat init, generated files (compose-proxy.yml, app-user-init.sh) sometimes contained unreplaced __AGENT_*__ / __MITM_*__ placeholder tokens. Compose then mounted the literal ./scripts/__AGENT_MITM_ADDON__ path, creating empty stray directories and leaving the proxy with garbage flags.

Make the substitution helpers fail when their target file is missing, and add a verify_no_placeholders tripwire that runs at the end of devcontainer() so any leftover token aborts init with a clear error instead of silently shipping a broken devcontainer. Also strip __pycache__ / *.pyc artefacts after copying templates so stale bytecode can't shadow the addon sources on the bind mount.

Issue #59: After `sandcat init`, generated files (`compose-proxy.yml`,
`app-user-init.sh`) sometimes contained unreplaced `__AGENT_*__` /
`__MITM_*__` placeholder tokens. Compose then mounted the literal
`./scripts/__AGENT_MITM_ADDON__` path, creating empty stray
directories and leaving the proxy with garbage flags.

Make the substitution helpers fail when their target file is
missing, and add a `verify_no_placeholders` tripwire that runs at
the end of `devcontainer()` so any leftover token aborts init with
a clear error instead of silently shipping a broken devcontainer.
Also strip `__pycache__` / `*.pyc` artefacts after copying templates
so stale bytecode can't shadow the addon sources on the bind mount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adamw adamw closed this May 8, 2026
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.

New version has problem with placeholders

1 participant