Skip to content

Clear the HTTP handler quality gate#42

Merged
jonbaldie merged 1 commit into
mainfrom
agent/issue-35-handler-gate
Jul 23, 2026
Merged

Clear the HTTP handler quality gate#42
jonbaldie merged 1 commit into
mainfrom
agent/issue-35-handler-gate

Conversation

@jonbaldie

Copy link
Copy Markdown
Owner

Closes #35

What changed

  • Split the HTTP handler into focused request-body, route-registration, payload-response, and logging helpers.
  • Kept route behavior behind the existing public Request/Response seam.
  • Replaced development-only console calls with direct Deno stdout/stderr writes.
  • Centralized queue-name error translation and made payload response rendering reflect the JSON values the API already accepts.

Why

The handler's monolithic structure triggered messcript method-length, cyclomatic-complexity, naming, and development-code findings. This refactor clears that unit gate without weakening policy or changing documented endpoint behavior.

Validation

  • npm run quality:unit -- http-handler
  • deno lint src/handler.ts
  • deno test --frozen=false --allow-all tests/handler_test.ts — 94 passed
  • deno test --frozen=false --allow-all — 180 passed
  • Two-axis review: Standards pass; Spec pass

@jonbaldie
jonbaldie merged commit 8a3cfea into main Jul 23, 2026
3 checks passed
@jonbaldie
jonbaldie deleted the agent/issue-35-handler-gate branch July 23, 2026 13:08
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.

Clear the HTTP handler quality gate

1 participant