idle-draft: stop committing state file with machine commits

idle-draft.state.json is now gitignored in the target repo; explicitly
git add-ing an ignored path errors, which broke every success commit.
The state file is still written atomically — just no longer tracked.

Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
This commit is contained in:
Paul O'Reilly
2026-08-02 23:38:29 +12:00
parent 18b25191a3
commit 29618f4319
2 changed files with 7 additions and 4 deletions

View File

@@ -1420,7 +1420,7 @@ def run_dispatch(args, config: dict, repo: Path, state_path: Path) -> int:
f"(7d {before_pct}%→{after_pct}%)"
)
rel_canonical = str(Path(canonical).relative_to(repo))
ok, reason = git_commit(repo, [rel_canonical, "idle-draft.state.json"], msg)
ok, reason = git_commit(repo, [rel_canonical], msg)
log_event(repo, f"success: {cand['item_key']} -> {rel_canonical}; commit={ok} ({reason})")
elif outcome == "content_failure":
blocked_reason = apply_failure_state(state, cand, defaults["max_attempts"])