Read an Account's profile and its decided Games over the wire, in an ADR superseding 0034 #389

Closed
opened 2026-10-11 16:27:45 +00:00 by root · 18 comments
root commented 2026-10-11 16:27:45 +00:00 (Migrated from gitlab.core-project.space)

Imported from GitHub amaurycoudr/chess-project#389, opened by @amaurycoudr on 2026-10-11 16:27 UTC.


Parent

#366

What to build

Anyone, signed in or not, can read an Account's public profile by username: the username as stored, when the Account joined, and one page of its decided Games, newest first, with a cursor for the next page. A Guest has no profile, and a Game with no Account on either side appears on no profile. The answer carries nothing else about the Account. See #366, Contract, API and ADRs.

First, an ADR superseding ADR 0034 records the one changed decision: an Account's decided Games are listed publicly on its profile, and a Game with no Account owner is listed only to its owner. It restates every other decision of ADR 0034.

Then a new profile router in the contract with one read, profile.get, on a GET route addressed by username, implemented in the games feature module beside "my games":

  • each item reuses the "my games" item shape, with the Color read as the profile Account's, and the page size reuses the "my games" cap;
  • paging is keyset on ended time then id; an unreadable cursor is an input validation error;
  • lookup is case-insensitive; an unknown or deleted username is the new PROFILE_NOT_FOUND refusal (404), in the refusal status table and the controller's refusal table;
  • the read is public: it opts out of the auth guard, never reads a Session or a Guest, and passes the origin guard without an Origin (ADR 0028);
  • it reads the Account owner columns only, never joining through claimed Guests (ADR 0035).

Seam: The RPC wire

Acceptance criteria

  • A new ADR, status accepted, in the repo's ADR format, supersedes ADR 0034 and restates its surviving decisions; ADR 0034's Status reads superseded by it and nothing else in 0034 changes; the ADR index has the new row with precise Governs globs and 0034's row turned to superseded
  • The GLOSSARY and code comments that point at ADR 0034 for a surviving decision point at the new ADR
  • The profile read answers the username as stored, the join time, and the Account's decided Games newest first, each with the Account's Color, the winner, the ending and the opponent's name
  • A claimed Guest's Games are listed, including one decided after the claim for a Seat the Guest still held
  • A Game between two Guests appears on no profile; an Account's opponent who is a Guest, an Account or no one (a vacated Seat) each comes out as such
  • A self-game is listed once
  • The answer is identical with and without a Session or a Guest header, and never holds an email or any other Account field
  • An unknown username, a deleted Account and a username with characters outside the allowed set are each refused as not found, not as a validation error; a username in another case finds the Account
  • An Account with no Games answers an empty page with no cursor; exactly one page answers no cursor; one more than a page answers a cursor whose next page holds the last Game
  • A Game decided between two page reads is neither repeated nor skipped; an unreadable cursor is an input validation error
  • Each result and ending reads correctly from either Color
  • The gate is green
  • The ADR is this ticket's first commit, before any code it governs
