Skip to content

fix(scheduler): isolate due checks by job and repository - #246

Closed
vincentkoc wants to merge 1 commit into
mainfrom
fix/scheduler-history-key-collisions
Closed

vincentkoc wants to merge 1 commit into
mainfrom
fix/scheduler-history-key-collisions

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

A scheduler job can be skipped or run too soon when its name and repository form the same history key as another run. For example, job sync:repo and job sync for repository repo previously shared due state.

User Impact

Each job/repository pair now follows its own recorded success and interval, even when names contain colons.

Why This Change Was Made

Use an internal pair key for runner due checks. Keep the existing public history lookup, JSON representation, and persisted history format unchanged.

Evidence

  • Six runner regressions failed before the fix and pass afterward, covering both skipped due jobs and premature reruns across three collision forms.
  • Full uncached Go tests, vet, module tidiness, formatting, and diff checks passed with GOWORK=off.
  • Independent native P0–P3 review of complete candidate c6dd9c18d894e72c77807aa75a76c6b034f0dc6f against base 3853f24e96503325e6bd93b5b63c8d68d9b0142e found no actionable issues. Static review included history handling, runner/caller behavior, and test portability; platform execution is checked separately by CI.

@vincentkoc
vincentkoc marked this pull request as ready for review November 16, 2026 02:52
@clawsweeper

clawsweeper Bot commented Nov 16, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc

Copy link
Copy Markdown
Member Author

Superseded by #245, merged as f156a28 while this candidate was in CI. The landed change uses the same exact job/repository pair index and covers all three collision forms in both scheduling directions. Closing this duplicate; no additional code is needed.

@vincentkoc vincentkoc closed this Nov 16, 2026
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