Skip to content

fix(server): give create-content's commitFile a stable git identity - #436

Merged
davidwkeith merged 1 commit into
mainfrom
fix/commitfile-git-identity
Aug 11, 2026
Merged

fix(server): give create-content's commitFile a stable git identity#436
davidwkeith merged 1 commit into
mainfrom
fix/commitfile-git-identity

Conversation

@davidwkeith

Copy link
Copy Markdown
Contributor

Summary

  • create_page/create_post/createTyped (via commitFile in server/create-content.mjs) shelled out to plain git commit with no GIT_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 by Anglesite/Anglesite-app has none. Every commit there silently failed, and commitFile's catch-all swallowed the failure into commit: null — the file was written correctly, but the commit was dropped with no error surfaced to the MCP caller.
  • server/edit-history.mjs and server/undo-edit.mjs already solved this for their commit-tree calls by passing ANGLESITE_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 to commitFile.
  • Adds a commitFile — no ambient git identity (#428) test block to test/create-content.test.js, mirroring the equivalent regression test in test/edit-history.test.js, covering createPage, createPost, and createTyped.

Paired PR check

  • This change is self-contained to the plugin (skills / hooks / template / docs / MCP server with no consumer-visible contract change). commit was 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.
  • This change needs a paired PR in 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)
  • New tests fail-safe under the exact #428 container conditions (no user.name/user.email config, no GIT_AUTHOR_*/GIT_COMMITTER_* env, GIT_CONFIG_NOSYSTEM=1), reproducing the sibling test pattern from test/edit-history.test.js

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>
@davidwkeith
davidwkeith merged commit d130a0a into main Aug 11, 2026
4 checks passed
@davidwkeith
davidwkeith deleted the fix/commitfile-git-identity branch August 11, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant