Skip to content

prepare_capture fails with ENOENT on a dev-hash asset root that is never installed #633

Description

@MongLong0214

commitlore_prepare_capture fails immediately and cannot be used at all:

commitlore: ENOENT: no such file or directory,
open '/Users/isaac/.local/share/commitlore/dev-3b70a1bebfb3/spec/SPEC.md'

The whole capture pipeline is unreachable, because verify_capture and stage_capture both need the nonce prepare_capture returns.

What is on disk

$ ls /Users/isaac/.local/share/commitlore/
codex-plugin.json  v0.8.0  v0.8.1  v0.8.2

$ find /Users/isaac/.local/share/commitlore -maxdepth 3 -name SPEC.md
/Users/isaac/.local/share/commitlore/v0.8.2/spec/SPEC.md
/Users/isaac/.local/share/commitlore/v0.8.1/spec/SPEC.md
/Users/isaac/.local/share/commitlore/v0.8.0/spec/SPEC.md

$ ls /Users/isaac/.local/share/commitlore/dev-3b70a1bebfb3/
ls: No such file or directory

The payload directories are named by release version. The server resolves its asset root to dev-3b70a1bebfb3, which no installer step ever creates. So the lookup is not a missing file inside a valid directory — the directory itself does not exist.

Reproduction

  • macOS, commitlore --version0.8.2, binary at /Users/isaac/.local/bin/commitlore
  • MCP wiring is the default: .mcp.json{"command": "commitlore", "args": ["mcp"]}
  • Call commitlore_prepare_capture with any transcript. Repository policy is {"mode": "auto", "unattended": true, "max_records_per_commit": 1, "require_verified_evidence": true}, and the call passed unattended: true.
  • Fails every time with the ENOENT above.

What still works

commitlore_query answers normally, so the server starts, reads git history and serves records. Only the asset lookup is broken. That is consistent with the CLI and the MCP server disagreeing about which asset root to use rather than with a broken install.

Why it matters

A repository can be fully wired — hooks installed, policy present, MCP connected — and still have no way to capture a record. The failure arrives at the moment of use, after the decision context has already been assembled, and it is not obviously distinguishable from "this commit has nothing worth recording", which is a normal and expected refusal. An operator following the documented flow will read a broken asset path as a rejection.

What I could not determine

Where dev-3b70a1bebfb3 comes from — whether it is a build-time constant baked into a dev binary that shipped as 0.8.2, a stale value in some state file, or derived at runtime. I did not find that string anywhere under ~/.local/share/commitlore. Whether a released 0.8.2 binary from a clean install reproduces this, or only this particular binary, is also unverified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions