feat(shell): auto-provision docker-git scripts inside generated containers#177
Merged
skulidropek merged 3 commits intoProverCoderAI:mainfrom Mar 23, 2026
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#176
…iners Embeds docker-git scripts (session-backup, pre-commit/pre-push guards, knowledge splitter) into generated Docker images at /opt/docker-git/scripts/ so git hooks and docker-git modules work inside containers. Changes: - Dockerfile template: COPY scripts/ into /opt/docker-git/scripts/ - Entrypoint: symlink scripts into workspace after clone - Pre-push hook: resolve backup script from embedded or repo-local path - Shell: copy workspace scripts into project build context on create/update - Core: define dockerGitScriptNames constant for script inventory - Gitignore: exclude provisioned scripts/ from project state tracking Fixes ProverCoderAI#176 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit f711dae.
Contributor
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
🤖 Models used:
📎 Log file uploaded as Gist (2294KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Contributor
Author
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
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
Fixes #176
Automatically embeds docker-git scripts (session-backup, pre-commit/pre-push guards, knowledge splitter) inside generated Docker containers so that:
scripts/session-backup-gist.jswork correctly inside containerssetup-pre-commit-hook.js,pre-commit-secret-guard.sh,pre-push-knowledge-guard.js, andsplit-knowledge-large-files.jsare available for repos cloned inside containersChanges
packages/lib/src/core/templates/dockerfile.ts: AddedCOPY scripts/ /opt/docker-git/scripts/layer to embed scripts in Docker imagepackages/lib/src/core/templates-entrypoint/tasks.ts: After successful clone, symlink/opt/docker-git/scripts→$TARGET_DIR/scriptsso relative paths in hooks resolvepackages/lib/src/core/templates-entrypoint/git.ts: Pre-push hook resolvessession-backup-gist.jsfrom embedded/opt/docker-git/scripts/first, with fallback to repo-localscripts/packages/lib/src/shell/files.ts: AddedprovisionDockerGitScripts()— copies scripts from workspace into project build context on create/updatepackages/lib/src/core/docker-git-scripts.ts: New module definingdockerGitScriptNames— inventory of scripts to embedpackages/lib/src/core/templates.ts: Addedscripts/to.gitignoretemplate (provisioned scripts are derived, not source)Математические гарантии
Инварианты:
∀ script ∈ dockerGitScriptNames: accessible(/opt/docker-git/scripts/{script})∀ repo ∈ cloned_repos: ¬∃(repo/scripts) → symlink(repo/scripts, /opt/docker-git/scripts)∀ hook ∈ git_hooks: referenced_script(hook) → resolvable(hook)Предусловия:
∃ scripts/ directory in docker-git workspacedocker build context contains scripts/ (provisioned by writeProjectFiles)Постусловия:
∀ container: /opt/docker-git/scripts/ exists ∧ contains all listed scripts∀ cloned_repo: scripts/ symlink → hooks function correctlyСложность:
O(|dockerGitScriptNames|)— one COPY per scriptO(1)— single symlink operation after cloneVerification
pnpm -C packages/lib typecheckpassespnpm -C packages/lib buildpassespnpm -C packages/lib testpassespnpm -C packages/lib lint:effectpassespnpm -C packages/app typecheckpassesTest plan
scripts/directory appears in project build context/opt/docker-git/scripts/exists with all scriptsscripts/symlink is created🤖 Generated with Claude Code