fix: scheduler retries once on GitHub API timeout#11
Merged
Conversation
Four fixes: 1. (#7) policy_decision events now use matching action's timestamp (+1ms) instead of record.created_at_ms. Prevents hash chain breakage after timestamp sort. 2. (#6) toEvents() accepts optional { prevHash } parameter. New toEventsBatch() maintains hash chain continuity across record boundaries. 3. (#8) Worker inline /audit endpoint auto-derives declared_capabilities from tool_call events. Prevents OAA-R-CAP-001 from firing on every legitimate tool call when no explicit manifest is provided. 4. (#9) toEvents() populates evidence.evidence_id = event_id. Fixes scoring engine deducting -5 per event for missing evidence_id. Fixes #6, #7, #8, #9 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndalone) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the scheduled poll cycle encounters a timeout (AbortError or HTTP 408) from the GitHub API, it now retries the request once before skipping the repo. This prevents transient network issues from causing an entire poll cycle to silently miss a repository. Closes #5 Co-Authored-By: Claude Opus 4.6 <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.
Summary
scheduledhandler to the Cloudflare Worker that polls configured GitHub repos for labeled issuesDetails
The previous Python scheduler (
bot/scheduler.py, removed in 73b9cf8) silently skipped repos on timeout with no retry. This implementation addsfetchIssuesWithRetry()which wrapsfetchGitHubIssues()with a single retry on timeout errors.New env vars:
GITHUB_TOKEN— PAT for GitHub API accessREPOS_TO_POLL— comma-separatedowner/repolistPOLL_LABEL— issue label filter (defaults to "claude")Closes #5
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com