Skip to content

[Bug]: request fixtures accept unknown keys, report no diff, and are undocumented #584

Closed

Description

@jimhoyd

Runtime revision and environment

main at 645239b; core 0.5.9 packed with npm pack and installed into scratch projects, run as llms.txt instructs (npx --no --package @jimhoyd/urlcode urlcode …); MCP driven over stdio. Node 26, macOS. Found in a hands-on usability audit (agent and human perspectives).

Minimal reproduction

  • Unknown keys are ignored: {"path":"/api/status","status":200,"json":{"ok":false}}, "headers":{…} or "expectJson":{…} pass urlcode test with exit 0 — a false green. audit flags only unassertedCases:[1] without saying why.
  • A failed assertion prints {"event":"test","case":1,"pass":false,"status":200} even with --verbose — no expected vs actual (the real cause in one case was x-frame-options: deny vs DENY).
  • urlcode test with zero cases returns {"total":0,"failed":0}, exit 0.
  • The format (expectBody, expectHeaders, …) is documented nowhere an agent looks: not in the generated AGENTS.md, the skills or packaged docs; docs search "expectBody" → No match; there is no fixture schema in schemas/. The only source is recipes show output.

Relevant output

Observed independently in the template and in fresh init projects.

Suggested fix

Validate fixtures against a shipped schemas/requests.schema.json and reject unknown keys; print expected/actual (truncated) per failed assertion; exit nonzero or warn on zero cases; index the fixture format in docs search and the authoring skill. The template side (an example expectBody/expectHeaders fixture) is tracked in urlcode-template.

Activity

  1. added
    bug
    ai-first
    important
    on Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstbugimportant

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions