Repository navigation
fix: make GIT_AUTOCOMMIT work in the Docker image - #26
Conversation
The image shipped no git binary, so GIT_AUTOCOMMIT=true silently committed nothing while mutations kept reporting success — and git history is the only undo for a memory that dreams autonomously. - Dockerfile: install git, set a system-level committer identity and safe.directory for bind-mounted bundles (the three stacked failures from the report, covered at the image layer) - KnowledgeBase.ensureGitReady(): startup readiness check — friendly error when the binary is missing (simple-git reports installed:false rather than throwing), auto-init of non-repo bundles with an --allow-empty first commit (also proves committer identity works, independent of staging quirks), and an early rev-parse to surface ownership problems before the first mutation - server + stdio entry points fail loudly at startup instead of discovering the problem commit by commit - 2 new tests (60 total)
Fresh containers and CI runners have no git identity, so the init commit failed there. When user.email doesn't resolve, set a repo-local understory identity — same as the image does at system scope. Verified with GIT_CONFIG_GLOBAL/SYSTEM nulled.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Confirmed on the published image. Our deployment (Unraid, Workaround we used: built a derived image ( |
Closes #21
@REASON-labs's diagnosis was exactly right, all three layers of it — no binary, no identity, dubious ownership — each silently masked by the best-effort catch while the README promised history. Their point about why it matters lands hardest: git history is the only undo for a memory that supersedes contradictions in place and dreams autonomously.
Image layer (their suggested fix, applied):
apk add gitplus system-level committer identity andsafe.directoryin the runtime stage.Loudness layer (the startup check they suggested considering):
ensureGitReady()runs at startup on both entry points whenGIT_AUTOCOMMIT=true—git initwith an--allow-emptyfirst commit (which doubles as a committer-identity probe)rev-parseinstead of on the first mutationThe per-mutation catch stays as a backstop for transient failures, but hard misconfiguration is now impossible to miss.
Verified live both ways: a stripped-PATH server exits with the friendly message; with git present it inits, logs
git autocommit: enabled, andgit logshows the init commit plus one commit per mutation. 2 new tests (60 total).