Surface unsubstituted placeholders during init#61
Closed
adamw wants to merge 1 commit into
Closed
Conversation
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>
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.
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_placeholderstripwire that runs at the end ofdevcontainer()so any leftover token aborts init with a clear error instead of silently shipping a broken devcontainer. Also strip__pycache__/*.pycartefacts after copying templates so stale bytecode can't shadow the addon sources on the bind mount.