Skip to content

Commit f76f97f

Browse files
committed
docs: record session timing channel PR
1 parent c9b4199 commit f76f97f

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

docs/IMPLEMENTATION_PLAN.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@
1515

1616
## 1. Current status at a glance
1717

18-
| Phase | Status | Branch / PR | Notes |
19-
| ----------------------------------------------------- | ------------------------ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20-
| **Phase 0 replay follow-up** | CAPTURED | `chore/telemetry-performance-report` | Deterministic native replay separates observer, empty/no-delivery, empty/delivery, full dashboard, raw payload, and focused widget costs. The existing allowlist is essential; empty delivery has a measurable IPC/store allocation floor; full CPU and memory are dominated downstream by widget/Chromium work. See `TELEMETRY_PERFORMANCE_REPORT.html`. |
21-
| **Phase 0 — Measure** | DONE | | Baseline captured in `PERFORMANCE_TEST_SUMMARY.md`; revised 2026-05-12 after Practice 2 |
22-
| **Phase 0.5 — Stop the bleeding** | LANDED (partial) | merged on `main` | S1/S2 landed; S3/S4/L1/L2/L3/P6 still open |
23-
| **Phase 1 — Cheap perf wins + lifecycle bones** | LANDED | merged on `main` | P1/P2/P4 typed subs, P5 propsAreEqual, IPC allowlist, SessionLifecycle skeleton, useResetOnDisconnect activated. Practice 3: Primary slope −85%; Standings became the sole remaining leak source |
24-
| **Phase 2a Tier 1 — PitLapStore + LapTimes hygiene** | LANDED | `feat/phase-2a-tier1-allocations` | H3 + H4. Practice 5: Left renderer slope dropped from +13.0 → +0.7 MB/min (95% reduction, under target). PCC race confirms +5.7 MB/min app slope during 20-min race phase (under <+5 target). |
25-
| **Phase 2a H1 — createStandings rewrite** | LANDED | `feat/phase-2a-h1-standings-rewrite` | O(N²) → O(N) `find()` removal; `groupStandingsByClass` Map-based; `useReferenceLapStore.getState()` hoisted out of inner loop. 2026-05-16 Clio Cup VIR test: no regression vs Tier 1, Standings CPU 2.3% vs 3.1% baseline. Memory benefit not isolable. |
26-
| **Phase 2a Tier 2a — Disconnect leave cleanup** | LANDED | `feat/phase-2a-tier2-disconnect-cleanup` | `sessionLifecycle._onDisconnect` emits synthetic per-driver leaves; `useDriverLivePositions` clears driver-keyed refs on `running` true→false. **GR86 Miami 2026-05-18 validated**: 196 `Driver left (disconnect)` lines symmetric with 196 joins, 4 `Released N per-driver slots` summaries match 4 disconnect events. |
27-
| **Phase 2a Tier 2b — Reference-lap dedup** | LANDED | `feat/phase-2a-tier2-reflap-dedup` | Main-process in-memory cache + debounced async write. Collapses 3× per-renderer save bursts into one async write. **Note**: PCC, SFL, combined PR, and Miami tests all still show 3× clusters in renderer-side log lines — filesystem-level write count verification still needed to confirm debounce is engaging at the FS layer. |
28-
| **Phase 2a integration PR** | READY TO MERGE | `feat/phase-2a-integration` | Cherry-picks of Tier 1 + H1 + Tier 2a + Tier 2b + post-test docs + 2026-05-17 follow-ups (disconnect log line, empty-Drivers guard, bridge stale-state nulling) + 2026-05-19 R1+R2 (reference-lap fetch dedup, post-debounce write log). Combined PR test 2026-05-17 owner-confirmed good; spectated PCC 2026-05-18 confirms architectural state. **809/809 tests pass.** |
29-
| **Phase 2a mid-session leave detection** (2026-05-18) | DECLINED & REVERTED | | Identity-key approach was implemented and tested 2026-05-18, then declined the same day after cost/benefit review (see [`PERFORMANCE_TEST_LOG.md`](./PERFORMANCE_TEST_LOG.md) §4 "Declined for fix"). Working-tree changes reverted 2026-05-19 before any commit landed on the integration branch. Preserved here for institutional memory; no further action. |
30-
| **Phase 2a remaining items** | R1+R2 LANDED, R3 PENDING | `feat/phase-2a-integration` for R1+R2 | R1 (reference-lap fetch dedup) + R2 (post-debounce write log) landed 2026-05-19. R3 (Empty Dashboard substrate baseline test) is a test run, not code work — pending. |
31-
| **Phase 2b — Architectural cleanup (remaining)** | NOT STARTED | | A1, A4, A5, A6, A7 completion, A9. Lower urgency now Standings memory issue is resolved |
32-
| **Phase 3 — Channel-based bridge** | LANDED; MEMORY GATE OPEN | PRs #646, #649#652, #656, #658 | Typed rate-aware channels, per-window subscriptions, deterministic replay validation, Fuel processor/renderer migration, conditional legacy telemetry, and performance instrumentation are on `main`. The Fuel-only A/B removed legacy deliveries and reduced app-wide renderer wake-ups by 42.4%; both baseline and candidate still failed the memory-slope gate. |
33-
| **Phase 4 — Main-process processors** | IN PROGRESS | PRs #659#666; `feat/session-bar-channel` | Fuel, lap times, car speeds, reference laps, relative gaps, sector timing, Standings core state, live positions, and radio are on `main`. Session timing is moving to a demand-driven channel now; auxiliary Session Bar telemetry and legacy telemetry removal or development-only restriction remain. |
34-
| **Phase 5 — Worker-thread SDK loop** | NOT STARTED | | |
35-
| **Phase 6 — Native optimisations** | DEFERRED | | Only if Phase 4 profiling demands |
18+
| Phase | Status | Branch / PR | Notes |
19+
| ----------------------------------------------------- | ------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20+
| **Phase 0 replay follow-up** | CAPTURED | `chore/telemetry-performance-report` | Deterministic native replay separates observer, empty/no-delivery, empty/delivery, full dashboard, raw payload, and focused widget costs. The existing allowlist is essential; empty delivery has a measurable IPC/store allocation floor; full CPU and memory are dominated downstream by widget/Chromium work. See `TELEMETRY_PERFORMANCE_REPORT.html`. |
21+
| **Phase 0 — Measure** | DONE || Baseline captured in `PERFORMANCE_TEST_SUMMARY.md`; revised 2026-05-12 after Practice 2 |
22+
| **Phase 0.5 — Stop the bleeding** | LANDED (partial) | merged on `main` | S1/S2 landed; S3/S4/L1/L2/L3/P6 still open |
23+
| **Phase 1 — Cheap perf wins + lifecycle bones** | LANDED | merged on `main` | P1/P2/P4 typed subs, P5 propsAreEqual, IPC allowlist, SessionLifecycle skeleton, useResetOnDisconnect activated. Practice 3: Primary slope −85%; Standings became the sole remaining leak source |
24+
| **Phase 2a Tier 1 — PitLapStore + LapTimes hygiene** | LANDED | `feat/phase-2a-tier1-allocations` | H3 + H4. Practice 5: Left renderer slope dropped from +13.0 → +0.7 MB/min (95% reduction, under target). PCC race confirms +5.7 MB/min app slope during 20-min race phase (under <+5 target). |
25+
| **Phase 2a H1 — createStandings rewrite** | LANDED | `feat/phase-2a-h1-standings-rewrite` | O(N²) → O(N) `find()` removal; `groupStandingsByClass` Map-based; `useReferenceLapStore.getState()` hoisted out of inner loop. 2026-05-16 Clio Cup VIR test: no regression vs Tier 1, Standings CPU 2.3% vs 3.1% baseline. Memory benefit not isolable. |
26+
| **Phase 2a Tier 2a — Disconnect leave cleanup** | LANDED | `feat/phase-2a-tier2-disconnect-cleanup` | `sessionLifecycle._onDisconnect` emits synthetic per-driver leaves; `useDriverLivePositions` clears driver-keyed refs on `running` true→false. **GR86 Miami 2026-05-18 validated**: 196 `Driver left (disconnect)` lines symmetric with 196 joins, 4 `Released N per-driver slots` summaries match 4 disconnect events. |
27+
| **Phase 2a Tier 2b — Reference-lap dedup** | LANDED | `feat/phase-2a-tier2-reflap-dedup` | Main-process in-memory cache + debounced async write. Collapses 3× per-renderer save bursts into one async write. **Note**: PCC, SFL, combined PR, and Miami tests all still show 3× clusters in renderer-side log lines — filesystem-level write count verification still needed to confirm debounce is engaging at the FS layer. |
28+
| **Phase 2a integration PR** | READY TO MERGE | `feat/phase-2a-integration` | Cherry-picks of Tier 1 + H1 + Tier 2a + Tier 2b + post-test docs + 2026-05-17 follow-ups (disconnect log line, empty-Drivers guard, bridge stale-state nulling) + 2026-05-19 R1+R2 (reference-lap fetch dedup, post-debounce write log). Combined PR test 2026-05-17 owner-confirmed good; spectated PCC 2026-05-18 confirms architectural state. **809/809 tests pass.** |
29+
| **Phase 2a mid-session leave detection** (2026-05-18) | DECLINED & REVERTED || Identity-key approach was implemented and tested 2026-05-18, then declined the same day after cost/benefit review (see [`PERFORMANCE_TEST_LOG.md`](./PERFORMANCE_TEST_LOG.md) §4 "Declined for fix"). Working-tree changes reverted 2026-05-19 before any commit landed on the integration branch. Preserved here for institutional memory; no further action. |
30+
| **Phase 2a remaining items** | R1+R2 LANDED, R3 PENDING | `feat/phase-2a-integration` for R1+R2 | R1 (reference-lap fetch dedup) + R2 (post-debounce write log) landed 2026-05-19. R3 (Empty Dashboard substrate baseline test) is a test run, not code work — pending. |
31+
| **Phase 2b — Architectural cleanup (remaining)** | NOT STARTED || A1, A4, A5, A6, A7 completion, A9. Lower urgency now Standings memory issue is resolved |
32+
| **Phase 3 — Channel-based bridge** | LANDED; MEMORY GATE OPEN | PRs #646, #649#652, #656, #658 | Typed rate-aware channels, per-window subscriptions, deterministic replay validation, Fuel processor/renderer migration, conditional legacy telemetry, and performance instrumentation are on `main`. The Fuel-only A/B removed legacy deliveries and reduced app-wide renderer wake-ups by 42.4%; both baseline and candidate still failed the memory-slope gate. |
33+
| **Phase 4 — Main-process processors** | IN PROGRESS | PRs #659#667 | Fuel, lap times, car speeds, reference laps, relative gaps, sector timing, Standings core state, live positions, and radio are on `main`. Session timing is in PR #667; auxiliary Session Bar telemetry and legacy telemetry removal or development-only restriction remain. |
34+
| **Phase 5 — Worker-thread SDK loop** | NOT STARTED || |
35+
| **Phase 6 — Native optimisations** | DEFERRED || Only if Phase 4 profiling demands |
3636

