Skip to content

Tidy the file-size note, the last stray test, and stale mutant lines - #1972

Merged
stefan-burke merged 1 commit into
mainfrom
claude/site-tidyup-migrations-status-yl8jsv
Jul 28, 2026
Merged

Tidy the file-size note, the last stray test, and stale mutant lines#1972
stefan-burke merged 1 commit into
mainfrom
claude/site-tidyup-migrations-status-yl8jsv

Conversation

@stefan-burke

@stefan-burke stefan-burke commented Jul 28, 2026

Copy link
Copy Markdown
Member

Three small clean-ups found while taking stock of the tidy-up work in progress.

The 1,000-line rule has no exceptions any more

AGENTS.md said that files written before the 1,000-line limit are let off in a list inside biome.json, and that you should delete a file's entry when you split it. That list no longer exists — the limit now applies to every file, and no file in the project is over it. The note now says so, and says never to add an exception. Two places in TODO.md mentioned the same list; they now just say the check passes. Three line counts in TODO.md were also out of date, so they have been corrected.

One test moved to where the tools look for it

test/shared/request-batch-cache.test.ts tests src/shared/request-cache.ts, but it did not sit in the matching place under test/. Our mutation checker finds a file's tests by that matching path, so these twelve tests were never used to check that file. The file moves to test/shared/request-cache/batch.test.ts. Nothing inside it changed, and all twelve still pass.

This was the last test in the wrong place. The placement report now says every unit test sits where it should.

Twelve entries in the mutant list pointed at the wrong lines

scripts/mutation/equivalent-mutants.txt records changes a test could never catch, so the checker does not keep reporting them. Each one is recorded by line and column, and those move whenever the code around them shifts. Twelve had drifted far enough that deno task mutation:audit-equivalents gave up straight away without checking anything.

Each one is re-pointed at the same change's current line and column. Nothing was added or removed, and no source code changed.

Checked

  • deno task test:files test/shared/request-cache/batch.test.ts — 12 passed.
  • The unit-test placement report lists no misplaced tests.
  • Documentation and a data file only; no source or test code changed.

Generated by Claude Code

Summary by CodeRabbit

  • Documentation

    • Clarified project guidance for file-size limits and lint enforcement.
    • Updated follow-up notes with current test-file sizing and planned organization improvements.
    • Refreshed mutation-testing records to match the current code layout.
  • Tests

    • Added comprehensive coverage for batched request caching, including deduplication, concurrent requests, retries after failures, invalidation, and missing results.
    • Strengthened validation of request-scoped cache behavior.

The 1,000-line Biome ceiling no longer has a grandfathered override list in
biome.json, so AGENTS.md and two TODO sections stop describing one.

test/shared/request-batch-cache.test.ts covered src/shared/request-cache.ts
from off its mirror path, so the mutation gate never ran it. It moves to
test/shared/request-cache/batch.test.ts, which the mirror map owns. The
misplaced-test report is now empty.

Twelve entries in the equivalent-mutants registry pointed at lines the code had
moved past, which made mutation:audit-equivalents abort before checking
anything. Each one is re-pointed at the same mutant's current line and column.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EdDZCWRXwjqsidfRJFarXC
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5c851d2c-5252-4ae6-beef-6dc34f203400

📥 Commits

Reviewing files that changed from the base of the PR and between 6df0717 and 51a5c4d.

📒 Files selected for processing (4)
  • AGENTS.md
  • TODO.md
  • scripts/mutation/equivalent-mutants.txt
  • test/shared/request-cache/batch.test.ts

📝 Walkthrough

Walkthrough

The PR adds comprehensive tests for request-batch caching and updates repository guidance, TODO records, and equivalent-mutant metadata to reflect current limits, file sizes, and source locations.

Changes

Request cache validation

Layer / File(s) Summary
Batch cache behavior
test/shared/request-cache/batch.test.ts
Adds coverage for batching, deduplication, concurrent callers, request isolation, invalidation, retries after failures, empty requests, and missing lookup results.

Repository maintenance metadata

Layer / File(s) Summary
Line-limit guidance and TODO updates
AGENTS.md, TODO.md
Updates the hard Biome line limit guidance and current test-file sizing notes.
Equivalent-mutant record re-anchoring
scripts/mutation/equivalent-mutants.txt
Moves existing equivalent-mutant entries to updated source line locations without changing their rationales.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the cleanup-focused changes: file-size guidance, the moved test file, and updated mutant line references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/site-tidyup-migrations-status-yl8jsv
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/site-tidyup-migrations-status-yl8jsv

Comment @coderabbitai help to get the list of available commands.

@stefan-burke
stefan-burke added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit 118db1e Jul 28, 2026
3 checks passed
@stefan-burke
stefan-burke deleted the claude/site-tidyup-migrations-status-yl8jsv branch July 28, 2026 12:19
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