Skip to content

library format: publish is documented as committing by default, but nothing calls commitPublish #125

Description

@TheAmericanMaker

Summary

docs/library-format.md says publish runs git add and git commit by default. Neither shipped surface ever commits.

Reproduction

  1. Make the library a git repository.
  2. Publish an entry through either the MCP server or /codecarto-publish.
  3. 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:

  1. Call commitPublish from both surfaces, with the documented message formats and a config flag to disable it.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions