spec-kitty / spec-kitty/spec-kitty

[bug] accept --no-commit writes acceptance-matrix.json and status views despite documenting "without writing metadata or status changes"

Open
#4,089 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.6k
Forks
165
Avg merge
14h 52m
Merged PRs (30d)
303

Description

## What happened

`--no-commit` is documented at `cli/commands/accept.py:696` as:

> Report acceptance readiness without writing metadata or status changes

At `:895-902` the flag only suppresses the git commit — `perform_acceptance` still runs:

```python
if no_commit:
result = perform_acceptance(
summary, mode=actual_mode, actor=actor_name,
tests=acceptance_tests, auto_commit=False,
)
```

The module's own docstrings confirm the writes are unconditional: `write_acceptance_matrix` writes `acceptance-matrix.json` "(and the sibling issue-matrix/status views)" (`:229-230`, `:251`, `:258`), and `:939-941` notes that the non-commit artifacts "are written after the" acceptance commit.

## What you expected

`--no-commit` to leave the working tree untouched, as its help text states — or, failing that, for the help text and the `(dry-run)` message not to describe it as a read-only report.

## Effect

A command that reports `no changes were committed (dry-run)` leaves the working tree dirty. The content is harmless — the invariants still pass — but `acceptance-matrix.json` is rewritten with re-measured elapsed times in its evidence strings and reindented; on our mission that was a 784-line diff. An operator who runs `--no-commit` to *check* readiness and then commits unrelated work silently carries the rewritten matrix along with it.

## Suggested fix

Either honor the documented contract (skip the artifact writes when `no_commit` is set), or correct the help text and the `(dry-run)` message to say that it writes but does not commit. Either is fine; the current pairing of "dry-run" with a dirty tree is the problem.

## Environment

- spec-kitty version: **3.2.6** (pip, user site-packages)
- OS: macOS (Darwin 25.6.0)
- AI agent: Claude Code

Contributor guide

Open the contributing guide

Research direction

Start in cli/commands/accept.py at the --no-commit handling around lines 895-902, then read perform_acceptance and write_acceptance_matrix around the referenced docstrings. Decide whether the flag should suppress artifact writes or whether its help and dry-run wording should describe those writes. Verify that the selected behavior leaves the working tree and user-facing messages consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.