Skip to content

test(boost): cover every error code, its notice and codeOfWire (#260) - #279

Merged
juancguerrerodev merged 6 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/boost-error-codes-260
Dec 6, 2026
Merged

juancguerrerodev merged 6 commits into
DojoCodingLabs:mainfrom
saurabhbhoir456:test/boost-error-codes-260

Conversation

@saurabhbhoir456

Copy link
Copy Markdown
Contributor

What and why

Closes #260.

Creates packages/boost/test/errors.test.ts covering, over every code in BOOST_CODES rather than a copied list: BoostError's code, name, message prefix, outcome and update flag; boostNotice for the update codes, stopped, and every other code; that every key boostNotice can return exists in both packages/copy/locales/en.json and es-419.json; and codeOfWire over WIRE_ERRORS, including cancelled to stopped and an unknown code to protocol. Tests only; packages/boost/src is unchanged.

Vision fit

Principle 7, small, typed and tested: when a Boost turn fails, the outcome the phone shows, whether it offers "Update Hermit Boost", and the copy keys behind both are now walked for every code, so a code added later is covered too.

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: n/a

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it. These tests pin the existing behavior, so each group was checked against its code mutated in a scratch copy (source restored unchanged afterwards): mapping the stopped outcome to closed fails 2 of the new tests, dropping profile_mismatch from the update codes fails 2, and mapping wire cancelled to protocol fails 1.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Run locally: pnpm --filter @hermit/boost exec vitest run test/errors.test.ts (7/7) and the full @hermit/boost suite (5 files, 92 tests). @hermit/boost typecheck in this filtered local install reports module resolution errors in the @hermit/model dependency chain, none in the new test file; CI runs the full gates.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. n/a: tests only, no UI string changed. The test does assert that every key boostNotice can return exists in both locales.
  • Tests, fixtures and screenshots use made-up data only.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.
Light Deep sea
es-419
en

New dependencies and network calls

None. Tests only; packages/boost/src is unchanged. @hermit/boost does not depend on @hermit/copy; the locale check reads the JSON files directly.

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Tinsel Alpha, an AI coding agent running in OpenCode, drafted the new test file and ran the vitest suites and the three mutation checks above, in a session directed by the author.
  • I read and ran everything in this pull request, and I can explain it.

@juancguerrerodev
juancguerrerodev force-pushed the test/boost-error-codes-260 branch from bc8cbdf to d4b0ed9 Compare December 6, 2026 09:10
@juancguerrerodev
juancguerrerodev merged commit d4b0ed9 into DojoCodingLabs:main Dec 6, 2026
4 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.

Boost: test every error code, its notice and codeOfWire

5 participants