Add reproduction for Schedule issue - #6855
Conversation
🦋 Changeset detectedLatest commit: 18b3f1e The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one reproduction test for the Schedule.during completion-condition reversal.
Schedule.test.ts: add"constructors" → "during recurs while the duration has not elapsed"— a clean reproduction callingSchedule.during("1 second")at timestamp 0 and asserting the step is not yet completed.
The test correctly surfaces the bug at packages/effect/src/Schedule.ts:755 where meta.elapsed > durationMillis is inverted — the schedule immediately completes instead of recurring.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a one-line branch swap in Schedule.during so it recurs while the duration is within bounds and completes when it elapses, plus a changeset.
Schedule.ts: fix inverted recurrence condition — swapped the then/else arms ofmeta.elapsed > durationMillisso the schedule completes (Cause.done) when elapsed exceeds the duration and recurs (effect.succeed) while within it..changeset/fix-schedule-during.md— new patch-level changeset for the fix.
The reproduction test from the prior commit now passes: Schedule.during("1 second") at timestep 0 correctly reports not-completed.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|

Reproduction only
This PR adds reproduction tests only. No implementation fix is included. CI is expected to fail until the underlying issue is fixed.
Covered audit issues
1.
core-s-z-testing-schedule-during-reversed: during recurrence is reversedModule:
ScheduleExpected contract: during(duration) must recur while elapsed time is within the supplied duration and complete after that duration.
Observed result: true instead of false
Reproduction command: