fix(github): defer maintenance when rate-limit resetAt is unparseable#1908
fix(github): defer maintenance when rate-limit resetAt is unparseable#1908galuis116 wants to merge 3 commits into
Conversation
When REST budget is exhausted but resetAt is malformed, return the raw timestamp so delayUntil applies its conservative 60s deferral instead of proceeding immediately.
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-06-30 22:38:11 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 4 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
When REST budget is exhausted but resetAt is malformed, defer until one conservative minute after the observation timestamp, then proceed so work can refresh the stored rate-limit state.
05717b5 to
4d94fe5
Compare
JSONbored
left a comment
There was a problem hiding this comment.
See review for blockers, as well as failed CI.
Summary
shouldWaitForGitHubRateLimitnow returns a present-but-unparseableresetAtwhen REST budget is at/below the headroom floor, so callers defer viadelayUntil's conservative 60s path instead of proceeding immediately.resetAtwith low remaining budget.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.No upstream issue was opened: neither contributor token has
CreateIssuepermission onJSONbored/gittensory. This is a narrow fail-closed guard matching the existingdelayUntilbehavior.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — backend-only change.
Notes
Mirrors the fail-closed timestamp parsing pattern used in
src/auth/security.tsandsrc/upstream/ruleset.ts.Made with Cursor