Repository navigation
Conversation
The merge of #2100 replaced the full docs/en and docs/zh Steamworks guides with a five-line summary of a duplicate Client that the reconcile commit later deleted, and added a changelog fragment and architecture note for that removed client. Restore both guides from main before the merge, drop the stale fragment (the client already shipped in 0.4.0), drop the duplicate modding sections, and archive the note as superseded by the steamworks-client note.
#2222 bounded notification fields, copied content, gave Notification stable JSON field names, made the unsubscribe function idempotent and tested offline drops and history cursors; the later merge of #2075 overwrote both files with its first draft. Restore that version, refuse content that is not valid JSON, and make the copy test check the stored content instead of the caller's slice.
The section #2100 appended to presence.md repeats the SteamConfig.Client paragraph above it and was written for the duplicate Client the reconcile commit removed; drop it in both languages, as the modding sections were.
…2073 merge #2221 made Send refuse a group message from an account that has not joined the channel and a direct message when either account blocks the other; the later merge of #2073 overwrote chat.go, chat_test.go and the chat docs with the first draft, so neither check reached main although #1687 was closed on them. Restore both checks, also refuse a direct message from an account that is not one of the channel's two accounts, make Send and Edit refuse content that is not valid JSON, and make Edit apply MaxBytes, which it skipped.
…s with the blocker #2229 added RemoveFriend and enforced MaxPendingInvites; the later merge of #2090 overwrote friends.go and its test with the first draft, so MaxPendingInvites was documented but never checked and there was no way to cancel, decline or end a friendship. Restore both, with RemoveFriend leaving blocks alone. Fix the graph's own defects too: Block wrote a blocked edge on both sides, so the blocked account could call Unblock and lift the block; a block is now a directed edge only the blocker can remove, and Blocked checks both directions. Calling AddFriend for an existing friend downgraded the friendship to an invitation, and accepting an invitation skipped MaxFriends for both accounts.
…ting the owner Join overwrote the role of an account already in the group, so an owner who called Join on its closed group became Requested and the group was left without an owner. Promote set Admin on any target, which let an admin demote the owner and made accounts outside the group admins. Leave deleted a banned account's entry, which lifted the ban, and MaxMembers counted requests and bans although the docs say it caps members. Join now keeps an existing role, Promote only promotes a Member, a banned account stays banned on Leave, MaxMembers counts owners, admins and members, and Create returns a copy instead of the store's own group.
…ange A party kept Pending after a member joined or left, so a matchmaking ticket built for the old members stayed in force; #1688 requires any membership change to cancel it. Join and Leave now clear Pending, and Join returns the party for a member already in it before refusing a full or closed party.
…server-only Apply checked every put against the stored state before writing any, so a transaction with two puts of the same new record at Expected 0 passed both checks and wrote version 2; it also accepted records without an owner, collection or key, values that are not JSON, and treated any negative expected version as unconditional without saying so. Apply now refuses those with ErrInvalid and documents AnyVersion (-1), as #1676 specifies. Get and List read Private and OwnerRead records the same way, so the owner could read a record marked Private. Private now means server code only (reader Server), as #1676's read none permission does, and the exported errors and permissions have doc comments.
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 pull requests the merge train landed together (realtime, records, social, steamworks). Several second attempts at one issue were dropped by the later merge of the first draft; this restores them and fixes defects in the merged code.
#2075 feat(online): add realtime notification core
Landed, but its merge overwrote #2222's hardened
notifications.goand test with this first draft. See #2222.#2222 feat(realtime): add notification inbox core
Dropped by the #2075 merge. Restored: stable JSON field names on
Notification, field and content size limits, a private copy of the content, an idempotent unsubscribe function (calling it twice used to panic on closing a closed channel), and the offline-drop and history-cursor tests. Added: content that is not valid JSON is refused (the PR claimed JSON validation but had none), the copy test now checks the stored content instead of the caller's slice, andErrNotFoundandNotify's limits are documented.#2091 feat(online): add authoritative records core
Landed intact. Problems fixed here:
Applychecked every put against the stored state before writing, so two puts of one new record atExpected: 0both passed and wrote version 2. A transaction may now name a record once; a record without owner, collection or key, a value that is not JSON or an expected version below -1 is refused with the newErrInvalid.AnyVersion(-1) from Online: server-authoritative player records on Postgres and SQLite, with permissions, versions and multi-record transactions #1676.PrivateandOwnerReadbehaved the same, so an owner could read a record markedPrivate.Privatenow means server code only (readerrecords.Server), matching Online: server-authoritative player records on Postgres and SQLite, with permissions, versions and multi-record transactions #1676's readnone.It closed #1676 without meeting its acceptance (no SQL stores, storetest, HTTP service, YAML collection config or
cmd/recordsd); reported for reopening.#2070 feat(social): add party lifecycle core
Landed (the reconcile commit renamed
MembertoPartyMember). Fixed: a party keptPendingafter a member joined or left, so a ticket built for the old members stayed in force;JoinandLeavenow clear it.Joinreturns the party for a member already in it instead ofErrPartyFull.#2073 feat(social): add chat channel core
Landed, but its merge overwrote #2221's membership and block checks. See #2221.
#2078 feat(social): add group role core
Landed intact. Fixed:
Joinoverwrote an existing role, so an owner callingJoinon its closed group becameRequestedand the group had no owner. An existing role is now kept.PromotesetAdminon any target, letting an admin demote the owner and making accounts outside the group admins. Only aMembercan be promoted now.Leavedeleted a banned account's entry, which lifted the ban. A banned account stays banned.MaxMemberscounted requests and bans; it now counts owners, admins and members, as documented.Createreturned the store's own*Group, which callers could mutate unsynchronized; it returns a copy.There is still no
Ban,Kick,AcceptorDemotecall, so the documented ban state cannot be reached through the API.#2090 feat(social): add friend and block graph
Landed, but its merge overwrote #2229's version. See #2229. Fixed in the graph itself:
Blockwrote a blocked edge on both sides, so the blocked account could callUnblockand lift the block. A block is now a directed edge only the blocker removes,Blockstill removes the friendship or invitation on the other side, andBlockedchecks both directions (chat uses it asChat.Blocks).AddFriendfor an existing friend downgraded the friendship to an invitation; it is now a no-op.MaxFriendsfor both accounts.#2221 feat(social): enforce chat membership and blocks
Dropped by the #2073 merge, although #1687 was closed on it. Restored the group-member check and the two-way DM block check (
Chat.Blocks), plus the docs and note. Added: a DM channel only takes messages from its two accounts,SendandEditrefuse content that is not valid JSON, andEditappliesMaxBytes, which it skipped. #1687's acceptance is not met (no admin edit/delete, per-sender rate limit,Report, typing/read events, SQL stores or concurrent paging tests); reported for reopening.#2229 feat(social): add friend and block graph
Dropped by the #2090 merge. Restored
RemoveFriend(now leaving blocks in place, so it cannot be used to lift one) and theMaxPendingInvitescheck, with its tests.#2100 feat(steamworks): add shared lifecycle client
Duplicate of the Steamworks client #1976 had already shipped for #1763; the reconcile commit correctly deleted its
client.go, but the merge left behind a five-linedocs/en|zh/steamworks.mddescribing the deleted client (replacing the full guide), duplicate "shared lifecycle" sections inmodding.mdandpresence.md, a changelog fragment and an architecture note for the removed client. This restores the full guides, drops the duplicate sections and the fragment, and archives the note as superseded by the steamworks-client note.Verification
go tool nsgo test ./pkg/online/social/... ./pkg/online/records/... ./pkg/online/realtime/... ./pkg/online/steamworks/... ./pkg/online/presence/...: 45 passedgo tool nsgo test ./internal/repocheck/...: 37 passed, 1 skippedgo tool nsgo check ./pkg/online/...bun run verify-notes,go run ./changelog check(tools module)Screenshots: None