feat: thread UseOneMinuteIntervals flag through calc helpers (Phase 0, no-op)#1540
Merged
renemadsen merged 1 commit intoMay 2, 2026
Merged
Conversation
…pers (no-op stubs) Phase 0 of the UseOneMinuteIntervals second-precision rollout. This PR is plumbing-only with zero behavior change: it adds the flag parameter to CalculatePauseAutoBreakCalculationActive (already has assignedSite, just adds an internal if/else stub), RecalculatePlanHoursFromShifts (new 2-arg overload that delegates to existing 1-arg), and RoundDownToNearestFiveMinutesAndFormat (new 3-arg overload that delegates to existing 2-arg). All callers with ready access to AssignedSite are updated to pass the flag. Existing helper bodies are unchanged. New tests assert flag-on and flag-off paths return byte-identical results in this phase, proving the stubs are true no-ops. Subsequent phases (1-4) will replace the stub branches with true second-precision logic. Plan: /home/rene/.claude/plans/parallel-twirling-balloon.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
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.
Summary
UseOneMinuteIntervalssecond-precision rollout (plan:/home/rene/.claude/plans/parallel-twirling-balloon.md).UseOneMinuteIntervalsflag through three calculation helpers as no-op stubs.CalculatePauseAutoBreakCalculationActivealready takesAssignedSite, so signature is unchanged; anif (assignedSite.UseOneMinuteIntervals) { /* TODO Phase 1+2 */ }block is added that intentionally falls through to the existing 5-minute logic.RecalculatePlanHoursFromShifts(PlanRegistration)keeps its existing body byte-identical; a new 2-arg overload(PlanRegistration, bool useOneMinuteIntervals)delegates to the 1-arg method (planned-shift precision stays minute-only per the plan).RoundDownToNearestFiveMinutesAndFormat(DateTime, int)keeps its existing body byte-identical; a new 3-arg overload delegates to the existing 2-arg helper.ContentHandoverService.AcceptHandoverRequestAsync(lines 638-639) updated to passfromAssignedSite?.UseOneMinuteIntervals ?? false/toAssignedSite?.UseOneMinuteIntervals ?? falseto the new 2-arg overload.CalculatePauseAutoBreakCalculationActive(AbsenceRequestService, TimePlanningPlanningService x2, TimePlanningWorkingHoursService x4) need no change — signature unchanged.RoundDownToNearestFiveMinutesAndFormat(TimePlanningWorkingHoursService.ReadSimple x6) do not haveassignedSitein scope; per the plan they remain on the existing 2-arg signature.New tests (additions only — no existing tests edited)
CalculatePauseAutoBreakCalculationActive_FlagOnAndFlagOff_ReturnSamePauseId— proves the new if-branch is a true no-op (Pause1Id..Pause5Id byte-identical).RecalculatePlanHoursFromShifts_FlagOnAndFlagOff_ReturnSamePlanHours— proves the 1-arg, 2-arg(false), and 2-arg(true) paths produce identicalPlanHoursandPlanHoursInSeconds.RoundDownToNearestFiveMinutesAndFormat_FlagOnAndFlagOff_ReturnSameString—[Ignore]d carve-out: helper isprivate staticand the public consumer (ReadSimple) requires SDK/DB fixture not yet wired in this test project. Assertion captured for future fixture work.Test plan
Phases 1-4 will replace the stub branches with true second-precision logic.
🤖 Generated with Claude Code