R6(a): de-stage code, docs, READMEs; split stage6_test
Mechanical, behaviour-preserving removal of Stage N / TODO-N / phase (RN) references from comments, doc-comments, service READMEs, the current-state docs (ARCHITECTURE, FUNCTIONAL+_ru, TESTING, UI_DESIGN), config-file comments, and the .fbs/.proto schema comments. PLAN.md / PRERELEASE.md / CLAUDE.md keep the stage history. - Rename the only stage-named identifiers: registerStage8 -> registerSocialOps, registerStage11 -> registerLinkOps (gateway transcode). - Split stage6_test.go: TestEmailLoginFlow -> email_test.go, TestGuestAutoMatchLeavesNoStats (+ provisionGuest) -> account_test.go. - Regenerated proto bindings (push.pb.go, telegram_grpc.pb.go) from the de-staged .proto comments; FB Go/TS bindings unchanged (flatc strips schema comments). go build/vet/gofmt clean across modules; integration typecheck and pnpm check green.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Package connector implements the Telegram gRPC service (pkg/proto/telegram/v1):
|
||||
// the gateway calls ValidateInitData (Mini App auth) and Notify (out-of-app push);
|
||||
// the admin surface (Stage 10) calls SendToUser and SendToGameChannel. The generic
|
||||
// the admin surface calls SendToUser and SendToGameChannel. The generic
|
||||
// methods address a recipient by the identity external_id, so a future platform
|
||||
// connector can implement the same service.
|
||||
//
|
||||
@@ -99,7 +99,7 @@ func (s *Server) ValidateInitData(ctx context.Context, req *telegramv1.ValidateI
|
||||
|
||||
// ValidateLoginWidget verifies Login Widget authorization data against each bot's
|
||||
// token in turn and returns the user identity, for attaching a Telegram identity to
|
||||
// an existing account (Stage 11).
|
||||
// an existing account.
|
||||
func (s *Server) ValidateLoginWidget(ctx context.Context, req *telegramv1.ValidateLoginWidgetRequest) (*telegramv1.ValidateLoginWidgetResponse, error) {
|
||||
var lastErr error
|
||||
for _, lang := range s.order {
|
||||
|
||||
@@ -26,7 +26,7 @@ const defaultMaxAge = 24 * time.Hour
|
||||
|
||||
// User is the identity extracted from a validated initData payload. ExternalID is
|
||||
// the Telegram user id used as the identities external_id; LanguageCode seeds a
|
||||
// new account's preferred language (Stage 9).
|
||||
// new account's preferred language.
|
||||
type User struct {
|
||||
ExternalID string
|
||||
Username string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Package loginwidget validates Telegram Login Widget authorization data, the
|
||||
// web (non-Mini-App) sign-in flow used to attach a Telegram identity to an existing
|
||||
// account during linking (Stage 11). Like initdata it lives in the connector
|
||||
// account during linking. Like initdata it lives in the connector
|
||||
// because the secret is derived from the bot token, held only here
|
||||
// (ARCHITECTURE.md §12); the gateway calls the connector's ValidateLoginWidget RPC.
|
||||
//
|
||||
|
||||
@@ -53,7 +53,7 @@ func Render(kind string, payload []byte, lang string) (Message, bool) {
|
||||
return Message{}, false
|
||||
}
|
||||
|
||||
// yourTurnText renders the enriched "your turn" body (Stage 17), voiced as the opponent who
|
||||
// yourTurnText renders the enriched "your turn" body, voiced as the opponent who
|
||||
// just moved ("{name}: my move — «WORD». Score 120:95"). It falls back to the plain phrase when
|
||||
// the opponent name is missing (an older backend, or an unresolved name).
|
||||
func yourTurnText(ev *scrabblefb.YourTurnEvent, p phrases) string {
|
||||
@@ -76,7 +76,7 @@ func yourTurnText(ev *scrabblefb.YourTurnEvent, p phrases) string {
|
||||
}
|
||||
}
|
||||
|
||||
// gameOverText renders the "game over" body (Stage 17) from the recipient's own perspective.
|
||||
// gameOverText renders the "game over" body from the recipient's own perspective.
|
||||
func gameOverText(ev *scrabblefb.GameOverEvent, p phrases) string {
|
||||
score := string(ev.ScoreLine())
|
||||
switch string(ev.Result()) {
|
||||
|
||||
Reference in New Issue
Block a user