Skip to content

feat(cli): dawn verify runs an environment preflight (Node floor, Docker, provider-derived keys)#358

Merged
blove merged 6 commits into
mainfrom
feat/verify-env-preflight
Jul 13, 2026
Merged

feat(cli): dawn verify runs an environment preflight (Node floor, Docker, provider-derived keys)#358
blove merged 6 commits into
mainfrom
feat/verify-env-preflight

Conversation

@blove

@blove blove commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

dawn check validates config; dawn verify validates app integrity — but neither checked the environment the app runs in. This extends dawn verify (no new command — keeps the CLI surface minimal) with a runtime preflight and fixes a real bug in its key check.

What's new

  • runtime check — verify now has 5 checks (app, routes, typegen, deps, runtime):
    • Node ≥ 22.13.0 (process.versions.node, pure numeric semver compare) — the real floor below which node:sqlite (used by @dawn-ai/sqlite-storage/memory) breaks. A stale Node fails verify (non-zero exit).
    • Docker daemon reachability — only when the app configures a sandbox provider, via the provider's existing preflight() (reused, not reimplemented).
  • Bug fix — provider-derived API keys: the deps check hardcoded RECOMMENDED_ENV_VARS = ["OPENAI_API_KEY"], so it nagged every app about OPENAI_API_KEY and never checked the key the app actually needs. Now it infers each route's provider from its model id (reusing the SDK's inferProvider) and checks only those keys: an Anthropic-only app requires ANTHROPIC_API_KEY (not OPENAI_API_KEY); multi-provider → the union; ollama → none. Still a warning (not a failure), env-file resolution preserved.

--json includes the new runtime object; the human summary prints a Runtime: Node … OK line. Full local verify green (build 23/23 · typecheck 24/24 · lint 20/20 · test 1171 passed · check-docs). Changeset: patch @dawn-ai/cli. Docs: cli.mdx verify section + a preflight one-liner in getting-started/configuration.

Error codes (DAWN_E5101/DAWN_E2002) are marked with TODOs to wire once the error-code registry (#357) merges.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dawnai Ready Ready Preview, Comment Jul 13, 2026 8:46pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

…ormalize node version

Add the 5th 'runtime' check (Node floor probe) as the last entry in
checks[], bump counts.passed/total 4->5, and normalize the live
process.versions.node in both fixture normalizers to <version:node> so
the fixture stays stable across Node patch releases.

Also reconcile the deps check's missingEnvVars to [] to match reality:
the harness overwrites the scaffolded route with a provider-less
agent/graph, so collectRouteProviders finds no provider and the
provider-derived env check (263f609) requires no API key.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 361a9ac into main Jul 13, 2026
14 checks passed
@blove
blove deleted the feat/verify-env-preflight branch July 13, 2026 22:04
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