> _Imported from GitHub [amaurycoudr/chess-project#389](https://github.com/amaurycoudr/chess-project/issues/389), opened by [@amaurycoudr](https://github.com/amaurycoudr) on 2026-10-11 16:27 UTC._ <!-- github-issue:389 --> --- ## Parent #366 ## What to build Anyone, signed in or not, can read an **Account**'s public profile by username: the username as stored, when the **Account** joined, and one page of its decided **Games**, newest first, with a cursor for the next page. A **Guest** has no profile, and a **Game** with no **Account** on either side appears on no profile. The answer carries nothing else about the **Account**. See #366, *Contract*, *API* and *ADRs*. First, an ADR superseding ADR 0034 records the one changed decision: an **Account**'s decided **Games** are listed publicly on its profile, and a **Game** with no **Account** owner is listed only to its owner. It restates every other decision of ADR 0034. Then a new `profile` router in the contract with one read, `profile.get`, on a GET route addressed by username, implemented in the games feature module beside "my games": - each item reuses the "my games" item shape, with the **Color** read as the profile **Account**'s, and the page size reuses the "my games" cap; - paging is keyset on ended time then id; an unreadable cursor is an input validation error; - lookup is case-insensitive; an unknown or deleted username is the new `PROFILE_NOT_FOUND` refusal (404), in the refusal status table and the controller's refusal table; - the read is public: it opts out of the auth guard, never reads a **Session** or a **Guest**, and passes the origin guard without an Origin (ADR 0028); - it reads the **Account** owner columns only, never joining through claimed **Guests** (ADR 0035). Seam: The RPC wire ## Acceptance criteria - [ ] A new ADR, status accepted, in the repo's ADR format, supersedes ADR 0034 and restates its surviving decisions; ADR 0034's Status reads superseded by it and nothing else in 0034 changes; the ADR index has the new row with precise Governs globs and 0034's row turned to superseded - [ ] The GLOSSARY and code comments that point at ADR 0034 for a surviving decision point at the new ADR - [ ] The profile read answers the username as stored, the join time, and the **Account**'s decided **Games** newest first, each with the **Account**'s **Color**, the winner, the ending and the opponent's name - [ ] A claimed **Guest**'s **Games** are listed, including one decided after the claim for a **Seat** the **Guest** still held - [ ] A **Game** between two **Guests** appears on no profile; an **Account**'s opponent who is a **Guest**, an **Account** or no one (a vacated **Seat**) each comes out as such - [ ] A self-game is listed once - [ ] The answer is identical with and without a **Session** or a **Guest** header, and never holds an email or any other **Account** field - [ ] An unknown username, a deleted **Account** and a username with characters outside the allowed set are each refused as not found, not as a validation error; a username in another case finds the **Account** - [ ] An **Account** with no **Games** answers an empty page with no cursor; exactly one page answers no cursor; one more than a page answers a cursor whose next page holds the last **Game** - [ ] A **Game** decided between two page reads is neither repeated nor skipped; an unreadable cursor is an input validation error - [ ] Each result and ending reads correctly from either **Color** - [ ] The gate is green - [ ] The ADR is this ticket's first commit, before any code it governs
root commented 2026-10-11 16:27:45 +00:00 (Migrated from gitlab.core-project.space)

GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links).

> _GitHub issue relations, imported as "related" links (GitLab CE has no sub-issues or blocking links)._ <!-- github-relations --> - Parent (sub-issue of): #366 - Blocked by: #388, #386 - Blocking: #390
root commented 2026-10-13 08:39:52 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #390

mentioned in issue #390
root commented 2026-10-13 08:41:23 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #366

mentioned in issue #366
root commented 2026-10-13 08:41:29 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #386

mentioned in issue #386
root commented 2026-10-13 08:41:30 +00:00 (Migrated from gitlab.core-project.space)

mentioned in issue #388

mentioned in issue #388
root commented 2026-10-13 08:42:31 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #366

marked this issue as related to #366
root commented 2026-10-13 08:42:42 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #386

marked this issue as related to #386
root commented 2026-10-13 08:42:43 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #388

marked this issue as related to #388
root commented 2026-10-13 08:42:43 +00:00 (Migrated from gitlab.core-project.space)

marked this issue as related to #390

marked this issue as related to #390
root commented 2026-10-15 09:22:54 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit db9e1fdf59

mentioned in commit db9e1fdf59979914f98512e640997a6531124592
root commented 2026-10-15 09:22:54 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit d90d1c04a4

mentioned in commit d90d1c04a4fdaad3429326475fe9baf1223c3520
root commented 2026-10-15 09:22:54 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 4c3398c3c2

mentioned in commit 4c3398c3c269f8af6ae4f65bb7df504766a00456
root commented 2026-10-15 09:22:54 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 26a3ed3b6a

mentioned in commit 26a3ed3b6ac53ce3568535a5c6189f9dead56547
root commented 2026-10-15 09:22:55 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 0cb053dbe9

mentioned in commit 0cb053dbe9ea81eb8289e0e6bd923455e1bcb61f
root commented 2026-10-15 09:22:55 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 92db661c71

mentioned in commit 92db661c7195febb26f2774d2c32446147c4531f
root commented 2026-10-15 09:22:55 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit 3ac3237f08

mentioned in commit 3ac3237f08e27eb8495e39846cf0c4fa2a00a6b3
root commented 2026-10-15 09:22:56 +00:00 (Migrated from gitlab.core-project.space)

mentioned in commit febccf71f7

mentioned in commit febccf71f7fe7837475351786c312562b568b9f9
root commented 2026-10-15 09:23:10 +00:00 (Migrated from gitlab.core-project.space)

mentioned in merge request !531

mentioned in merge request !531
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-15 09:44:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
amaurycoudr/chess-project#389
No description provided.