Skip to content

Record folded-booking line 381 dayCount equivalent - #1916

Merged
stefan-burke merged 2 commits into
mainfrom
split/line-381-equivalent
Jul 25, 2026
Merged

stefan-burke merged 2 commits into
mainfrom
split/line-381-equivalent

Conversation

@stefan-burke

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

Copy link
Copy Markdown
Member

What changed

Records the last mutation equivalent for src/features/api/folded-booking.ts in scripts/mutation/equivalent-mutants.txt, bringing the mutation score to 100% (58 killed, 5 suppressed, 0 survivors).

Why

PR #1913 was merged before this final commit landed. The line 381 mutant (dayCount: 1 → 0 in the FoldBase) is provably equivalent: childDaysFromParent uses dayCount only in the customisable_days branch, which processParentApiBooking rejects before reaching the fold. For daily parents the function returns clampDurationDays(parent.duration_days), and for standard parents it returns 1 (the standardValue) — neither reads dayCount, so 1 and 0 produce the same output for every reachable input.

Without this recording on main, the next precommit:mutation run on a folded-booking.ts change would report line 381 as a survivor.

Checks

  • nix develop -c deno task mutation:audit-equivalents — all 438 equivalents valid.
  • nix develop -c deno task mutation on folded-booking.ts — 100% (58/58 killed, 5 suppressed).
  • nix develop -c deno task precommit — green.

Summary by CodeRabbit

  • Documentation
    • Updated mutation coverage notes to reflect complete test coverage for folded booking behavior.
    • Documented an additional equivalent mutation and clarified that no unsuppressed mutation survivors remain.

The base.dayCount:1 mutant is provably equivalent:

childDaysFromParent uses dayCount only in the

customisable_days branch, which processParentApiBooking rejects

before reaching the fold. All 63 mutants now killed or suppressed.
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4df9bfc2-8a3e-4976-a7c6-3769e53c6d3e

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb2f45 and 026667a.

📒 Files selected for processing (1)
  • TODO.md
📝 Walkthrough

Walkthrough

Mutation tracking documentation now records the folded-booking mutant at line 381:17 as equivalent and updates the TODO entry to state that all mutants are covered, with five known equivalents.

Changes

Mutation coverage records

Layer / File(s) Summary
Record folded-booking mutation equivalence
scripts/mutation/equivalent-mutants.txt, TODO.md
Adds the folded-booking base.dayCount equivalent mutant and updates the TODO entry to report full mutation coverage with five recorded equivalents.

Estimated code review effort: 1 (Trivial) | ~2 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 is concise and accurately highlights the main change: recording the folded-booking line 381 dayCount equivalent mutant.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch split/line-381-equivalent
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch split/line-381-equivalent

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@TODO.md`:
- Around line 1402-1405: Update the TODO entry describing the folded-booking
mutation tests to distinguish test-killed mutants from the five suppressed
equivalent mutants, stating that the tests kill every non-equivalent mutant
while preserving the existing proof and survivor details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f349f8d7-3b87-4819-808e-cdf83c296c1f

📥 Commits

Reviewing files that changed from the base of the PR and between de18887 and 4cb2f45.

📒 Files selected for processing (2)
  • TODO.md
  • scripts/mutation/equivalent-mutants.txt

Comment thread TODO.md
@stefan-burke
stefan-burke added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit bbad534 Jul 25, 2026
3 checks passed
@stefan-burke
stefan-burke deleted the split/line-381-equivalent branch July 25, 2026 10:17
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.

1 participant