3737
---
3838

@@ -275,7 +275,7 @@ Today every renderer wakes 25 times/sec regardless of what's mounted. A weather
275275
- [x] Standings live-position projection — PR #665
276276
- [x] Radio transmit state — `radio.snapshot`, event-driven and demand-activated; PR #666
277277
- [ ] Session-bar telemetry migration
278-
- [ ] Shared race/session timing projection — `session-timing.snapshot`, demand-driven at 5 Hz; `feat/session-bar-channel` in progress
278+
- [x] Shared race/session timing projection — `session-timing.snapshot`, demand-driven at 5 Hz; PR #667 in review
279279
- [ ] Auxiliary items still reading legacy telemetry (weather, fuel/units, brake bias, incidents, lap results, and player position)
280280
- [ ] Legacy `'telemetry'` channel removed or dev-only
281281

@@ -468,7 +468,7 @@ LLM agents: read this file at the start of any session that touches the architec
468468

469469
## 6. Activity log
470470

471-
- **2026-08-09** — PR #666 merged. Started the next Phase 4 slice by moving shared Session Bar race/session timing derivation from React into a demand-driven 5 Hz `session-timing.snapshot`, shared with the existing lap-times runtime and wired for live/tape plus mock sources. Auxiliary Session Bar telemetry remains a follow-up before the legacy stream can be restricted — `feat/session-bar-channel` — in progress
471+
- **2026-08-09** — PR #666 merged. Opened PR #667 for the next Phase 4 slice: move shared Session Bar race/session timing derivation from React into a demand-driven 5 Hz `session-timing.snapshot`, shared with the existing lap-times runtime and wired for live/tape plus mock sources. Auxiliary Session Bar telemetry remains a follow-up before the legacy stream can be restricted — `feat/session-bar-channel` — in review
472472

473473
- **2026-08-09** — PR #665 merged. Opened PR #666 for the next explicit Phase 4 slice: move bursty `RadioTransmitCarIdx` state to a demand-activated, event-driven `radio.snapshot` channel while retaining renderer-configured icon persistence. Session-bar migration follows; legacy telemetry restriction/removal remains the Phase 4 exit step — `feat/radio-channel` — in review
474474

0 commit comments

Comments
 (0)