Summary
docs/library-format.md says publish runs git add and git commit by default. Neither shipped surface ever commits.
Reproduction
- Make the library a git repository.
- Publish an entry through either the MCP server or
/codecarto-publish.
- Run
git status in the library.
Expected behavior
Per the doc's git interaction table: "git add + git commit | Optional, on by default. Commit message: publish: <ns>/<slug> v<N> or update: <ns>/<slug> metadata. Configurable per-workspace."
Actual behavior
The working tree is dirty and nothing is committed. commitPublish exists in core/library.ts and is covered by a test, but it has no callers in core/, mcp-server/, or extensions/. The MCP publish handler calls publishEntry and returns. The Pi handler calls publishEntry, writes the dashboard, and notifies. The only runGit usage is inside commitPublish itself.
It is reachable as public API through export * from "./library.ts" in core/index.ts, so an embedder can call it, but the shipped surfaces do not.
Environment
- Surface: both
- CodeCartographer version: 0.16.0 (
77262ad)
Additional context
Either side is defensible:
- Call
commitPublish from both surfaces, with the documented message formats and a config flag to disable it.
- Change the doc to say publish writes files and leaves committing to the user.
I lean towards the doc, since a tool writing into someone else's repository is better off not committing on their behalf by default, and the dashboard already surfaces unpushed state. The publish_confirm config only gates the Pi confirm dialog, so there is no existing switch that would naturally control this.
Summary
docs/library-format.mdsays publish runsgit addandgit commitby default. Neither shipped surface ever commits.Reproduction
/codecarto-publish.git statusin the library.Expected behavior
Per the doc's git interaction table: "
git add+git commit| Optional, on by default. Commit message:publish: <ns>/<slug> v<N>orupdate: <ns>/<slug> metadata. Configurable per-workspace."Actual behavior
The working tree is dirty and nothing is committed.
commitPublishexists incore/library.tsand is covered by a test, but it has no callers incore/,mcp-server/, orextensions/. The MCP publish handler callspublishEntryand returns. The Pi handler callspublishEntry, writes the dashboard, and notifies. The onlyrunGitusage is insidecommitPublishitself.It is reachable as public API through
export * from "./library.ts"incore/index.ts, so an embedder can call it, but the shipped surfaces do not.Environment
77262ad)Additional context
Either side is defensible:
commitPublishfrom both surfaces, with the documented message formats and a config flag to disable it.I lean towards the doc, since a tool writing into someone else's repository is better off not committing on their behalf by default, and the dashboard already surfaces unpushed state. The
publish_confirmconfig only gates the Pi confirm dialog, so there is no existing switch that would naturally control this.