Skip to content

refactor(mapgen-studio): recipe-dag oRPC mount — fetch adapter, per-request ssrLoadModule, shared node⇄web bridge#1647

Merged
mateicanavra merged 1 commit into
mainfrom
design/dag-orpc-mount
Jun 12, 2026
Merged

refactor(mapgen-studio): recipe-dag oRPC mount — fetch adapter, per-request ssrLoadModule, shared node⇄web bridge#1647
mateicanavra merged 1 commit into
mainfrom
design/dag-orpc-mount

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

The mount stays in vite (the only dev server; prod is a static SPA), but
normalizes onto the lane's A4-lite pattern: the canonical artifact is the
fetch-adapter handler (Bun-ready for P5b, mirroring @civ7/studio-server),
behind a thin Connect shim. The node⇄web bridge moves out of vite.config
into src/server/http/nodeWebBridge.ts, shared by the /rpc and recipe-dag
mounts.

The mount itself keeps ssrLoadModule — load-bearing, not legacy: the
effect-orpc router layer imports effect-orpc, whose package entry is
TypeScript SOURCE that Node cannot load outside vite's pipeline (a static
import breaks config evaluation; @civ7/studio-server tolerates it only by
bundling effect-orpc into its dist). The real defect — a forever-memoized
handler promise that never re-served edits — is fixed by calling
ssrLoadModule PER REQUEST (vite's documented SSR pattern; cache hit when
unchanged) behind a path pre-check. Path contract unchanged. Decision +
research evidence in the dag-tab workstream.

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

@github-actions

Copy link
Copy Markdown

Railway preview (MapGen Studio): not provisioned for this PR.

Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.

  • To force a preview for this PR: add label railway-preview
  • To suppress a preview: add label no-railway-preview

Debug: {"isClosed":false,"isFork":false,"suppress":false,"force":false,"isTopOfStack":false,"hasToken":true,"draft":false}

This was referenced Jun 12, 2026

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Merge activity

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

@mateicanavra
mateicanavra changed the base branch from design/dag-tab-stage to graphite-base/1647 June 12, 2026 22:15
@mateicanavra
mateicanavra changed the base branch from graphite-base/1647 to main June 12, 2026 22:16
…equest ssrLoadModule, shared node⇄web bridge

The mount stays in vite (the only dev server; prod is a static SPA), but
normalizes onto the lane's A4-lite pattern: the canonical artifact is the
fetch-adapter handler (Bun-ready for P5b, mirroring @civ7/studio-server),
behind a thin Connect shim. The node⇄web bridge moves out of vite.config
into src/server/http/nodeWebBridge.ts, shared by the /rpc and recipe-dag
mounts.

The mount itself keeps ssrLoadModule — load-bearing, not legacy: the
effect-orpc router layer imports effect-orpc, whose package entry is
TypeScript SOURCE that Node cannot load outside vite's pipeline (a static
import breaks config evaluation; @civ7/studio-server tolerates it only by
bundling effect-orpc into its dist). The real defect — a forever-memoized
handler promise that never re-served edits — is fixed by calling
ssrLoadModule PER REQUEST (vite's documented SSR pattern; cache hit when
unchanged) behind a path pre-check. Path contract unchanged. Decision +
research evidence in the dag-tab workstream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mateicanavra
mateicanavra force-pushed the design/dag-orpc-mount branch from 2dfe56a to e53f4cd Compare June 12, 2026 22:17
@mateicanavra
mateicanavra merged commit 642f7fb into main Jun 12, 2026
This was referenced 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