Skip to content

Declare the site's live preview (saas-parallel-baselining PB4) - #5

Merged
ruehowl merged 1 commit into
mainfrom
claude/declare-preview
Nov 4, 2026
Merged

ruehowl merged 1 commit into
mainfrom
claude/declare-preview

Conversation

@ruehowl

@ruehowl ruehowl commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What

The baseline declares its live preview, so orun.work's Preview tab can show a coding session's dev server (saas-parallel-baselining PB4).

  • apps/web/component.yaml: spec.preview:
    preview:
      run:
      - sh
      - -c
      - pnpm install --frozen-lockfile --prefer-offline --filter "@app/web..." && exec node_modules/.bin/astro dev --host 127.0.0.1 --port 4321 --ignore-lock
      port: 4321
      path: /
      env:
        NODE_OPTIONS: --max-old-space-size=512
        ASTRO_TELEMETRY_DISABLED: '1'
  • intent.yaml: preview: {component: web}.
  • .github/workflows/baseline.yml: orun v2.88.0 → v2.96.0, the first release that reads spec.preview, so the placement test's orun validate checks the declaration. ci.yml (the site's own lane pin) is unchanged.

Nothing about how the baseline builds or deploys changes.

Checked

From a clean clone, with orun v2.96.0, and through a local stand-in of the preview gateway (the dev server sees a local Host and the browser's own Origin; the page is framed from a foreign origin):

Check Result
orun validate passes
orun preview start --json ready in 18.8 s (21.6 s with a cold pnpm store)
GET / 200, 421.2 KB, "AstroWind — Free template for creating websites with Astro + Tailwind CSS"
foreign Host + Origin straight to the dev server 403
through the gateway stand-in, framed frame 200, aborted by the optimizer's reload (see Notes): ERR_ABORTED /node_modules/.vite/deps/astro_n_axobject-query.js?v=052d05dd; ERR_ABORTED /node_modules/.vite/deps/rolldown-runtime-B8NLbhFH.js?v=d7bb0208; ERR_ABORTED /_image?href=…hero-image.png…, hot-reload socket connected
an edit reaches the frame full reload in 1.2s
memory dev server 969 MB at its peak (page compiled, after an edit); the install peaks at 1037 MB
orun preview stop stops it; port freed

Notes

  • --ignore-lock keeps astro dev in the foreground. Astro 7 detects an AI agent and otherwise detaches into a background server (astro dev stop|status|logs), which orun can neither follow nor stop.
  • Astro has no --strictPort: it moves to the next port when 4321 is taken. orun refuses to start a preview whose port is already in use, and fails one that never answers on its declared port, so the preview fails rather than moving.
  • A foreign Host straight to the dev server gets 403 from Vite's allowedHosts. The gateway forwards with a local Host (127.0.0.1:4321), so no allowedHosts change is needed; through the stand-in the page, its assets and the hot reload all work.
  • The aborted requests (net::ERR_ABORTED on /node_modules/.vite/deps/* and one /_image) are Vite's dependency optimizer on a fresh checkout: on the first visit it finds more dependencies to pre-bundle and reloads the page, cancelling what was in flight (two short-lived hot-reload sockets, then the one that stays). No asset failed with an error status, and the page then loads in full.
  • Memory: the site is static (no Cloudflare adapter), so there is no workerd in dev: ~0.97 GB is the Astro process alone, under its 512 MiB heap cap.

Generated by Claude Code

orun.work's Preview tab shows a coding session's dev server, live from its
box: `orun preview` (orun v2.96.0) runs what a repository declares, and the
session keeps it running while it works.

- apps/web/component.yaml: spec.preview. It installs this app's packages
  only (--filter "@app/web..."), then runs `astro dev` on 127.0.0.1:4321
  with a 512 MiB heap cap; the tab opens /. --ignore-lock keeps it in the
  foreground: Astro 7 detaches itself into a background server when it
  detects an AI agent, and orun could then neither follow nor stop it.
- intent.yaml: preview: {component: web}.
- baseline.yml: orun v2.88.0 -> v2.96.0, the first release that reads
  spec.preview, so the placement's `orun validate` checks it. ci.yml (the
  site's own lane pin) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019PcpNV6SjymJBPv3nNkC4z
@ruehowl
ruehowl marked this pull request as ready for review November 4, 2026 20:37
@ruehowl
ruehowl merged commit 60a1890 into main Nov 4, 2026
5 checks passed
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.

2 participants