Skip to content

chore: update ttsc toolchain - #55

Merged
imjlk merged 5 commits into
mainfrom
codex/update-ttsc-toolchain
Jul 13, 2026
Merged

imjlk merged 5 commits into
mainfrom
codex/update-ttsc-toolchain

Conversation

@imjlk

@imjlk imjlk commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • update ttsc and the @ttsc/* toolchain from 0.16.9 to 0.18.4 across the workspace and generated starter manifests
  • move TypeScript 7 workspaces from the release candidate to 7.0.2 and typia from the release candidate to 13.0.2
  • align minimumReleaseAgeExclude with the pinned ttsc and typia releases
  • adapt the local graph runner to the asynchronous @ttsc/graph application API
  • keep ttsx dependency builds from leaving source-side JavaScript or declarations that can shadow transformed TypeScript on later runs
  • add Sampo patch changesets for all 15 publishable packages whose metadata changed

Why

The workspace was pinned to older compiler tooling and release-candidate dependencies. The current graph API is asynchronous, so the local graph preflight also needed to await inspection results after the upgrade.

The updated ttsx dependency-build path can emit temporary JavaScript beside sources whose project has no outDir. The shared runner removes those unintended source siblings before and after execution while preserving intentional Paraglide output and the original process failure signal.

Impact

Generated Phaser starters, published package metadata, and repository development workflows now use the current stable compiler toolchain. Packages intentionally pinned to TypeScript 5.9.3 retain that version.

Validation

  • pnpm install --frozen-lockfile
  • pnpm check
  • pnpm lint
  • pnpm test:prepared
  • pnpm graph:preflight
  • pnpm validate:catalog
  • pnpm validate:ads
  • pnpm validate:target-config
  • pnpm validate:effective-config
  • pnpm validate:targets
  • pnpm smoke:effective-config
  • pnpm smoke:adapter-effective-config
  • pnpm build:web
  • sampo release --dry-run from a temporary main checkout; all 15 patch releases planned
  • OpenCodeReview on every commit; latest review returned 0 comments
  • GitHub Actions validate, Android, iOS, AIT, and Devvit jobs passed on the latest head

Notes

pnpm build:ait reaches production readiness validation locally and stops because ait.icon.externalUrl is not configured. The GitHub AIT staging job supplies its build inputs and passes the real ait build plus smoke path.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request updates repository toolchain versions, pins typia, records patch releases for CLI packages, makes local graph inspection asynchronous, and adds generated-artifact cleanup plus cleanup-aware error handling to the TT SX runner.

Changes

Toolchain pins and release metadata

Layer / File(s) Summary
Repository and package toolchain updates
package.json, adapters/*/package.json, apps/*/package.json, backend/*/package.json, native-plugins/*/package.json, packages/*/package.json
TTSC is updated to 0.18.4, TypeScript to 7.0.2, and selected packages pin typia to 13.0.2.
Phaser template toolchain updates
examples/phaser-starter/package.json, packages/cli/templates/phaser-game/**/package.json
Starter and generated target manifests update TTSC, TypeScript, and TTSC plugin versions.
Release metadata
.sampo/changesets/update-ttsc-toolchain.md
Adds patch-release metadata for the CLI and create-game packages and records the regenerated Phaser starter toolchain.

Asynchronous graph inspection

Layer / File(s) Summary
Resolved graph inspection flow
tools/graph/local-graph-runtime.mjs, tools/graph/inspect-local-graph.mjs, tools/graph/run-graph-presets.mjs
Graph inspection now awaits the TypeScript graph result before returning, logging, and validating preset expectations.

TT SX generated-source cleanup

Layer / File(s) Summary
Cleanup-aware transformer runner
tools/run-ttsx.mjs
The runner scans configured roots, removes generated source siblings before and after execution, skips configured paths, and combines transformer and cleanup failures when determining output status.

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

Sequence Diagram(s)

sequenceDiagram
  participant runTtsx
  participant Filesystem
  participant ttsx
  runTtsx->>Filesystem: Clean generated source siblings
  runTtsx->>ttsx: Run transformer
  ttsx-->>runTtsx: Return status
  runTtsx->>Filesystem: Clean generated source siblings
  runTtsx-->>runTtsx: Resolve final status
Loading

Possibly related PRs

  • imjlk/mpgd-kit#7: Both modify tools/run-ttsx.mjs around CLI and runner execution.
  • imjlk/mpgd-kit#9: Both intersect through the generated Devvit starter template.
  • imjlk/mpgd-kit#51: The updated TT SX runner executes the related CLI acceptance script.

Poem

A bunny hops through versions bright,
TTSC tools now fit just right.
Graph results wait, then safely land,
Generated files are swept by hand.
“Patch the starters!” the rabbit sings—
Fresh type-safe carrots for all things! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title matches the main change, though it only covers the toolchain update and omits other major edits.
Description check ✅ Passed The description includes the required Summary, Validation, and Notes sections and is detailed enough for the PR template.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/update-ttsc-toolchain

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.

@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: 1b4fde0d86

ℹ️ 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 Resolved
Comment thread apps/target-ait/package.json Resolved

@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.

🧹 Nitpick comments (1)
tools/run-ttsx.mjs (1)

66-66: 🚀 Performance & Scalability | 🔵 Trivial | ⚖️ Poor tradeoff

Full recursive repo scan runs twice per invocation.

