Skip to content

test(httpapi): add scenarios for 37 uncovered routes - #198

Closed
alltomatos wants to merge 1 commit into
devfrom
fix/httpapi-exercise-coverage
Closed

alltomatos wants to merge 1 commit into
devfrom
fix/httpapi-exercise-coverage

Conversation

@alltomatos

Copy link
Copy Markdown
Owner

Summary

  • O gate test:httpapi (bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skip) estava quebrado em dev: 37 rotas registradas no HttpApi (batuta, combo, agentui, mcp, memory, telegram, config, external-agent, experimental/background-job, global/bug-relay) não tinham cenário de teste em packages/opencode/test/server/httpapi-exercise/index.ts, causando missing=37 e bloqueando CI (unit (linux)/unit (windows)) em qualquer PR contra dev.
  • Adicionados cenários mínimos e reais (payload válido, status esperado, asserção básica de shape) para todas as 37 rotas, seguindo o DSL fluente já existente no arquivo (.at(), .jsonEffect(), .mutating(), .seeded()).

Test plan

  • bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skip → missing=0 extra=0, exit 0
  • bun run script/httpapi-exercise.ts --mode auth --fail-on-missing --fail-on-skip → missing=0 extra=0, exit 0
  • bun run script/httpapi-exercise.ts --mode effect --fail-on-missing --fail-on-skip → missing=0 extra=0, exit 0 (6 falhas de cenário pré-existentes e não relacionadas — pty.create, worktree.reset, v2.pty.create, session.prompt, session.prompt_async, session.command — não bloqueiam o gate, que só falha por missing/skip)
  • bun turbo test → 719/722 passando; as 3 falhas restantes são de paridade i18n do locale dv (packages/app/src/i18n/parity.test.ts), pré-existentes em dev e sem relação com este diff
  • bun turbo typecheck (rodado pelo pre-push hook) → limpo

Notas

  • Após merge, a PR feat(agentui): WhatsApp channel via waconector (9 providers) #161 (WhatsApp channel) pode dar rebase para resolver apenas as 7 rotas dela que faltam (agentui/generate, tunnel/, whatsapp/).
  • As 6 falhas de cenário em effect mode e as 3 falhas de i18n dv são pré-existentes em dev; considerar issues separadas se quiser investigá-las.

🤖 Generated with Claude Code

Closes the coverage gap in the httpapi-exercise gate for batuta,
combo, agentui, mcp, memory, telegram, config, external-agent,
experimental/background-job and global/bug-relay routes. The
coverage/auth/effect modes of `bun run test:httpapi` now all report
missing=0 extra=0.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@alltomatos

Copy link
Copy Markdown
Owner Author

Closing as superseded by PR #203 which landed scenarios for all 38 routes on dev.

@alltomatos alltomatos closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant