Skip to content

docs: drop finished work from TODO.md and rehome the PIT exclusion rationale - #201

Merged
bernardladenthin merged 1 commit into
mainfrom
claude/todo-cleanup
Sep 1, 2026
Merged

docs: drop finished work from TODO.md and rehome the PIT exclusion rationale#201
bernardladenthin merged 1 commit into
mainfrom
claude/todo-cleanup

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • TODO.md's own header said completed work belongs in git history and crossrepostatus.md, not in the file — and the longest entry in it opened by declaring itself finished ("Still out … nothing, as it turns out", 33 lines). It is deleted; the file goes from 102 to 51 lines with 7 genuinely open bullets.
  • What that entry carried is not history, and it is kept: the reason two classes can never reach 100 % mutation coverage. Compressed and moved into CLAUDE.md's PIT section, where guidance for working in this repo belongs.

Why that rationale had to survive

Both classes' survivors are equivalent mutants — unkillable through the public API, not merely untested. Without the write-up the next person re-attempts an impossible target:

  • document.AiMdHeaderCodec — the colon guard in read is reached only after startsWith(HEADER_FIELD_PREFIX), so colonIndex is either -1 or >= 2. The < 0 boundary mutant differs only at the unreachable 0; the +1 → -1 mutant only at an empty field key, which values.put("", value) swallows because no header field is keyed "".
  • support.AiSourceChunker (28/34) — its three observable boundaries are pinned (maxChars == 1, the end < length guard, the lastNewline > pos guard), but six mutants have no observable effect at all: the ArrayList capacity hint, return chunks vs emptyList() on empty input, two clamps the surrounding Math.max absorbs, the loop head the end >= length break already guarantees, and select's total <= maxChunks, where the equality branch computes the identity mapping.

Reaching 100 % on either would mean exposing internals or deleting a deliberately defensive guard.

The @VisibleForTesting entry was misleading and is sharpened

It claimed "No usages currently in any module", which reads as "nothing to do". The audit is about members that exist and are unannotated, and there are ten: four on LlamaCppJniAiGenerationProvider plus its two static mappers, two on AiMdDocumentCodec, AiPromptPreparationSupport.trimSourceAtLineBreak, and the three mojos' build*Configuration(). It now names them and states the decision it needs — a project-local marker annotation (support.ConvertToRecord is precedent) versus recording that the convention is not adopted here — so it can be closed rather than re-audited forever.

Test plan

Related issues / PRs

Part of a four-repo pass; siblings are the matching claude/todo-cleanup branches in java-llama.cpp, BitcoinAddressFinder and streambuffer. Each file's header now states the rule outright: finished items are deleted, not annotated.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

Generated by Claude Code

…tionale

TODO.md's own header says completed work belongs in git history and
crossrepostatus.md, not in the file -- and the longest entry in it was a
33-line item that opened by declaring itself finished ('Still out ... nothing,
as it turns out'). It is deleted.

What it carried that is not history: the reason two classes can never reach
100% mutation coverage. Those survivors are equivalent mutants, unkillable
through the public API rather than merely untested, so without the write-up
the next person re-attempts an impossible target. Compressed and moved into
CLAUDE.md's PIT section, where guidance for working in this repo belongs.

The @VisibleForTesting entry claimed 'No usages currently in any module',
which reads as 'nothing to do' -- the audit is about members that exist and
are unannotated, and there are ten of them. It now names them and states the
decision it needs (project-local marker annotation, for which
support.ConvertToRecord is precedent, vs. recording that the convention is not
adopted here), so it can be closed rather than re-audited.

Header now states the rule outright: finished items are deleted, not
annotated.
@claude

claude Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Summary

This is a clean documentation-only change that appropriately consolidates finished work and preserves important technical guidance.

What's Good ✓

  1. Correct application of stated principles — TODO.md's own header says completed work belongs in git history and crossrepostatus.md, not in the file. Deleting the 33-line finished entry follows this correctly.

  2. Important technical knowledge preserved — The rationale for why AiMdHeaderCodec and AiSourceChunker cannot reach 100% mutation coverage is genuinely valuable: both have equivalent mutants (unkillable through the public API, not merely untested). This prevents future work from re-attempting an impossible task. The explanations are technically sound:

    • AiMdHeaderCodec (line 164): After startsWith("- "), colonIndex is -1 or ≥2. Mutating < 0 to <= 0 only affects the unreachable 0; mutating +1 to -1 only affects empty-key case, which values.put("", value) swallows silently. ✓
    • AiSourceChunker (28/34): Six unobservable mutants correctly identified—capacity hint, empty-return equivalence, clamps absorbed by Math, loop conditions already covered, identity mapping in select equality branch. ✓
  3. Improved header clarity — New phrasing makes the rule explicit: "Completed work is not recorded here... a finished item is deleted rather than annotated."

  4. Actionable refinement — The @VisibleForTesting entry now lists specific members (4 on LlamaCppJniAiGenerationProvider + 2 static, 2 on AiMdDocumentCodec, AiPromptPreparationSupport.trimSourceAtLineBreak, 3 mojos) and frames the decision clearly, replacing the misleading "No usages currently."

No Issues Found

  • No correctness problems
  • No security implications
  • Placement in CLAUDE.md PIT section is appropriate
  • Diff touches only documentation as stated

Looks good to merge. ✓

@bernardladenthin
bernardladenthin merged commit 7670a54 into main Sep 1, 2026
9 of 14 checks passed
@bernardladenthin
bernardladenthin deleted the claude/todo-cleanup branch September 1, 2026 13:35
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.

2 participants