Skip to content

Cockpit examples: local-dev runtime + validator cleanup#588

Open
blove wants to merge 10 commits into
mainfrom
claude/cockpit-examples-cleanup
Open

Cockpit examples: local-dev runtime + validator cleanup#588
blove wants to merge 10 commits into
mainfrom
claude/cockpit-examples-cleanup

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Jun 6, 2026

Summary

Fixes the serve/deploy wiring gaps found in an audit (the capability metadata was symmetric; the tooling wasn't). Scoped to local-dev + validators only — ag-ui production is owned by the already-merged #580 (Railway) and is untouched here.

  • Local runtime resolution now works for every cap. serve-example.ts injects NEXT_PUBLIC_COCKPIT_RUNTIME_BASE_URL='' into the cockpit child so the Run-tab iframe resolves to http://localhost:<devPort> instead of the deployed URL (the devPort fallback was previously dead code).
  • Correct backend per product, no stale port. New registry-derived backendCommand(cap): uvicorn for ag-ui, langgraph dev --port <pythonPort> --no-browser otherwise. The hardcoded langgraph dev --port 8123 literal is gone.
  • One source of truth for local serve. The 14 hand-written serve-* nx targets become thin aliases to serve-example.ts --capability=<id>.
  • Validators against future drift: assert capability-registry.ts ports match cockpit/ports.mjs; assert the CI cockpit-smoke job represents every product and that each listed project actually has a smoke target (this surfaced that chat/render python had no smoke targets — now added for the two reps); removed dead "cap not in registry" fallback in the wiring spec.

Test plan

  • nx test cockpit green (24 files / 106 tests), incl. new serve-example.spec.ts + registry↔ports parity + per-product smoke-coverage assertions.
  • serve-example --capability=ag-ui-streaming verified live: launches uvicorn --port 5321 (not langgraph/8123); backendCommand output confirmed for langgraph/ag-ui/render reps.
  • iframe→localhost chain unit-covered (content-bundle.spec.ts: empty base URL → http://localhost:<devPort>) + verified end-to-end earlier (ag-ui streaming + interrupt approve/resume).
  • Scope discipline: zero ag-ui production files touched (no assemble-examples.ts / ag-ui-proxy.ts / deployments/ag-ui-dev/ / deploy-ag-ui.yml).

🤖 Generated with Claude Code

blove and others added 9 commits June 5, 2026 22:38
Fixes the serve/deploy gaps found in the wiring audit (metadata is symmetric;
tooling isn't): local runtime resolution never points the iframe at localhost
(env var never set ''), stale 8123 backend port, serve-example mis-launches
ag-ui as langgraph dev, serve-target asymmetry, and validator coverage gaps
(registry<->ports parity, smoke omits chat+render, dead fallback code).

Scoped to local-dev + serve ergonomics + validators only. ag-ui production is
owned by PR #580 (Railway); this lands after #580 and rebases onto it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 tasks: rebase onto post-#580 main, registry-derived backendCommand +
local runtime env in serve-example (TDD), serve-* targets -> aliases,
registry<->ports parity assertion, per-product smoke coverage + chat/render
reps, remove dead wiring-spec fallback, manual local-serve acceptance.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r serve-example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ntime env, drops 8123

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…source of truth)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nder reps

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…listed projects have them

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… spec

All caps are now in cockpit/ports.mjs so the try/catch fallback and
parseNumberProperty helper are dead code; call portsFor directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Error Error Jun 6, 2026 3:28pm

Request Review

@blove blove enabled auto-merge (squash) June 6, 2026 15:26
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