Skip to content

refactor: remove game phaser fixture - #30

Merged
imjlk merged 8 commits into
mainfrom
codex/remove-game-phaser-fixture
Jul 8, 2026
Merged

imjlk merged 8 commits into
mainfrom
codex/remove-game-phaser-fixture

Conversation

@imjlk

@imjlk imjlk commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Remove the repo-owned apps/game-phaser sample app, its root platform.targets.json fixture, and the old demo graph/assets validation wiring.
  • Move local target validation/build flows to examples/phaser-starter/mpgd.targets.json and update target tooling defaults, smoke checks, and graph presets accordingly.
  • Retarget CI artifact paths and docs from the SDK demo app wording to the starter/project target config flow.

OCR review

  • 902f475 core/tooling commit: OCR reviewed successfully with 0 comments.
  • 9e0b52f CI/workflow commit: OCR initially found the missed iOS artifact path; fixed and reran OCR with 0 comments.
  • 13b6681 docs commit: OCR preview reported only unsupported Markdown files, so no LLM review target.

Validation

  • pnpm check
  • pnpm graph:preflight
  • pnpm build:web
  • pnpm smoke:target web-preview
  • pnpm smoke:effective-config
  • pnpm smoke:adapter-effective-config
  • git diff --check
  • rg -n "apps/game-phaser|game-phaser|validate:game-assets|graph:demo|sdk-demo-loop|platform\.targets\.json|13\.0\.0-rc\.2" -g '!node_modules' -g '!dist' -g '!artifacts' -g '!release-output' (no matches)

Release notes

  • No Sampo changeset: this removes a private repo fixture/sample app and updates root tooling/docs/CI defaults; no publishable package public API, package metadata, runtime contract, or release artifact contract changes.

Summary by CodeRabbit

  • New Features

    • Added a new starter game experience with web app manifest support and updated runtime/platform detection for target-specific builds.
    • Release and CI workflows now package the starter app’s outputs for supported targets.
  • Bug Fixes

    • Updated build artifact paths so published packages include the correct starter outputs.
    • Improved target validation before smoke tests and builds.
  • Documentation

    • Refreshed setup and development docs to point to the new starter workflow and updated command names.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@imjlk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3b55407-9879-4cdf-ac4a-b81789672799

📥 Commits

Reviewing files that changed from the base of the PR and between c36faf4 and 9104e79.

📒 Files selected for processing (3)
  • examples/phaser-starter/src/platform/installStarterPlatform.ts
  • tools/smoke/verify-target-artifacts.ts
  • tools/validate-public-readiness.ts
📝 Walkthrough

Walkthrough

This PR migrates the default game workspace from apps/game-phaser to examples/phaser-starter, removing the old Phaser demo app entirely and repointing CI/CD workflows, root scripts, target config defaults, smoke/validation tooling, and documentation. The starter example gains an async runtime-driven platform installer, PWA manifest, and environment-aware Vite config.

Estimated code review effort: 4 (Complex) | ~60 minutes

Changes

Starter workspace migration

Layer / File(s) Summary
Root script wiring
package.json
check/dev:game and validate/build/smoke scripts repointed to examples/phaser-starter with MPGD_PLATFORM_TARGETS_FILE; graph:demo replaced by graph:starter.
Target config defaults
tools/target/platform-targets.ts, tools/validate-target-config.ts, .gitignore
Default targets filename changes to mpgd.targets.json; error text and ignore rules updated accordingly.
Starter target paths
examples/phaser-starter/mpgd.targets.json
gameApp set to "."; shellApp/webDir/wrapperApp paths made relative to the starter directory for android, ios, ait, and reddit.
CI/CD workflow migration
.github/workflows/build-target.yml, .github/workflows/ci.yml, .github/workflows/release-*.yml
New validate:target-config/validate:effective-config/validate:targets steps added; artifact upload paths repointed to examples/phaser-starter/artifacts and release-output; validate:game-assets step removed from release-devvit.
Smoke/validation tooling
tools/smoke/build-target-artifacts.ts, tools/validate-public-readiness.ts
Cleanup paths updated to starter directories; obsolete apps/game-phaser allowlist entry removed.
App package wiring
apps/target-devvit/package.json, apps/target-web-preview/package.json
Devvit dev:client builds from examples/phaser-starter; web-preview check message updated.
Graph tour requests
tools/graph/requests/starter-loop.json, tools/graph/requests/target-config-runtime.json, tsconfig.graph.json
New starter-loop graph request added; target-config-runtime reworded for starter flow; tsconfig include glob updated.
Documentation
CONTRIBUTING.md, README.md, apps/target-devvit/README.md, docs/GAME_DEVELOPMENT.md, docs/ROADMAP_CHECKLIST.md
Docs updated to describe the starter workflow and remove demo/asset-validation references.
Removed demo app
apps/game-phaser/**
Entire apps/game-phaser app (scenes, platform layer, assets, config) deleted.

Starter Runtime Platform Installer

Layer / File(s) Summary
PWA manifest and env types
examples/phaser-starter/{index.html,public/manifest.webmanifest,src/env.d.ts,package.json}
Adds web manifest, links it from HTML, declares typed game-services env vars, and adds adapter workspace dependencies.
Runtime-driven platform installer
examples/phaser-starter/src/platform/installStarterPlatform.ts, examples/phaser-starter/src/main.ts
installStarterPlatform becomes async, dynamically selects adapters based on runtime.target, with sandbox/debug fallback logic; main.ts detects runtime and awaits the installer.
Vite build config
examples/phaser-starter/vite.config.ts
Config becomes mode-aware, toggling sourcemaps and injecting build-time constants plus output filename patterns.
Devvit artifact allowlisting
tools/smoke/verify-target-artifacts.ts
Adds assertArtifactPathAllowed to permit devvit-web artifacts under the configured wrapperApp.

Sequence Diagram(s)

sequenceDiagram
    participant Main as main.ts
    participant Detector as detectRuntime
    participant Installer as installStarterPlatform
    participant Adapter as Adapter Module (Capacitor/AIT/Devvit/Browser)

    Main->>Detector: detectRuntime()
    Detector-->>Main: RuntimeConfig
    Main->>Installer: await installStarterPlatform(runtimeConfig)
    Installer->>Installer: switch(runtime.target)
    alt android/ios
        Installer->>Adapter: dynamic import Capacitor adapter
    else ait
        Installer->>Adapter: dynamic import AIT adapter (optional fallback bridge)
    else reddit
        Installer->>Installer: shouldUseDevvitSandbox(runtime)
        Installer->>Adapter: dynamic import Devvit adapter (optional sandbox fallback)
    else default
        Installer->>Adapter: dynamic import browser adapter
    end
    Adapter-->>Installer: PlatformGateway
    Installer-->>Main: TargetConfiguredGateway
Loading

Possibly related PRs

  • imjlk/mpgd-kit#1: Adds the validate:starter-workflow script that this PR wires into package.json/CI, sharing the same starter-workflow validation flow.
  • imjlk/mpgd-kit#4: Extends platform installer logic for runtime.target === 'reddit', directly related to installStarterPlatform.ts changes here.
  • imjlk/mpgd-kit#15: Overlaps with changes to tools/smoke/verify-target-artifacts.ts artifact-path allowlisting logic.

Poem

A rabbit hops from demo den to starter ground,
Paths repointed, manifests newly found. 🐇
Async installers pick the platform right,
AIT, Devvit, Capacitor — adapters take flight.
mpgd.targets.json leads the way tonight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the game-phaser fixture.
Description check ✅ Passed The description includes the required summary and validation details, with a release-notes section serving as Notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/remove-game-phaser-fixture

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/release-ait.yml (1)

33-45: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Add the missing target validation steps in release-ait
.github/workflows/release-ait.yml should run validate:target-config, validate:effective-config, and validate:targets before the smoke steps; validate:public is a separate check, and the other release workflows already include these validations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-ait.yml around lines 33 - 45, The release-ait
workflow is missing the target validation checks before the smoke steps. Update
the `release-ait` job to run `validate:target-config`,
`validate:effective-config`, and `validate:targets` in the same validation block
as the existing checks, and keep `validate:public` as a separate step; use the
existing workflow step sequence in `release-ait.yml` to place them before
`smoke:target-config`, `smoke:effective-config`, and
`smoke:adapter-effective-config`.
🧹 Nitpick comments (1)
tools/smoke/verify-target-artifacts.ts (1)

544-546: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider importing platformTargetsFilePath from tools/target/platform-targets.ts instead of duplicating.

This file defines its own platformTargetsFilePath() and platformTargetsFileEnv constant, which duplicate the exported versions in tools/target/platform-targets.ts. Both now default to mpgd.targets.json, but maintaining two copies risks future drift. The exported function accepts an optional path parameter and defaults identically when called without arguments, so it can be used as a drop-in replacement.

♻️ Proposed refactor: import shared function
+import { platformTargetsFilePath, platformTargetsFileEnv } from '../target/platform-targets';

Then remove the local definitions:

-const platformTargetsFileEnv = 'MPGD_PLATFORM_TARGETS_FILE';
-
-function platformTargetsFilePath(): string {
-  return resolve(process.env[platformTargetsFileEnv] ?? 'mpgd.targets.json');
-}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/smoke/verify-target-artifacts.ts` around lines 544 - 546, The local
platform targets path logic in verify-target-artifacts duplicates the shared
implementation from platform-targets.ts, so replace the local
platformTargetsFilePath() and platformTargetsFileEnv usage with the exported
platformTargetsFilePath from tools/target/platform-targets.ts. Update the
callers in this module to use the shared function as a drop-in defaulting
behavior, and remove the duplicated local constant/function so there is a single
source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/release-ait.yml:
- Around line 33-45: The release-ait workflow is missing the target validation
checks before the smoke steps. Update the `release-ait` job to run
`validate:target-config`, `validate:effective-config`, and `validate:targets` in
the same validation block as the existing checks, and keep `validate:public` as
a separate step; use the existing workflow step sequence in `release-ait.yml` to
place them before `smoke:target-config`, `smoke:effective-config`, and
`smoke:adapter-effective-config`.

---

Nitpick comments:
In `@tools/smoke/verify-target-artifacts.ts`:
- Around line 544-546: The local platform targets path logic in
verify-target-artifacts duplicates the shared implementation from
platform-targets.ts, so replace the local platformTargetsFilePath() and
platformTargetsFileEnv usage with the exported platformTargetsFilePath from
tools/target/platform-targets.ts. Update the callers in this module to use the
shared function as a drop-in defaulting behavior, and remove the duplicated
local constant/function so there is a single source of truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 971e4a27-9369-4032-9aa5-8ba45685b946

📥 Commits

Reviewing files that changed from the base of the PR and between 136b282 and 13b6681.

⛔ Files ignored due to path filters (2)
  • apps/game-phaser/public/assets/ui/orb.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (56)
  • .github/workflows/build-target.yml
  • .github/workflows/ci.yml
  • .github/workflows/release-ait.yml
  • .github/workflows/release-android.yml
  • .github/workflows/release-devvit.yml
  • .github/workflows/release-ios.yml
  • .github/workflows/release-microsoft-store.yml
  • .gitignore
  • CONTRIBUTING.md
  • README.md
  • apps/game-phaser/index.html
  • apps/game-phaser/package.json
  • apps/game-phaser/public/manifest.webmanifest
  • apps/game-phaser/src/game/assets/manifest.ts
  • apps/game-phaser/src/game/content/stageConfig.ts
  • apps/game-phaser/src/game/input/actions.ts
  • apps/game-phaser/src/game/input/installGameplayInput.ts
  • apps/game-phaser/src/main.ts
  • apps/game-phaser/src/platform/demoGameServices.ts
  • apps/game-phaser/src/platform/demoState.ts
  • apps/game-phaser/src/platform/installPlatform.ts
  • apps/game-phaser/src/platform/platformEvents.ts
  • apps/game-phaser/src/platform/runtimeDetector.test.ts
  • apps/game-phaser/src/platform/runtimeDetector.ts
  • apps/game-phaser/src/runtime/assetManifest.ts
  • apps/game-phaser/src/runtime/createGame.ts
  • apps/game-phaser/src/runtime/sceneRegistry.ts
  • apps/game-phaser/src/scenes/BootScene.ts
  • apps/game-phaser/src/scenes/GameScene.ts
  • apps/game-phaser/src/scenes/LobbyScene.ts
  • apps/game-phaser/src/scenes/PreloadScene.ts
  • apps/game-phaser/src/scenes/ResultScene.ts
  • apps/game-phaser/src/styles.css
  • apps/game-phaser/src/validation/boundaryGuards.ts
  • apps/game-phaser/src/vite-env.d.ts
  • apps/game-phaser/tsconfig.bundle.json
  • apps/game-phaser/tsconfig.bundle.prod.json
  • apps/game-phaser/tsconfig.json
  • apps/game-phaser/vite.config.ts
  • apps/target-devvit/README.md
  • apps/target-devvit/package.json
  • apps/target-web-preview/package.json
  • docs/GAME_DEVELOPMENT.md
  • docs/ROADMAP_CHECKLIST.md
  • examples/phaser-starter/mpgd.targets.json
  • package.json
  • tools/graph/requests/sdk-demo-loop.json
  • tools/graph/requests/starter-loop.json
  • tools/graph/requests/target-config-runtime.json
  • tools/smoke/build-target-artifacts.ts
  • tools/smoke/verify-target-artifacts.ts
  • tools/target/platform-targets.ts
  • tools/validate-game-assets.ts
  • tools/validate-public-readiness.ts
  • tools/validate-target-config.ts
  • tsconfig.graph.json
💤 Files with no reviewable changes (32)
  • apps/game-phaser/src/scenes/GameScene.ts
  • apps/game-phaser/tsconfig.bundle.prod.json
  • apps/game-phaser/src/platform/runtimeDetector.test.ts
  • apps/game-phaser/src/platform/demoState.ts
  • apps/game-phaser/vite.config.ts
  • apps/game-phaser/src/vite-env.d.ts
  • apps/game-phaser/src/scenes/BootScene.ts
  • apps/game-phaser/src/validation/boundaryGuards.ts
  • apps/game-phaser/tsconfig.bundle.json
  • apps/game-phaser/src/platform/demoGameServices.ts
  • tools/validate-public-readiness.ts
  • apps/game-phaser/index.html
  • apps/game-phaser/src/platform/platformEvents.ts
  • apps/game-phaser/src/runtime/createGame.ts
  • apps/game-phaser/src/platform/installPlatform.ts
  • apps/game-phaser/tsconfig.json
  • apps/game-phaser/src/platform/runtimeDetector.ts
  • apps/game-phaser/src/game/input/installGameplayInput.ts
  • apps/game-phaser/src/styles.css
  • apps/game-phaser/src/runtime/assetManifest.ts
  • apps/game-phaser/src/game/content/stageConfig.ts
  • apps/game-phaser/src/runtime/sceneRegistry.ts
  • apps/game-phaser/src/scenes/PreloadScene.ts
  • apps/game-phaser/package.json
  • apps/game-phaser/src/scenes/LobbyScene.ts
  • apps/game-phaser/src/game/assets/manifest.ts
  • tools/graph/requests/sdk-demo-loop.json
  • apps/game-phaser/src/scenes/ResultScene.ts
  • apps/game-phaser/src/game/input/actions.ts
  • apps/game-phaser/src/main.ts
  • tools/validate-game-assets.ts
  • apps/game-phaser/public/manifest.webmanifest

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13b6681b07

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
"create:game": "node tools/run-ttsx.mjs --mpgd-cli packages/cli/src/bin.ts game create",
"build:target": "pnpm i18n:build && node tools/run-ttsx.mjs tools/target/build-target.ts",
"build:target": "pnpm i18n:build && MPGD_PLATFORM_TARGETS_FILE=examples/phaser-starter/mpgd.targets.json node tools/run-ttsx.mjs tools/target/build-target.ts",
"build:web": "pnpm build:target web-preview production",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve caller-provided target config

When a generated game runs mpgd target build ... --targets-file ..., packages/cli prepares .mpgd.targets.generated.json and passes it via MPGD_PLATFORM_TARGETS_FILE into pnpm build:target; this inline assignment replaces that value with examples/phaser-starter/mpgd.targets.json, so the build ignores the caller's game and writes artifacts for the in-repo starter. Use a defaulting mechanism that does not clobber an existing MPGD_PLATFORM_TARGETS_FILE (and mirror it for the smoke scripts) so external target builds keep using their own target file.

Useful? React with 👍 / 👎.

Comment thread tools/smoke/verify-target-artifacts.ts Outdated

function platformTargetsFilePath(): string {
return resolve(process.env[platformTargetsFileEnv] ?? 'platform.targets.json');
return resolve(process.env[platformTargetsFileEnv] ?? 'mpgd.targets.json');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Set the targets file for smoke target builds

pnpm smoke:targets:build runs tools/smoke/build-target-artifacts.ts, which invokes verifyTargetArtifacts() in the same process without setting MPGD_PLATFORM_TARGETS_FILE; after this change the verifier falls back to a root mpgd.targets.json, but the commit removed the root target file and only added examples/phaser-starter/mpgd.targets.json. That means this smoke command fails after the builds complete with a missing targets file, so pass the starter targets file into this script or set the default to the example path for repo-local smoke builds.

Useful? React with 👍 / 👎.

"kind": "capacitor-android",
"gameApp": "apps/game-phaser",
"shellApp": "apps/mobile-capacitor",
"gameApp": ".",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a target-aware game app for native builds

Starting with the android entry, the root/release target builds now bundle examples/phaser-starter for non-web targets, but that app's installStarterPlatform() always constructs createBrowserPlatformGateway() and derives the web-preview config target. As a result android, ios, AIT, and Reddit artifacts no longer instantiate their Capacitor/AIT/Devvit gateways or target runtime even though APP_TARGET is set, so platform-specific identity, storage, commerce, ads, and leaderboard paths are absent from those builds.

Useful? React with 👍 / 👎.

"gameApp": "apps/game-phaser",
"wrapperApp": "apps/target-devvit",
"gameApp": ".",
"wrapperApp": "../../apps/target-devvit",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the Devvit artifact inside the target base

For the Reddit target, build-target.ts writes the release manifest artifact as ${wrapperAppConfigPath}/dist; with this wrapper path relative to examples/phaser-starter, the manifest records ../../apps/target-devvit/dist. The target smoke verifier then resolves it outside the targets-file base and rejects it via assertPathInsideTargetBase, so pnpm build:devvit && pnpm smoke:target reddit in CI/release workflows fails even when the dist files exist.

Useful? React with 👍 / 👎.

"microsoft-store": {
"kind": "web",
"gameApp": "apps/game-phaser",
"gameApp": ".",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore the PWA manifest for Store builds

When the Microsoft Store target now builds examples/phaser-starter, the copied Vite output has no manifest.webmanifest and its index.html has no manifest link, whereas verifyMicrosoftStorePwaManifest() requires both for pnpm smoke:target microsoft-store. This makes the CI/release Store smoke fail after pnpm build:microsoft-store; either keep a Store-ready manifest in the starter or point this target at an app that provides one.

Useful? React with 👍 / 👎.

@imjlk

imjlk commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Patched the CI/review follow-ups:

  • Added a starter PWA manifest.webmanifest and linked it from examples/phaser-starter/index.html, which fixes the failed pnpm smoke:target microsoft-store check.
  • Added the missing validate:target-config, validate:effective-config, and validate:targets steps to release-ait.yml.
  • Reused the shared platformTargetsFilePath helper in tools/smoke/verify-target-artifacts.ts.

Local verification after the patch:

  • pnpm build:microsoft-store
  • pnpm smoke:target microsoft-store
  • pnpm check
  • pnpm smoke:effective-config
  • pnpm smoke:adapter-effective-config
  • git diff --check

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== index.html ==="
fd index.html examples/phaser-starter --exec cat {}

echo "=== manifest.webmanifest ==="
fd manifest.webmanifest examples/phaser-starter --exec cat {}

echo "=== release-ait.yml ==="
cat .github/workflows/release-ait.yml

echo "=== verify-target-artifacts.ts ==="
cat tools/smoke/verify-target-artifacts.ts

Length of output: 24671


@imjlk Thanks for the update — I verified all three follow-ups:

  • examples/phaser-starter/manifest.webmanifest is in place with valid PWA fields, and examples/phaser-starter/index.html correctly links it via <link rel="manifest" href="/manifest.webmanifest" />, satisfying verifyMicrosoftStorePwaManifest's checks.
  • .github/workflows/release-ait.yml now includes pnpm validate:target-config, pnpm validate:effective-config, and pnpm validate:targets ahead of the smoke/build steps.
  • tools/smoke/verify-target-artifacts.ts now imports and calls the shared platformTargetsFilePath helper from tools/target/platform-targets.ts instead of duplicating the default-filename logic.

Kicking off a full review now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@imjlk

imjlk commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Follow-up CI patch pushed:

  • build-devvit failed because the reddit release artifact is intentionally written under the Devvit wrapper app (apps/target-devvit/dist), while the smoke verifier still required every artifact to live under the starter target-config directory.
  • Updated tools/smoke/verify-target-artifacts.ts so only devvit-web artifacts may live outside the target config dir, and only when they stay under the configured wrapper app. Other target artifact path restrictions are unchanged.

Local verification:

  • pnpm build:devvit
  • pnpm smoke:target reddit
  • pnpm check
  • pnpm smoke:effective-config
  • pnpm smoke:adapter-effective-config
  • git diff --check

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== verify-target-artifacts.ts ==="
cat tools/smoke/verify-target-artifacts.ts

echo "=== target-devvit package.json ==="
fd package.json apps/target-devvit --exec cat {}

echo "=== mpgd.targets.json reddit/devvit-web targets ==="
cat examples/phaser-starter/mpgd.targets.json

Length of output: 25830


@imjlk Thanks for the fix — verified it:

  • assertArtifactPathAllowed now branches on targetConfig.kind: for every kind except devvit-web, the artifact path must still stay under the target config base dir (assertPathInsideTargetBase), unchanged from before.
  • For devvit-web targets, it resolves wrapperApp (reddit → ../../apps/target-devvit) and requires the artifact to stay under that wrapper app path instead, which correctly matches where apps/target-devvit/package.json's dev:client/build scripts actually emit dist/client and dist/server.
  • This mirrors the same wrapper-app resolution pattern already used in verifyDevvitWebManifest, so it's consistent with the rest of the file.

This looks correct and properly scoped to only the devvit-web case. Kicking off a full review now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@imjlk

imjlk commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Resolved the remaining Codex review P1 follow-ups:

  • Root scripts now default MPGD_PLATFORM_TARGETS_FILE to examples/phaser-starter/mpgd.targets.json only when the caller has not already set it. This preserves CLI/generated project overrides while keeping repo-local commands convenient.
  • examples/phaser-starter now uses target-aware runtime detection and dynamically installs browser, Capacitor, Apps in Toss, or Devvit gateways according to APP_TARGET / MPGD_CONFIG_TARGET.
  • Added the starter env declarations and adapter dependencies needed for those target builds.

Local verification after this patch:

  • pnpm --dir examples/phaser-starter check
  • pnpm validate:target-config
  • pnpm build:web + pnpm smoke:target web-preview
  • pnpm build:microsoft-store + pnpm smoke:target microsoft-store
  • pnpm build:devvit + pnpm smoke:target reddit
  • pnpm build:ait + pnpm smoke:target ait
  • pnpm check
  • pnpm graph:preflight
  • pnpm smoke:effective-config
  • pnpm smoke:adapter-effective-config
  • git diff --check

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== package.json scripts (relevant) ==="
cat package.json | jq '.scripts' 2>/dev/null | grep -i -E "MPGD_PLATFORM_TARGETS_FILE|validate:target-config|validate:effective-config|validate:targets|build:target|smoke:target|build:effective-config" -A2 -B2 || true

echo "=== search for MPGD_PLATFORM_TARGETS_FILE usage in package.json ==="
grep -n "MPGD_PLATFORM_TARGETS_FILE" package.json

echo "=== examples/phaser-starter structure ==="
fd . examples/phaser-starter --max-depth 3

echo "=== runtime detection in starter ==="
fd -e ts . examples/phaser-starter/src --exec grep -l "APP_TARGET\|MPGD_CONFIG_TARGET" {} \;

Length of output: 8993


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== runtimeDetector.ts ==="
cat examples/phaser-starter/src/platform/runtimeDetector.ts

echo "=== installStarterPlatform.ts ==="
cat examples/phaser-starter/src/platform/installStarterPlatform.ts

echo "=== env.d.ts ==="
cat examples/phaser-starter/src/env.d.ts

echo "=== package.json ==="
cat examples/phaser-starter/package.json

echo "=== vite.config.ts ==="
cat examples/phaser-starter/vite.config.ts

Length of output: 7305


Everything checks out.

  • Root scripts (Line 42–65 of package.json) now use MPGD_PLATFORM_TARGETS_FILE=${MPGD_PLATFORM_TARGETS_FILE:-examples/phaser-starter/mpgd.targets.json}, which correctly preserves caller/CI overrides while defaulting for repo-local commands.
  • examples/phaser-starter/src/platform/installStarterPlatform.ts performs target-aware dynamic gateway selection (@mpgd/adapter-capacitor for android/ios, @mpgd/adapter-ait, @mpgd/adapter-devvit, and @mpgd/adapter-browser fallback), driven by runtimeDetector.ts's detectRuntime() which reads __APP_TARGET__/__MPGD_CONFIG_TARGET__ build-time constants — consistent with the previous apps/game-phaser pattern.
  • vite.config.ts wires APP_TARGET/MPGD_CONFIG_TARGET env vars into those build-time constants, and env.d.ts declares them.
  • examples/phaser-starter/package.json now includes all four adapter workspace dependencies (@mpgd/adapter-ait, @mpgd/adapter-browser, @mpgd/adapter-capacitor, @mpgd/adapter-devvit) needed for these target builds.

This all looks correctly scoped and consistent with the rest of the target-config flow. Kicking off a full review now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@imjlk

imjlk commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Follow-up for the latest CI failure:

  • validate:public was correctly rejecting tracked .d.ts files by default, but examples/phaser-starter/src/env.d.ts is the starter's hand-authored Vite ambient declaration, matching the existing template exception.
  • Added that starter declaration to the public-readiness allowlist.

Local verification:

  • pnpm check
  • pnpm graph:preflight
  • git diff --check

@imjlk

imjlk commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Final local OCR rerun on origin/main..HEAD found no high-priority issues and two medium maintainability items. Addressed both in 9104e79:

  • wrapped starter platform gateway dynamic imports in a clearer initialization error path
  • centralized Devvit wrapper app path resolution in target artifact smoke validation

Local validation after the patch:

  • pnpm --dir examples/phaser-starter check
  • pnpm smoke:target reddit
  • pnpm check
  • pnpm graph:preflight
  • git diff --check

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== installStarterPlatform.ts ==="
cat examples/phaser-starter/src/platform/installStarterPlatform.ts

echo "=== verify-target-artifacts.ts ==="
cat tools/smoke/verify-target-artifacts.ts

echo "=== commit 9104e79 check ==="
git log --oneline -5

Length of output: 27031


@imjlk Verified both fixes in 9104e79:

  • examples/phaser-starter/src/platform/installStarterPlatform.ts: createPlatformGateway's switch is now wrapped in a try/catch that rethrows a clear Failed to initialize platform gateway for target "${runtime.target}": ... error via the new formatError() helper — much easier to diagnose adapter import/init failures per target.
  • tools/smoke/verify-target-artifacts.ts: wrapper app path resolution is now centralized in resolveWrapperApp(target, targetConfig), reused by both verifyDevvitWebManifest and assertArtifactPathAllowed, removing the previous duplication.

Both changes look correct and well-scoped. Kicking off a full review now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@imjlk
imjlk merged commit 79e7566 into main Jul 8, 2026
6 checks passed
@imjlk
imjlk deleted the codex/remove-game-phaser-fixture branch July 15, 2026 13:41
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