fix(country): count Retry-After from the answer, not the asking #403
Closed
rvnminers-A-and-N
wants to merge 1 commits from
fix/country-retry-after-from-answer into dev
pull from: fix/country-retry-after-from-answer
merge into: :dev
:dev
:ci/gitea-actions
:dependabot/go_modules/go-f5e78d6b71
:integration
:feat/777-accelerators
:fix/workspace-globe-pane-motion
:feat/789-pending-action-attribution
:feat/741-model-catalog-stream
:fix/741-shared-state-reconnect-baseline
:feat/741-bootstrap-peers-stream
:feat/741-city-table-stream
:fix/741-location-stream-client-metadata
:fix/741-files-shared-state-coverage
:fix/741-settings-stream-e2e-readiness
:dependabot/npm_and_yarn/apps/sisyphus/electron-45.0.0
:dependabot/npm_and_yarn/apps/sisyphus/desktop-ea22606fe9
:agents/app-side-confirmation
:feat/files-scoped-by-pool
:feat/storage-replication-push-stream
:codex/protobuf-v2-lending-state
:fix/dev-preview-auth-forwarding
:feat/chat-attachment-retention
No Reviewers
Labels
Clear labels
accessibility
all-platforms
area:agents
area:ai
area:chain
area:ci
area:client
area:daemon
area:p2p
area:project
area:protocol
area:runtime
area:storage
bug
chore
community
dependencies
discussion
discussion/Announcements
discussion/General
discussion/Ideas
discussion/Q&A
discussion/Show and tell
discussion/answered
documentation
duplicate
enhancement
good first issue
help wanted
i18n
infra
invalid
needs:decision
needs:hardware
paired
question
research
security
status:in-review
test
testing
tracking
wontfix
Barrier affecting people with disabilities
Run every platform's packaging and checks on this pull request, not only the three main ones
MCP server, skill, and thinking on the pool
Planner and model providers
Blockchain, SISY, verification
Continuous integration and build workflows
Desktop and web clients
sisyphusd coordinator, worker, scheduler
libp2p hosts, relays, discovery, connections between nodes
Project planning, roadmap, and governance
Protobuf schemas and RPC contracts
Workload execution and environments
Content-addressed storage, IPFS, Kubo, Cluster, S3, names, pinning
Something isn't working
Repository health, templates, Discussions, contributor experience
Updates to actions, Go modules or npm packages
Migrated from GitHub Discussions
GitHub Discussions category: Announcements
GitHub Discussions category: General
GitHub Discussions category: Ideas
GitHub Discussions category: Q&A
GitHub Discussions category: Show and tell
Q&A discussion with an accepted answer
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
Translations and right-to-left layouts
Build, CI, releases
This doesn't seem right
Waits on a decision from both owners
Waits on a machine we do not have yet
Built together by both maintainers, with co-authored commits
Further information is requested
Needs investigation or a design decision
Sealing, keys, access control, tokens, the security model
Built and in an open pull request; closes when it merges
Tests, test harnesses and the rehearsal
Roadmap and meta issues
This will not be worked on
type
Feature
A request, idea, or new functionality (GitHub issue type)
type
Task
A specific piece of work (GitHub issue type)
Milestone
No items
No Milestone
V0: prove the loop
Projects
Clear projects
No projects
Sisyphus roadmap
Done
No Assignees
rvnminers-A-and-N
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sisyphus/Sisyphus#403
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #402.
w.lookups.end(time.Now(), lookUpCountry(w.ctx))readtime.Now()before the lookup ran, since Go evaluates arguments left to right. So the service'sRetry-After, and the backoff, were counted from the asking, not the answer. The next lookup could then come up to one round trip early. That's what madeTestARateLimitsRetryAfterIsWaitedOutfail about one run in 18 (999.97 ms apart in #398's CI).Fix. Take the answer, then the time, with a comment saying why the two are kept apart.
Test. The rate-limited answer now takes 200 ms, and the gap between the two requests must be at least 1.2 s. Without the fix it fails every time. With it, 180 runs under
-raceat 1, 4 and 8 CPUs all pass, as do the other country-lookup tests.No new branches, so coverage is unchanged. No docs change:
--locate-countryalready says the wait follows the service's Retry-After.Closing in favour of #401, which @excho0 opened a few minutes earlier with the same fix. #402 records the cause; #401 closes it.
Pull request closed