Skip to content

fix: honor --no-now before the first Loop run - #107

Merged
ByBrawe merged 4 commits into
mainfrom
fix/no-now-first-run-delay
Aug 18, 2026
Merged

fix: honor --no-now before the first Loop run#107
ByBrawe merged 4 commits into
mainfrom
fix/no-now-first-run-delay

Conversation

@ByBrawe

@ByBrawe ByBrawe commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • make first-run due time respect immediate=false in the stable scheduler: createdAt + interval instead of immediate due
  • apply the same first-run rule in the experimental OpenCode 2 prompt runtime
  • preserve backward compatibility for persisted jobs without an immediate field (they keep the existing immediate behavior)
  • add deterministic V1 scheduler coverage and fake-clock V2 coverage proving --no-now does not dispatch before the interval and does dispatch exactly when due

Why

README documents --no-now as waiting before the first run, but both the shared scheduler and V2 prompt runtime treated any lastRunAt=0 job as immediately due regardless of immediate=false. This restores the documented behavior without changing normal /loop startup semantics.

Scope

Runtime scheduling semantics + regression tests. OpenCode 2 stable parity remains unclaimed.

Copilot AI lite review requested due to automatic review settings August 18, 2026 00:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ByBrawe ByBrawe closed this Aug 18, 2026
@ByBrawe ByBrawe reopened this Aug 18, 2026
@ByBrawe
ByBrawe merged commit 745be54 into main Aug 18, 2026
18 of 24 checks passed
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