Skip to content

Fix game session delivery and modernize platform dependencies - #147

Merged
seenu-k merged 7 commits into
mainfrom
codex/platform-probe-fixes
Oct 29, 2026
Merged

seenu-k merged 7 commits into
mainfrom
codex/platform-probe-fixes

Conversation

@seenu-k

@seenu-k seenu-k commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Starting a game could return no frame to its creator, imported bot actions could return the bot's view to the human caller, and stopped connections could leave the app showing a spinner. Return complete sessions projected for the authenticated recipient, feed HTTP responses into the same serialized client coordinator as socket updates, and show actionable connection failures.

This change also fixes generator cleanup and account deletion, adopts the released Firebase registration APIs, and updates the platform's dependencies and generated artifacts. The disposable Rival Courts game used to exercise the platform stays outside the repository.

Changes

  • Session correctness: separate the acting seat from the response recipient; include the creator's initial frame; preserve human projections for imported bot moves and outcomes across rating transitions. Remove the redundant read after solo start. HTTP responses, socket snapshots and cold reads agree for the same recipient and sequence.
  • Client coordination and recovery: GameRepository automatically delivers HTTP sessions into its serialized session/gap pipeline. Remove the caller-supplied inject stream. Retry transient transport/service errors with backoff, stop on permanent errors, retain HTTP status in diagnostics, and disable the second Riverpod retry loop. Show a persistent error with Retry even when a cached frameless session exists. A same-sequence reconnect clears the error without replaying a move.
  • Generated fixtures: the output directory is wholly generator-owned. Validate before replacing it, remove stale files on regeneration, reject extra files in check mode, and refuse a directory containing the input contract or Dart output. Normalize fixture paths; keep authored fixtures in the server contract rather than an ownership manifest.
  • Database access: use typed Drizzle predicates, aggregates and subqueries for search, relationship sync, revision guards and commerce queries. Preserve atomic quota/slot allocation and transactional batching. Replace raw Drift account-cleanup deletes with typed, account-scoped deletes so watchers are notified and other accounts remain intact. Retain SQL expressions where needed for atomic or expressive operations; no database schema migration is introduced.
  • Firebase: use register, onRegistered and onUnregistered directly and delete four custom compatibility files. Keep Installations for device cleanup. Add coverage for registration, unregistration and account changes; no legacy token fallback is introduced.
  • Scaffolding and builds: let Pub resolve Firebase Core with the selected adapter; replace workbox-cli with the supported workbox-build Node API, preserving precaching and removing the obsolete tmp override. Update the scaffold harness, FVM pins, lifecycle-script policies, Biome configuration and CI package-manager pins. Keep bot registration manual and fix documented inserts to supply created_at.
  • Documentation and release preparation: regenerate Worker bindings, Drift web assets and API references; add Changesets and Cider Unreleased entries; document upgrade decisions, remaining blockers and the coordinated Dart/npm release sequence. Preserve main's already-published shell 0.7.3 and scaffolder 0.17.7 versions after rebasing.

Dependency updates

Updates were made with package-manager/framework CLIs and reviewed against upstream release notes. Key selections:

Area Selected versions / migration
Flutter toolchain Flutter 3.47.7 / Dart 3.13.5; pnpm 12.15.0
Firebase Core 5.1.0, Auth 7.0.1, Analytics 13.0.1, Crashlytics 6.0.1, Installations 0.5.1, Messaging 17.0.1
Flutter integrations local notifications 22.3.3, image cropper 13.0.0, go_router 18.1.1, Play Billing adapter 0.5.5, cached network image 4.0.5
Persistence Drift 2.35.3 / drift_dev 2.35.2 and matching web runtime assets
Workers and tests Wrangler 4.153.0, workers-types 5.20261026.1, Cloudflare Vitest plugin 1.4.8, Vitest/coverage 5.0.5, tsdown 0.23.2
Build/runtime/docs Workbox 7.4.1, Biome 2.6.3, Hono 4.13.14, jose 6.2.13, Zod 4.6.7, React 19.3.1, Sass 1.106.1, typedoc-plugin-markdown 4.14.1

Compatible transitive ranges were refreshed. TypeScript stays at 6.0.3 because stable TS7 cannot satisfy the current declaration/docs toolchain. Dart analyzer upgrades and Android built-in Kotlin remain blocked by their owning dependencies; no overrides force incompatible graphs. Drizzle itself is unchanged.

See the complete dependency review and remaining upstream/tooling audit blockers.

Validation

Validated locally after rebasing onto main 23932b73:

  • Ran ./tool/check.sh: server build/typecheck and 733 tests; Dart client 191 tests plus 21 Chrome tests; codegen 16; Flutter framework 175 and example 37; shell 120; Firebase 44.
  • Verified OpenAPI/client/Worker/Drift generation, migration drift, package publication dry runs and Dart documentation.
  • Fresh scaffold: Worker typecheck and 9 tests, Flutter analysis and 10 tests, Android release APK, Flutter web release and Workbox precache verification.
  • The first full run found stale TypeDoc source links. Regenerated and committed them, then reran the complete web shard successfully, including reference drift, typecheck and production build. The combined first run exited nonzero for that corrected documentation drift.
  • Earlier disposable Flutter-web probe verified two-player simultaneous play, matching terminal results, solo bot play, forfeit, persistent connection errors and Retry recovery. HTTP probes covered recipient projections, idempotent creation, version checks, seat authorization, contiguous replay and a full bot match.

Real Firebase/APNs push delivery still requires configured credentials and is not established by these tests. Existing non-failing upstream lint/doc warnings and development-tool audit findings are documented; no hosted application was deployed.

Release notes

This PR retains published package versions; release workflows own version changes. GameRepository.sessions removing inject, the generator's exclusive fixture-directory ownership, and the Firebase dependency/API transition require a breaking Dart release.

After this PR merges, dispatch Version Dart packages with bump=major (the next minor version for these pre-1.0 packages), merge its generated PR, and wait for pub.dev uploads. Then merge the refreshed npm version PR so one scaffolder release includes the new Dart floors. Current Dart changes use the already-published eigen_api models, so Dart can publish first.

Expected releases, absent intervening changes: eigen_client 0.9.0, eigen_codegen 0.2.0, eigen_flutter 0.17.0, eigen_shell 0.8.0, eigen_firebase 0.7.0; engine packages and eigen_api 0.12.1; create-eigen-game 0.17.8. Finish by verifying registry versions and a fresh scaffold without local overrides.

@seenu-k
seenu-k enabled auto-merge (squash) October 29, 2026 12:03
@seenu-k
seenu-k merged commit 9ccdb0e into main Oct 29, 2026
11 checks passed
@seenu-k
seenu-k deleted the codex/platform-probe-fixes branch October 29, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant