ReviewOS

home-lang/home

Port Hono application routing runtime

#259
Closed chris opened this 10 days ago ·
10 days ago

Scope

Port Bun corpus position 4000, js/third_party/hono/hello-world.test.ts, by providing the Hono application contract required by Home's copied third-party suite.

Acceptance criteria

  • import { Hono } from "hono" resolves through the corpus module adapter.
  • A Hono app can register middleware and GET routes.
  • app.fetch remains callable when passed directly to Bun.serve.
  • Context text responses and per-request set/get state work.
  • Missing routes and handler failures surface as structured HTTP responses with useful causes/stacks instead of opaque unsupported-module failures.
  • Positions 3999–4000 and permanent diagnostics pass.
10 days ago

Completed in 316045605 (feat(third-party): port Hono routing runtime) and pushed to main.

Implemented a reusable hono module adapter with bound app.fetch, middleware chaining, per-request context set/get, text responses, exact GET routing, and 404 responses. The position-3999 child fixture now uses this same router, so its middleware-derived response is no longer hard-coded.

Handler failures are wrapped as structured ERR_HONO_HANDLER errors with method, path, original cause, an explicit Hono.fetch (METHOD /path) operation frame, and a stable Name: message cause header. The permanent diagnostic caught that JavaScriptCore can expose frame-only Error.stack text; the wrapper now synthesizes the cause header before preserving the native frames, so errors remain readable across engines.

Verification:

  • hello-world.test.ts: 1 passed, 0 failed, 0 unsupported
  • Hono positions 3999–4000: 2 passed, 0 failed
  • permanent Hono cause/operation-stack assertions: passing inside the always-run third-party gate
  • permanent corpus accounting, gRPC cause/operation-stack, SQL adapter, and third-party diagnostics: all passing
  • zig fmt --check and git diff --check: clean

Cumulative executable ledger through position 4000: 342 files, 2,925 passed, 218 todo, 0 failed, 0 unsupported, 171 explicitly allowed-empty.

10 days ago

Closed by 316045605; routing, middleware, lifecycle, and permanent structured-error diagnostics are green.

Sign in to comment on this issue.