---
phase: 06-client-rebuild-mvp-gate-cli-08-hard-milestone
plan: 12
subsystem: docs
tags: [reconnect, cookie-auto-login, blank-render, debug-findings, doc-only]
dependency_graph:
  requires: [".planning/debug/reconnect-blank-render.md"]
  provides: [".planning/phases/06-client-rebuild-mvp-gate-cli-08-hard-milestone/06-12-DEBUG-FINDINGS.md"]
  affects: ["06-15-PLAN.md (consumer)"]
tech_stack:
  added: []
  patterns: ["diagnose-first, document-then-fix"]
key_files:
  created:
    - .planning/phases/06-client-rebuild-mvp-gate-cli-08-hard-milestone/06-12-DEBUG-FINDINGS.md
  modified: []
decisions:
  - "Secondary defect (stale InputDispatcher.room after silent_reauth) folded into 06-15 scope per CONTEXT addendum line 361 — not deferred to backlog"
  - "Option A (thread sessionToken through BootScene→LoginScene→GameScene) + Option B (GameScene self-heal via getSession()) both recommended to 06-15 as complementary — not alternatives"
  - "5-item regression test checklist (not 4) — plan §6 specifies 4 but the secondary defect adds a 5th unit test; the §6 heading says five numbered tests matching the plan body requirement"
metrics:
  duration: "3 minutes"
  completed: "2026-05-11T05:49:51Z"
  tasks_completed: 1
  tasks_total: 1
  files_created: 1
  files_modified: 0
---

# Phase 6 Plan 12: Reconnect / Cookie Auto-Login Debug Findings Consolidation Summary

Distilled the `/gsd-debug` diagnose-only output into a phase-local input contract (`06-12-DEBUG-FINDINGS.md`) so plan 06-15 can consume root cause, fix shape, secondary defect, and regression test checklist verbatim without re-deriving the diagnosis.

## Tasks

| Task | Name | Commit | Files |
|------|------|--------|-------|
| 1 | Write 06-12-DEBUG-FINDINGS.md per section contract | 4af9428 | `.planning/phases/06-client-rebuild-mvp-gate-cli-08-hard-milestone/06-12-DEBUG-FINDINGS.md` |

## What Was Produced

**`06-12-DEBUG-FINDINGS.md`** shipped at the canonical phase-local path with all required sections §0-§8:

- **§0** cites `.planning/debug/reconnect-blank-render.md` as `status: root_caused`, operator UAT trigger, and confirms zero source-file edits.
- **§1** describes both reconnect paths (tab reload, WS kill + grace expiry) and observable consequences (`data-game-ready` never set, no WS in DevTools, chat hint fades).
- **§2** provides the root cause statement plus seven verbatim evidence anchors (BootScene:78-95, LoginScene:106-109, GameScene:191-192, auth/client.ts:84-108, colyseus-client.ts:82-99, reconnect.ts:100, RebnoRoom.ts:267-269) and explains why all secondary symptoms derive from the single early-return.
- **§3** 7-row affected-files table with Edited-by-06-15 column.
- **§4** Option A (3 edits through BootScene→LoginScene→GameScene) + Option B (GameScene self-heal via `getSession()`) with concrete code sketches; ships-both recommendation.
- **§5** Secondary defect: `if (!this.inputDispatcher)` guard at GameScene.ts:238-252 keeps stale room ref after silent_reauth. Fix sketch: `InputDispatcher.setRoom(room)` called on non-first connect paths. Unit-test sketch included.
- **§6** 5-item regression test checklist for 06-15 (2 unit tests + 2 e2e + 1 secondary-defect unit).
- **§7** Three out-of-scope bullets (server bearer posture correct, future cookie-WS-auth refactor deferred, reconnect-banner UX timing separate).
- **§8** All referenced file paths + global debug doc + phase artifacts.

## Clarifications Added Beyond Global Debug Doc

The global debug doc (`reconnect-blank-render.md:201`) marked the secondary defect (`InputDispatcher` stale room) as **"out of scope for 06-15 — flag for backlog"**. Per CONTEXT addendum line 361, this plan explicitly folds the secondary defect **into 06-15's scope** with a concrete fix sketch and a corresponding 5th regression test. The phase-local doc reflects this scoping change with the section header `§5 Secondary defect (in scope for 06-15 per CONTEXT addendum line 361)`.

## 06-15 Consumption Pointer

Plan 06-15 is the sole consumer. Its `<context>` block names `06-12-DEBUG-FINDINGS.md`; its tasks should consume:
- §2 for root cause + evidence anchors
- §3 for affected-files edit list
- §4 for Option A edit instructions (primary) + Option B guard (defence in depth)
- §5 for InputDispatcher.setRoom fix and unit-test sketch
- §6 for the 5-item regression test checklist (verbatim — do not invent alternatives)

## Trace Tag Verification

`pnpm trace:check` output for the two tagged requirements (run post-commit):

```
[OK] REQ-CLI-04  required: [doc, impl, unit]  stages: +doc +impl +unit +int
[OK] REQ-CLI-09  required: [doc, impl, int]  stages: +doc +impl +unit +int
```

Both `REQ-CLI-04` and `REQ-CLI-09` show `+doc` satisfied. The `impl`/`unit`/`int` stages for REQ-CLI-09 will be completed by 06-15.

## Deviations from Plan

None — plan executed exactly as written. The only clarification is the secondary-defect scoping (folded into 06-15 per CONTEXT addendum line 361) which was the intent of the gap-closure planner.

## Threat Surface Scan

No new network endpoints, auth paths, file access patterns, or schema changes. This is a doc-only plan. No threat flags.

## Self-Check: PASSED

- `06-12-DEBUG-FINDINGS.md` exists: FOUND
- Commit 4af9428 exists: FOUND
- `pnpm trace:check` REQ-CLI-04 + REQ-CLI-09: `+doc` both satisfied
- Zero source-file modifications: CONFIRMED (git status shows only the new .md)
