fix(server): give create-content's commitFile a stable git identity - #436
Merged
Conversation
create_page/create_post/createTyped shell out to plain `git commit` with no GIT_AUTHOR_*/GIT_COMMITTER_* env. `git commit`'s own auto-detect fallback needs a passwd/GECOS entry to synthesize an identity; the Apple Containerization guest has none, so every commit there silently failed and commitFile swallowed it into `commit: null` (file written, commit dropped, no error surfaced). edit-history.mjs and undo-edit.mjs already solved this for their commit-tree calls by passing ANGLESITE_COMMIT_IDENTITY (#428). Apply the same fix here. Co-Authored-By: Claude Sonnet 5 <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.
Summary
create_page/create_post/createTyped(viacommitFileinserver/create-content.mjs) shelled out to plaingit commitwith noGIT_AUTHOR_*/GIT_COMMITTER_*env configured.git commit's auto-detect identity fallback needs a passwd/GECOS entry to synthesize a name/email; the Apple Containerization guest used byAnglesite/Anglesite-apphas none. Every commit there silently failed, andcommitFile's catch-all swallowed the failure intocommit: null— the file was written correctly, but the commit was dropped with no error surfaced to the MCP caller.server/edit-history.mjsandserver/undo-edit.mjsalready solved this for theircommit-treecalls by passingANGLESITE_COMMIT_IDENTITY(server/git-identity.mjs, recordEdit's commit-tree has no git identity, so every container overlay edit silently fails to commit #428). This applies the same fix tocommitFile.commitFile — no ambient git identity (#428)test block totest/create-content.test.js, mirroring the equivalent regression test intest/edit-history.test.js, coveringcreatePage,createPost, andcreateTyped.Paired PR check
commitwas already a nullable field in every response; this only makes it non-null in more cases (inside the container guest) than before. No paired app PR needed.Anglesite/Anglesite-app(MCP message schema, template fields the app reads, hook surface, anything the native app embeds or shells out to).Test plan
npm test— full suite passes (156 files / 3141 tests / 1 todo)#428container conditions (nouser.name/user.emailconfig, noGIT_AUTHOR_*/GIT_COMMITTER_*env,GIT_CONFIG_NOSYSTEM=1), reproducing the sibling test pattern fromtest/edit-history.test.js