Skip to content

fix: split init file count between written and merged (#16)#28

Merged
kevinkod merged 1 commit intomainfrom
fix/init-count-mergeable
May 1, 2026
Merged

fix: split init file count between written and merged (#16)#28
kevinkod merged 1 commit intomainfrom
fix/init-count-mergeable

Conversation

@kevinkod
Copy link
Copy Markdown
Contributor

@kevinkod kevinkod commented May 1, 2026

Summary

Init was reporting wrote 39 files but the re-init collision guard reported 38 specflow-managed file(s). The discrepancy of 1 was .gitignore being treated as a mergeable entry (written but excluded from the collision count). Both numbers now line up.

Before:

✓ wrote 39 files
(re-init guard: target already contains 38 specflow-managed file(s))

After:

✓ wrote 38 files (+ merged: .gitignore)
(re-init guard: target already contains 38 specflow-managed file(s))   ← matches

InitResult now exposes filesWritten (non-mergeable count, matches collision logic) and filesMerged (paths of mergeable entries merged into pre-existing user content). The handler renders the suffix only when filesMerged is non-empty.

Drops #16 from .claude/agents/qa-tester/memory/tracked-findings.md — that file is now empty since all six original QA-finding tickets have shipped.

Closes #16.

Test plan

  • deno task test — 318 tests pass.
  • Pre-commit hook (fmt + lint + bundle + check) green.
  • Smoke: bash .claude/skills/test-specflow/scripts/run-init.sh smoke-16 claude✓ wrote 38 files (+ merged: .gitignore) then re-init → target already contains 38 specflow-managed file(s) (matched).

🤖 Generated with Claude Code

Init was reporting 'wrote 39 files' but the re-init collision guard reported '38 specflow-managed file(s)' — the discrepancy of 1 was .gitignore being treated as a mergeable entry (written but not counted as overwrite-style).

Now the count surfaces both numbers in a single line that lines up with the collision guard:

Before:

  ✓ wrote 39 files

  (re-init: target already contains 38 specflow-managed file(s))

After:

  ✓ wrote 38 files (+ merged: .gitignore)

  (re-init: target already contains 38 specflow-managed file(s))   ← matches

Internally: InitResult now exposes filesWritten (non-mergeable count, matches collision logic) and filesMerged (paths of mergeable entries that were merged into pre-existing user content). The handler renders the suffix only when filesMerged is non-empty, so future scenarios with no mergeables stay clean.

Drops #16 from .claude/agents/qa-tester/memory/tracked-findings.md — that file is now empty since all six original QA-finding tickets have shipped.

Closes #16.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kevinkod kevinkod merged commit 4446168 into main May 1, 2026
4 checks passed
@kevinkod kevinkod deleted the fix/init-count-mergeable branch May 1, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

init reports 39 files written but re-init collision guard counts 38 managed files

1 participant