fix: make GIT_AUTOCOMMIT work in the Docker image - #26
Open
thecodacus wants to merge 2 commits into
Open
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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 #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).