Skip to content

fix(mapgen-studio): run-in-game proof matches again — turbo passes SWOOPER_STUDIO_RUN_ID through the cached build + fail-fast bundle guard#1659

Merged
mateicanavra merged 1 commit into
mainfrom
design/y1-run-proof-request-id
Jun 12, 2026
Merged

fix(mapgen-studio): run-in-game proof matches again — turbo passes SWOOPER_STUDIO_RUN_ID through the cached build + fail-fast bundle guard#1659
mateicanavra merged 1 commit into
mainfrom
design/y1-run-proof-request-id

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

Root cause of the 'Waiting for Proof' zombie: gen:maps runs inside turbo's
CACHED build task and SWOOPER_STUDIO_RUN_ID was never declared in
turbo.json — strict env mode stripped it (and the cache could replay a
stale bundle), so the deployed map script logged [mapgen-proof]
{"requestId":null,…} (observed live in Scripting.log) and the ordered
marker waiter could never match. Every Run in Game sat the full 90s log
timeout in waiting-for-proof while the game reached turn green.

  • turbo.json: build.env [SWOOPER_STUDIO_RUN_ID] — env-visible AND
    cache-correct (verified both directions: with env the id lands in the
    generated source + bundle; without, it drops).
  • engines.ts: post-deploy guard via mapScriptEmbedsRequestId — a bundle
    that does not embed the request id fails immediately with
    run-request-id-not-materialized + recovery hint instead of zombying.

Verified live end-to-end: Run in Game → materializing → … →
waiting-for-proof → Complete; proof line carries the request id; chip
shows Complete · Current.

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

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jun 12, 2026

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

  • Jun 12, 10:46 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jun 12, 10:53 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jun 12, 10:53 PM UTC: @mateicanavra merged this pull request with Graphite.

@mateicanavra
mateicanavra changed the base branch from design/effect-substrate-spike to graphite-base/1659 June 12, 2026 22:50
@mateicanavra
mateicanavra changed the base branch from graphite-base/1659 to main June 12, 2026 22:51
…OOPER_STUDIO_RUN_ID through the cached build + fail-fast bundle guard

Root cause of the 'Waiting for Proof' zombie: gen:maps runs inside turbo's
CACHED build task and SWOOPER_STUDIO_RUN_ID was never declared in
turbo.json — strict env mode stripped it (and the cache could replay a
stale bundle), so the deployed map script logged [mapgen-proof]
{"requestId":null,…} (observed live in Scripting.log) and the ordered
marker waiter could never match. Every Run in Game sat the full 90s log
timeout in waiting-for-proof while the game reached turn green.

- turbo.json: build.env [SWOOPER_STUDIO_RUN_ID] — env-visible AND
  cache-correct (verified both directions: with env the id lands in the
  generated source + bundle; without, it drops).
- engines.ts: post-deploy guard via mapScriptEmbedsRequestId — a bundle
  that does not embed the request id fails immediately with
  run-request-id-not-materialized + recovery hint instead of zombying.

Verified live end-to-end: Run in Game → materializing → … →
waiting-for-proof → Complete; proof line carries the request id; chip
shows Complete · Current.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mateicanavra
mateicanavra force-pushed the design/y1-run-proof-request-id branch from 7d4d183 to a718bc0 Compare June 12, 2026 22:52
@mateicanavra
mateicanavra merged commit 09864b8 into main Jun 12, 2026
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