Repository navigation
Conversation
Run kept Attempts across runs, so a supervisor that had once used up MaxAttempts returned at once on its next Run without calling connect. It also returned context.DeadlineExceeded when every attempt failed, discarding the connect error and reporting a timeout that never happened, and dialed even when the context had already ended. Count from zero on every Run, check the context before each attempt, return the last connect error wrapped, and stop the backoff timer when the context ends. Also restore the netplay.md paragraph #2347 added, which the merge train dropped, now describing the blocking behavior and that State and Attempts are only safe to read after Run returns.
SetProvider wrote the package-level provider that Open read with no synchronization, a data race whenever a platform installs its provider while a game opens a mapping. Guard it with a RWMutex and make the test restore the default through SetProvider. Add the missing doc comments on UDP, TCP and the four sentinel errors, and fix the package comment, which named an OpenProvider interface that does not exist. Also restore the relay fallback guidance #2331 added to server.md, which the merge train dropped, in portmap.md where the package is documented.
…hole events SetConsent returned early when saving ConsentDenied failed. That path already removes the stored grant and fails closed, but it skipped the ConsentRevoker purge #2136 added, so events queued under the old grant stayed queued and would be delivered after a later grant. Purge there too and join the two errors. BatchProvider.Send ignored the Stat error and would dereference a nil FileInfo, ignored read and rewrite errors while trimming, and, when the newest maxBytes began exactly at an event boundary, still skipped to the next newline and dropped one whole event more than the limit required. Return the errors and only drop a leading partial event.
A sign-in returns a token for the game servers' audience, but Account.accept cached it as the token Token hands out whatever AccountOptions.Audience was, so an account configured for cloudsave gave CloudClient a token the cloud save service refuses, until it came close to expiring. Cache the sign-in token only when Audience is empty, and otherwise let the first Token call refresh for the configured audience. #2238 and #2120 both added liveops.Account for #1653; main kept #2120's implementation and dropped the accounts.md client section and cloudsave.md link #2238 wrote, which described #2238's NewAccount(cx, opts) signature. Restore the section for the API main has, in docs/en and docs/zh, and document ErrSignedOut.
Contributor
Author
This branch has not been deployed
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.
Follow-up review of the online-4 bucket of pull requests merged by the merge train, checked against current
main.Reviewed pull requests
#2131 feat(liveops): add fail-closed age gate
Code, tests, note and changelog landed. The "Age gate and child mode" section in
docs/enanddocs/zhliveops.mdwas dropped by the merge train (the four liveops PRs below each appended a section at the same place and none survived). Restored.#2135 feat(liveops): add purpose-based consent manager
Code and tests landed; the "Purpose-based consent" docs section was dropped. Restored.
#2136 feat(liveops): purge analytics on consent revoke
Landed intact. Bug:
SetConsent(ConsentDenied)returned early when saving the denial failed. That path removes the stored grant and fails closed, but skipped the newConsentRevoker.Purge, so events queued under the old grant stayed queued and would be delivered after a later grant. This PR purges there too and joins both errors. No test:core.Storagehas no way to make a write that shrinks the value fail.#2138 feat(liveops): add durable analytics batches
Code and tests landed; the "Durable analytics batches" docs section was dropped and is restored. Bugs fixed in
BatchProvider.Send:Staterror and would dereference a nilFileInfomaxBytesbegan exactly at an event boundary, it still skipped to the next newline and dropped one whole event more than the limit requiredA new test covers the off-by-one.
#2237 feat(liveops): add durable crash report pipeline
The queue,
CrashUploaderand docs landed. ItsCrashReport.Fingerprintwas superseded onmainby the better frame-based one fromfeat/crash-fingerprint-1654, which is fine. The PR saysCloses #1654, but the issue's acceptance is not met: there is no import of NSGo's pendingcx.CrashReports(), no bounded count or size, no upload backoff, nocmd/crashd, no metadata defaults and no template wiring.#2238 feat(liveops): add secure account session client
This duplicates #2120 for #1653.
mainkept #2120'sliveops.Account(NewAccount(opts),NewAccountForScope), so #2238's code, which had a differentNewAccount(cx, opts) (*Account, error)signature, is gone, along with itsaccounts.mdclient section andcloudsave.mdlink. This PR:docs/enanddocs/zhaccounts.mdfor the APImainhas, and pointscloudsave.mdat itErrSignedOutSignInEmailorRegister,Tokenhanded out the game-server token the sign-in returned even whenAccountOptions.Audiencenamed another service such ascloudsave, which refuses it. It now refreshes for the configured audience, with a test.#2385 feat(liveops): add load funnel stage recorder
Code and tests landed; the "Load funnel" docs section was dropped. Restored.
#2208 feat(netplay): serve WebSocket on inherited listeners
OK.
#2216 feat(netplay): support persisted browser resume tokens
OK.
#2347 feat: add netplay reconnect supervisor
Its
netplay.mdparagraph was dropped and is restored. Bugs fixed inReconnectSupervisor.Run:Attemptscarried over between runs, so after one run used upMaxAttempts, the next returned at once without callingconnectcontext.DeadlineExceeded, reporting a timeout that never happened and losing theconnecterror. It now returns the last error, wrapped.The type comment claimed it ran "off the caller's loop", but
Runblocks and writesState/Attemptsunsynchronized. The comment and docs now say to call it from its own goroutine and read them after it returns. New tests cover the fixed behavior. The PR saysCloses #1577, but most of the issue is missing: network-change wake-ups, aStatussignal, the overlay, WebSocket/loopback andGOOS=jstests, and screenshots.#2420 fix(netplay): keep WebSocketTransport.Close quiet when its loops close
OK.
#2331 feat(portmap): add player host mapping contract
Code and tests landed. Its
server.mdrelay-fallback section was dropped and is restored inportmap.md, where the package is documented. Other fixes:SetProviderandOpenraced on the package-level provider; it is now guarded by aRWMutex, with a concurrent testUDP,TCPand the four sentinel errorsOpenProviderinterface; it now namesProviderVerification
go tool nsgo test ./pkg/online/liveops/... ./pkg/online/netplay/... ./pkg/online/portmap/... ./internal/repocheck/...: 475 passed, 0 failedgo tool nsgo checkon each of the three packagesgo run ./tools/changelog checkScreenshots: None