fix(ci): repair the mobile showcase screenshots workflow - #5057
Conversation
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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: 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 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>
Dismissing prior approval to re-evaluate 6264868
…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>
Dismissing prior approval to re-evaluate 0465c85
| "projection_state", | ||
| ] as const; | ||
|
|
||
| function hasSeedableSchema(dbPath: string): boolean { |
There was a problem hiding this comment.
🟠 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.
## 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
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):
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..., butscripts/mobile-showcase.tsboots the T3 server fromapps/server/src/bin.ts, whose package is namedt3and is in neither filter graph. The server crashed withERR_MODULE_NOT_FOUND: @effect/platform-nodeand both jobs timed out waiting for the server port. Fixed by adding--filter=t3...to both jobs.environment-id read raced server startup. The server begins listening before its
ServerEnvironmentlayer persistsuserdata/environment-id; the script read the file once right afterwaitForPortand died with ENOENT on the fast macOS runner. Now polls for non-empty content with the same timeout discipline aswaitForPort.Database seeding raced server migrations.
seedDatabasedeletes from and reseeds projection tables as soon as the port opens, but migrations weren't done yet —no such table: projection_pending_approvals. Now pollssqlite_masterfor all seeded tables before touching the database.Verification
Workflow runs dispatched on this branch:
Also passing locally:
pnpm --filter @t3tools/scripts typecheckandpnpm --filter @t3tools/scripts test(197 tests).🤖 Generated with Claude Code