Repository navigation
Fix #382 duplicate test declarations breaking the main build - #385
Merged
Merged
Conversation
… three distinct stamped-reading variants
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
…ndow courtesyWindow variants
…a rollover (restores the #357 contract)
…adences (accepted slept-through-reset intent)
…l-detail filter; pin the capPool fallback
…he iOS companion compile The stored isModelDetail (captured at construction) and the fuller primaryWindows, detailWindows and hasModelDetails already exist; the leftover computed duplicates were invalid redeclarations. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bounded repair: compile regression, one production regression, one accepted-intent gap, one stale fixture
Main at cb8759f does not compile (#382 redeclared four test funcs) and carried further red the compile break hid. This PR makes the full suite green locally (691 CodeCapsTests + all QuotaCoreTests, Mac, head d83f52f).
1. Compile repair (#382 duplicate test declarations)
Four pairs qualified body-for-body:
2. Regression fix: explicit period start must advance (#357 contract)
#382's whole-multiple edit to explicitStartConfirmsPeriod changed its zero-advance guard to
return true, letting a MiniMax weekly deadline correction with an UNMOVED explicit start confirm a rollover - contradicting #357's unchanged comment ("their explicit start must advance too") and breaking merged test testMiniMaxWeeklyDeadlineCorrectionNeedsAnAdvancedExplicitPeriodStart (passed at 9ecc644, failed at cb8759f). Restoredguard periods >= 1 else { return false }. Whole-multiple advances (the #382 missed-periods case) unaffected.3. Slept-through resets: smaller window no longer swallowed in mixed batches
Accepted intent (owner iMessage 2026-11-06, verbatim: offered "If your Mac sleeps through several quota resets, CodeCaps can miss the reset notification when you open it again. I'd fix that so it tells you a reset happened while you were away. Want that?" - answer "Yes that's good."). The 5h window's two-period slept-through rollover FIRES when polled alone but was silently DROPPED when the 7d companion rode in the same batch (reason filter: not largest, minimum above near-cap threshold, not mid-window -> continue). Added sleptThroughMultiplePeriods rescue: a fired transition on a smaller window surfaces as .newPeriod only when the vendor's end moved by TWO OR MORE whole cadences (drift-tolerance, calendar-month band mirroring the deadline path) AND real quota readings exist on both sides. Ordinary one-period resets of smaller windows stay quiet (testSmallerWindowStaysQuiet pinned), windows never seen with a percentage stay quiet and masked current readings cannot alarm (both pinned). This is notification-surfacing of an already-detected reset, distinct from the unknown-window false-positive question, which this PR does not touch.
4. Stale widget fixture reconciled (strengthened)
WidgetTests.testWidgetOnlyLetsAFreshWindowCapAPlan expected literal
windows.filter { !$0.isSupplementaryVideoQuota }; #357's merged production reads... && !$0.isModelDetail }. Literal updated to the stronger form and a new assertion pins the capPool fallback ("a platform reporting only video windows keeps them"). No production widget change.Nothing here settles the unknown-window preference, touches #384, or authorizes release.