removeGeneratedSourceSiblings() walks the entire adapters/apps/backend/examples/native-plugins/packages/tools tree synchronously both before the spawn and again in finally. Since run-ttsx.mjs is invoked once per test file (e.g. the bridge package runs it three times), this is a repeated O(all-source-files) scan on the request path. Consider scoping the scan to the project/dir being run, or skipping the pre-run pass when the post-run pass suffices.

Also applies to: 117-151

🤖 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/run-ttsx.mjs` at line 66, Reduce duplicate recursive scanning in
run-ttsx.mjs by updating removeGeneratedSourceSiblings() usage around the
pre-spawn and finally cleanup paths. Scope cleanup to the project or directory
being run, or remove the redundant pre-run scan when the finally pass provides
sufficient cleanup, while preserving generated-source removal behavior.
🤖 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.

Nitpick comments:
In `@tools/run-ttsx.mjs`:
- Line 66: Reduce duplicate recursive scanning in run-ttsx.mjs by updating
removeGeneratedSourceSiblings() usage around the pre-spawn and finally cleanup
paths. Scope cleanup to the project or directory being run, or remove the
redundant pre-run scan when the finally pass provides sufficient cleanup, while
preserving generated-source removal behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9be1650e-0dba-4792-bdce-63230803522e

📥 Commits

Reviewing files that changed from the base of the PR and between 7acc584 and 733d33c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (44)
  • .sampo/changesets/update-ttsc-toolchain.md
  • adapters/ait/package.json
  • adapters/browser/package.json
  • adapters/capacitor/package.json
  • adapters/devvit/package.json
  • apps/game-services-worker/package.json
  • apps/mobile-capacitor/package.json
  • apps/target-ait/package.json
  • apps/target-devvit/package.json
  • apps/target-web-preview/package.json
  • backend/ad-reward-ledger/package.json
  • backend/entitlement-ledger/package.json
  • backend/game-services/package.json
  • backend/leaderboard-ledger/package.json
  • backend/purchase-verifier/package.json
  • examples/phaser-starter/package.json
  • native-plugins/capacitor-game-services/package.json
  • package.json
  • packages/ad-placements/package.json
  • packages/analytics/package.json
  • packages/bridge/package.json
  • packages/catalog/package.json
  • packages/cli/package.json
  • packages/cli/templates/phaser-game/apps/target-cloudflare-pages/package.json
  • packages/cli/templates/phaser-game/apps/target-devvit/package.json
  • packages/cli/templates/phaser-game/package.json
  • packages/create-game/package.json
  • packages/game-anti-cheat/package.json
  • packages/game-core/package.json
  • packages/game-economy/package.json
  • packages/game-save/package.json
  • packages/game-services-contract/package.json
  • packages/game-services/package.json
  • packages/i18n/package.json
  • packages/leaderboard-contract/package.json
  • packages/monetization-contract/package.json
  • packages/phaser-assets/package.json
  • packages/platform/package.json
  • packages/release-manifest/package.json
  • packages/target-config/package.json
  • tools/graph/inspect-local-graph.mjs
  • tools/graph/local-graph-runtime.mjs
  • tools/graph/run-graph-presets.mjs
  • tools/run-ttsx.mjs

@imjlk

imjlk commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

Review updates are in e17e4e3:

  • Expanded the Sampo changeset to all 15 changed publishable packages; main-branch dry-run plans every expected patch release.
  • Aligned minimumReleaseAgeExclude with ttsc/@ttsc 0.18.4 and typia/@typia 13.0.2.
  • Verified the AIT staging job invokes the real ait:build path and passes; cosmiconfig-typescript-loader 5.1.0 uses jiti rather than the removed TypeScript compiler API.
  • Kept both ttsx cleanup passes intentionally: pre-run cleanup removes stale artifacts before Node resolution, while post-run cleanup prevents newly emitted JavaScript from shadowing TypeScript on the next invocation. The current 1,094-file traversal measures about 0.13 seconds including process startup.
  • OpenCodeReview on e17e4e3 returned 0 comments.

@coderabbitai review
@codex review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

@imjlk Thanks for the detailed summary of the updates in e17e4e3. Kicking off a fresh review now to verify:

  • The expanded Sampo changeset covering all 15 publishable packages and the main-branch dry-run plan.
  • Alignment of minimumReleaseAgeExclude with the ttsc/@ttsc 0.18.4 and typia/@typia 13.0.2 bumps.
  • The AIT staging job invoking the real ait:build path.
  • The intentional dual cleanup passes in tools/run-ttsx.mjs.

✏️ Learnings added
Learnt from: imjlk
URL: https://github.com/imjlk/mpgd-kit/pull/55

Timestamp: 2026-07-13T06:43:21.548Z
Learning: In `tools/run-ttsx.mjs` (mpgd-kit repo), the pre-run and post-run cleanup passes for generated artifacts are both intentional, not redundant: the pre-run cleanup removes stale generated JS artifacts before Node module resolution runs, while the post-run cleanup prevents newly emitted JavaScript from shadowing TypeScript source files on the next invocation. The full traversal (~1,094 files) takes about 0.13 seconds including process startup, so the double pass has negligible performance cost.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: e17e4e304c

ℹ️ 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".

@imjlk
imjlk merged commit 5230c6b into main Jul 13, 2026
6 checks passed
@imjlk
imjlk deleted the codex/update-ttsc-toolchain 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