Skip to content

feat: wire DAWN_E codes into dawn verify + enforce gpt-5 example ids in docs#359

Open
blove wants to merge 2 commits into
mainfrom
feat/dx-tidyups
Open

feat: wire DAWN_E codes into dawn verify + enforce gpt-5 example ids in docs#359
blove wants to merge 2 commits into
mainfrom
feat/dx-tidyups

Conversation

@blove

@blove blove commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Two small post-registry tidy-ups (both surfaced during the DX-follow-up trio).

1. Wire error codes into dawn verify (was blocked on the registry #357)

  • Added DAWN_E5101 ("Node version below the supported floor") to the @dawn-ai/sdk registry (E5xxx runtime range; no docsPath — no page anchors the Node floor, matching DAWN_E5001). errors.mdx + the drift guard regenerated.
  • dawn verify's runtime check now surfaces codes: checks[].node.code = DAWN_E5101 on a stale Node, checks[].docker.code = DAWN_E2002 on an unreachable daemon (both conditional-spread, failure-only). Text mode prints [DAWN_E5101] See https://dawnai.org/… via the existing CliError path; --json exposes them directly. The TODO(error-codes) markers left by feat(cli): dawn verify runs an environment preflight (Node floor, Docker, provider-derived keys) #358 are gone.

2. Enforce gpt-5-family OpenAI example ids in docs

The "gpt-5 family in examples" convention was assumed-enforced but wasn't (found while writing AGENTS.md). Added a narrow, safe check-docs.mjs rule: flags an OpenAI legacy id used as an example model: value (gpt-4…/gpt-3…/o1…), excluding the api.mdx model-id reference page and leaving non-OpenAI provider ids (e.g. the llama3.1 ollama example) untouched.

  • Confirmed clean on current docs; negative-proofed (injecting model: "gpt-4o" fails with a clear message, reverted).

Changeset: patch @dawn-ai/sdk + @dawn-ai/cli (#2 is script-only). Full local verify green (build 23/23 · typecheck 24/24 · lint · 1193 tests · check-docs · pack-check).

🤖 Generated with Claude Code

blove and others added 2 commits July 13, 2026 15:25
Add DAWN_E5101 ("Node version below the supported floor") to the
@dawn-ai/sdk error registry, and surface it (or the existing
DAWN_E2002 for an unreachable sandbox daemon) on a failed `dawn
verify` runtime check. RuntimeCheckResult.node/docker carry an
optional `code` field, and the CliError thrown on a failed verify
gains the matching code so text mode prints `[DAWN_E5101] See ...`
and --json mode exposes it on the runtime check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a narrow check-docs.mjs rule flagging an OpenAI legacy model id
(gpt-4*, gpt-3*, o1*) used as an example `model:` value anywhere
under apps/web/content/docs, excluding api.mdx (the model-id
reference page, which intentionally lists legacy ids across every
provider). Non-OpenAI provider ids (llama, claude, gemini, ...) are
never flagged. Confirmed the rule passes against current docs and
fails when a violation is injected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@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 10:27pm

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.

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