Skip to content

fix(ci): repair the mobile showcase screenshots workflow - #5057

Merged
juliusmarminge merged 3 commits into
mainfrom
fix/mobile-showcase-install-server-deps
Jul 31, 2026
Merged

fix(ci): repair the mobile showcase screenshots workflow#5057
juliusmarminge merged 3 commits into
mainfrom
fix/mobile-showcase-install-server-deps

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

The Mobile Showcase Screenshots workflow has been failing since #4802 (failed run). Fixing it surfaced one CI bug and two latent startup races in the showcase harness (previously masked by slower runners):

  1. Workflow install filter missed the server package. perf(ci): cut stale runs and redundant setup #4802 switched to pnpm install --filter=@t3tools/mobile... --filter=@t3tools/scripts..., but scripts/mobile-showcase.ts boots the T3 server from apps/server/src/bin.ts, whose package is named t3 and is in neither filter graph. The server crashed with ERR_MODULE_NOT_FOUND: @effect/platform-node and both jobs timed out waiting for the server port. Fixed by adding --filter=t3... to both jobs.

  2. environment-id read raced server startup. The server begins listening before its ServerEnvironment layer persists userdata/environment-id; the script read the file once right after waitForPort and died with ENOENT on the fast macOS runner. Now polls for non-empty content with the same timeout discipline as waitForPort.

  3. Database seeding raced server migrations. seedDatabase deletes from and reseeds projection tables as soon as the port opens, but migrations weren't done yet — no such table: projection_pending_approvals. Now polls sqlite_master for all seeded tables before touching the database.

Verification

Workflow runs dispatched on this branch:

  • Run 1 (after fix 1): Android fully green; iOS exposed race 2.
  • Run 2 (after fix 2): Android green again; iOS exposed race 3.
  • Run 3 (after fix 3, iOS only): ✅ green.
  • Run 4 (all platforms): iOS ✅; Android hit an emulator flake (first capture's 'thread' scene never rendered; app bundled but got no data — same commit passed before and after).
  • Run 5 (Android only, same commit): ✅ green — confirms run 4 was a flake.
  • Run 6 (all platforms, both appearances): ✅ fully green, both artifact sets uploaded (app-store-connect-screenshots 9.7 MB, google-play-screenshots 6.5 MB).

Also passing locally: pnpm --filter @t3tools/scripts typecheck and pnpm --filter @t3tools/scripts test (197 tests).

🤖 Generated with Claude Code

The filtered install added in #4802 only covers @t3tools/mobile... and
@t3tools/scripts..., but scripts/mobile-showcase.ts boots the T3 server
from apps/server/src/bin.ts (package name "t3"). Its dependencies were
never installed, so the server crashed on startup with
ERR_MODULE_NOT_FOUND for @effect/platform-node and every capture job
timed out waiting for the server port. Add --filter=t3... to both jobs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e2492ce3-6522-4f31-8ab7-402a97a39444

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 30, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 30, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

1 blocking correctness issue found. CI/test fixture changes with an unresolved high-severity comment about a potential race condition in the new schema readiness check. The hasSeedableSchema function may return true before all required columns exist, causing seed failures.

You can customize Macroscope's approvability policy. Learn more.

The showcase server starts accepting connections before its
ServerEnvironment layer persists userdata/environment-id, so reading the
file immediately after waitForPort races server startup. The fast macOS
runner lost that race (ENOENT); poll for non-empty content with the same
timeout discipline as waitForPort.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 30, 2026 23:47

Dismissing prior approval to re-evaluate 6264868

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Jul 30, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 30, 2026
…e db

seedDatabase assumed the projection tables existed as soon as the
environment server's port opened, but the server starts listening before
its database bootstrap finishes — on fast runners the seed hit 'no such
table: projection_pending_approvals'. Poll sqlite_master for the seeded
tables before deleting from them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 31, 2026 00:07

Dismissing prior approval to re-evaluate 0465c85

"projection_state",
] as const;

function hasSeedableSchema(dbPath: string): boolean {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High scripts/mobile-showcase-environment.ts:402

hasSeedableSchema returns true as soon as all nine table names exist in sqlite_master, but it never checks whether the columns that seedDatabase inserts into are present. Columns like projection_threads.runtime_mode, interaction_mode, and model_selection_json are added by later migrations, so if polling observes the database after the tables are created but before those migrations finish, hasSeedableSchema returns true and seedDatabase then fails with a missing-column error. The readiness check should verify the completed migration version or the specific columns required by the seed inserts, not just table existence.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @scripts/mobile-showcase-environment.ts around line 402:

`hasSeedableSchema` returns `true` as soon as all nine table names exist in `sqlite_master`, but it never checks whether the columns that `seedDatabase` inserts into are present. Columns like `projection_threads.runtime_mode`, `interaction_mode`, and `model_selection_json` are added by later migrations, so if polling observes the database after the tables are created but before those migrations finish, `hasSeedableSchema` returns `true` and `seedDatabase` then fails with a missing-column error. The readiness check should verify the completed migration version or the specific columns required by the seed inserts, not just table existence.

@juliusmarminge juliusmarminge changed the title fix(ci): install server deps in mobile showcase workflow fix(ci): repair the mobile showcase screenshots workflow Jul 31, 2026
@juliusmarminge
juliusmarminge merged commit 50a3d6b into main Jul 31, 2026
23 of 24 checks passed
@juliusmarminge
juliusmarminge deleted the fix/mobile-showcase-install-server-deps branch July 31, 2026 08:11
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Jul 31, 2026
## What's Changed
* fix(ci): repair the mobile showcase screenshots workflow by @juliusmarminge in pingdotgg/t3code#5057
* fix(ci): capture iPad App Store screenshots in landscape by @PixPMusic in pingdotgg/t3code#5065
* fix(oxlint-plugin): Resolve the oxlint bin without assuming a pnpm layout by @mwolson in pingdotgg/t3code#5066


**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260731.963...v0.0.32-nightly.20260731.964

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260731.964
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant