Skip to content

feat(ai-autopilot): serveCheck — boot-and-serve production-grade check (#140)#141

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/140-serve-check
Jul 2, 2026
Merged

feat(ai-autopilot): serveCheck — boot-and-serve production-grade check (#140)#141
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/140-serve-check

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #140. Puts the #137 runner seam to work in the bootstrap loop.

Why

The full-fledged loop gated only on a prompt verdictloopChecklist asks the model whether the app is production-grade. Now that the runner can start a dev server and preview it (#137), the loop can gate on something concrete: does the app actually boot and serve?

What's added

  • serveCheck(session, { serve, install?, build?, port?, healthPath?, ... }) — a checklist-shaped step. Inside the build's runner session it: install → (optional build) → start the dev server → preview({ waitMs }) until the port is reachable → fetch a health path. Any failure becomes a concrete { blockers } verdict the improve loop then fixes:
    • install/build non-zero exit → blocker (and it never tries to serve)
    • the dev server exits before serving → blocker (with the tail of its log)
    • a response ≥ 500 → blocker
    • unreachable → blocker
    • a runner that can't start/previewskips (passing, with a note) rather than blocking forever
  • mergeChecklists(...checks) — unions (dedupes) the blockers of several checks, so a pass must BOTH read production-grade AND actually run:
    checklist: mergeChecklists(loopChecklist({ loop }), serveCheck(session, { serve: 'npm run dev' }))

Verified

serve-check.test.ts — a real boot-and-serve success on LocalRunner (a Node HTTP server → clean verdict), plus every failure path (5xx, exits-before-serving, install-fail-never-starts, incapable-runner-skip) and the merge/dedupe combinator. 220 tests green, typecheck + build clean. The example README shows how to compose it into the live capstone (left out of the default run because a model-scaffolded app may not boot first try — which is exactly what the loop is for).

MINOR changeset.

…eck (#140)

The full-fledged loop gated only on a prompt verdict (loopChecklist asks the
model whether the app is production-grade). Now that the runner can start a dev
server and reach it (#137), the loop can gate on something concrete: does the
app actually boot and serve?

Add:
- serveCheck(session, { serve, install?, build?, port?, healthPath?, ... }) — a
  checklist-shaped step that runs inside the build's runner session: install ->
  (build) -> start the dev server -> preview until reachable -> fetch a health
  path, turning any failure (install error, server exits on boot, 5xx,
  unreachable) into a concrete { blockers } verdict the improve loop addresses.
  Skips (passing, with a note) when the runner can't start/preview.
- mergeChecklists(...checks) — union the blockers of several checks, so a pass
  must BOTH read production-grade AND actually run.

Verified: real boot-and-serve success on LocalRunner (clean verdict) plus 5xx,
exits-before-serving, install-fail (never starts), incapable-runner-skip, and
the merge/dedupe combinator. 220 tests green. MINOR changeset.
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 2, 2026
@suleimansh suleimansh self-assigned this Jul 2, 2026
@suleimansh suleimansh merged commit 493cc11 into main Jul 2, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/feat/140-serve-check branch July 2, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap: a boot-and-serve production-grade check (serveCheck) with teeth

1 participant