Coordinate GrandSlam cooldowns and validate 2FA HTTP responses - #57
Draft
EdmundFu-233 wants to merge 1 commit into
Draft
EdmundFu-233 wants to merge 1 commit into
EdmundFu-233 wants to merge 1 commit into
Conversation
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.
Problem
GrandSlam requests can return HTML 429/503 responses instead of property lists. Isolating connections helped in a local AltServer investigation, but subsequent sign-ins still received 429 on fresh connections. Independent retries also allowed separate authentication operations to continue sending requests during the same cooldown. The trusted-device/SMS code-delivery paths checked only the transport error, so an HTTP failure could still lead to a verification-code prompt.
Changes
Retry-Aftervalues and bound queueing plus retries by a per-request deadline.Validation and draft status
Tests/AuthenticationTransport/run.sh: 15 tests passed. Coverage includes malformed responses, Apple errors, retry limits, cancellation, isolated sessions, shared cooldowns, very large/date-formRetry-After, request budgets, no overlapping requests, and failed code delivery.A universal arm64 + x86_64 Release integration build passed on macOS 27.0 / Xcode 26.6 using an isolated copy of the local AltServer PR #1770 setup. That build includes the existing local SRP build accommodation discussed in altstoreio/AltStore#1713; this PR does not resolve that separate prerequisite.
This is a Draft: the 12-second spacing, 60-second fallback cooldown and 120-second request budget are conservative local policy choices, not documented Apple limits. An earlier local prototype with an updated client identity and fresh sessions completed one installation; repeated sign-ins still encountered 429. The refactored transport in this PR has passed automated and integration-build checks, but repeated real-account installation and iOS behavior remain unverified. Maintainer input on these defaults and broader end-to-end testing are needed before release.
Related: #49 (connection isolation), #53 / #56 (response handling), and altstoreio/AltStore#1776. This draft incorporates the fresh-session approach from #49 rather than claiming that connection isolation alone resolves rate limiting.
Companion AltServer UI/client-identity change: altstoreio/AltStore#1801 (Draft).
Fork CI passed for commit
4d19ac4ea55845c43b34ab861a8b4c05a1935bbe: https://github.com/EdmundFu-233/AltSign/actions/runs/34912253105. This is fork CI; upstream checks/approval are separate.