From 40ccfb951458b731db6d755cb54b80ca0c47dbf4 Mon Sep 17 00:00:00 2001 From: Ilia Denisov Date: Wed, 10 Jun 2026 17:32:30 +0200 Subject: [PATCH] R6: mark phase done in PRERELEASE.md + log refinements --- PRERELEASE.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/PRERELEASE.md b/PRERELEASE.md index a515a7b..8f3fe12 100644 --- a/PRERELEASE.md +++ b/PRERELEASE.md @@ -22,7 +22,7 @@ the edge before prod. Each phase maps back to the owner's raw pre-release TODO l | R3 | Edge hardening | 2 + 8 + 3 | **done** | | R4 | Push enrichment + kill the last poll | 4 + 5 | **done** | | R5 | Bundle slimming | 6 | **done** | -| R6 | Refactor + docs reconciliation + de-staging | 7 | todo | +| R6 | Refactor + docs reconciliation + de-staging | 7 | **done** | | R7 | Final stress run + tuning | 9b | todo | | → | Stage 18 — prod contour deploy | — | see [`PLAN.md`](PLAN.md) | @@ -156,7 +156,7 @@ landing (≈24 KB) is reported separately and kept minimal. Same CLI + exit-code step is unchanged. - Critical files: `ui/scripts/bundle-size.mjs`; no app code changed. -### R6 — Refactor + docs reconciliation + de-staging *(TODO 7)* — near last +### R6 — Refactor + docs reconciliation + de-staging *(TODO 7)* — done Behaviour-preserving only. Three separable, separately-committed passes: (a) mechanical **de-staging** — remove `Stage N`/`TODO-N` references from code, comments and service READMEs (rename `stage6_test.go`); (b) **docs↔code reconciliation** — reconcile @@ -348,3 +348,35 @@ Then Stage 18. app total (≈97) and landing total (≈24.5). Same CLI + exit-code contract, so the CI step is unchanged. - **No app/source/build change** (`App.svelte`, `lib/i18n/`, `vite.config.ts` untouched); no schema change, no contour wipe. The stale "~82 KB" figure was corrected in `bundle-size.mjs` and `ui/README.md`. + +- **R6** (interview + implementation): + - **Locked decisions:** apply **both** wire/code structural changes (**B** + **A**) and **only C1+C2** of + the test consolidation (not C3/C5); strip the `*(Stage N)*` tags from **all current-state docs** + (ARCHITECTURE / FUNCTIONAL+`_ru` / TESTING / UI_DESIGN), keeping PLAN.md / PRERELEASE.md / CLAUDE.md as + history; **split `stage6_test.go`** by domain. The `h2cMaxConcurrentStreams` sizing stays an **R7** + concern (tuning, not behaviour-preserving); the R2 early run forced no code fix, so nothing was carried in. + - **(a) De-staging:** removed the `Stage N` / `TODO-N` / `(RN)` references across code, comments, service + READMEs and the current-state docs, rewording narratives to present tense (no technical content lost). + Renamed the only stage-named identifiers (`registerStage8`→`registerSocialOps`, + `registerStage11`→`registerLinkOps`) and split `stage6_test.go` (`TestEmailLoginFlow`→`email_test.go`; + `TestGuestAutoMatchLeavesNoStats`+`provisionGuest`→`account_test.go`). De-staged the `.fbs`/`.proto` + comments and regenerated: only the `.proto`-derived Go docstrings (`*_grpc.pb.go`, `push.pb.go`) changed — + flatc strips schema comments, so the FB Go/TS bindings were untouched. + - **(b) Reconciliation:** the docs were accurate (each R-phase baked its own); the one drift was a stale + "guest-reaping deferred (TODO-3)" note in `ARCHITECTURE.md` §3 — guest reaping is implemented, so the + note was replaced with the current behaviour (FUNCTIONAL/TESTING already described it). + - **(c) B — dead `opponent_moved` scalars:** removed `seat/action/score/total` from `OpponentMovedEvent` + (`pkg/fbs/scrabble.fbs` + the `notify` emit + the round-trip test); regenerated FB Go + TS. No reader + used them (the UI codec/mock take `move`/`game`/`bag_len`; the gateway forwards the payload verbatim). + A pre-release wire-slot renumber — free with no prod data, no DB change. + - **(c) A — shared FB builders:** new `scrabble/pkg/wire` holds the single definition of the nested wire + tables (GameView / MoveRecord / StateView / AccountRef / Invitation) shared by the backend `notify` + encoder and the gateway `transcode`; both map their own source types to neutral `wire.*` structs and + delegate. **Honest tradeoff:** the verbose `Start/Add/End` + reverse-prepend boilerplate is now written + once, but the field *set* is still mapped per side, and the new package makes the change net **+~145 LOC** + — a single-source / anti-drift win for the fiddly mechanics rather than a line-count cut. Behaviour- + preserving: the two sides' field sets were verified identical and the round-trip tests pass unchanged. + - **(c) C1+C2 — inttest fixtures:** moved the cross-file service/game fixtures (`newGameService` was used by + 10 files) into `backend/internal/inttest/helpers.go`; single-file helpers stay local. Pure relocation. + - **No schema change → no contour DB wipe.** Regression gate: the full unit + integration + UI suites plus + the R7 stress run.