Skip to content

hono: app.get("/users/:id") + app.notFound() handlers produce no output on perry-compiled binary #603

Description

@proggeramlug

Summary

A hono fixture exercising a static route, a :id-param route, and a notFound handler prints only the first response under perry; the second and third app.fetch() calls produce no stdout. Node prints all six expected lines.

Reproducer

tests/release/packages/hono-basic/ fixture (added to the release-sweep harness this cycle):

// entry.ts
import { Hono } from "hono";

const app = new Hono();
app.get("/", (c) => c.json({ hello: "world" }));
app.get("/users/:id", (c) => c.json({ id: c.req.param("id"), name: `User ${c.req.param("id")}` }));
app.notFound((c) => c.text("not found", 404));

async function main() {
    const r1 = await app.fetch(new Request("http://x/"));
    console.log(`r1.status=${r1.status}`);
    console.log(`r1.body=${await r1.text()}`);
    const r2 = await app.fetch(new Request("http://x/users/42"));
    console.log(`r2.status=${r2.status}`);
    console.log(`r2.body=${await r2.text()}`);
    const r3 = await app.fetch(new Request("http://x/missing"));
    console.log(`r3.status=${r3.status}`);
    console.log(`r3.body=${await r3.text()}`);
}
main();
{
  "dependencies": { "hono": "^4.6.0" },
  "perry": { "compilePackages": ["hono"] }
}

Expected (from Node)

r1.status=200
r1.body={"hello":"world"}
r2.status=200
r2.body={"id":"42","name":"User 42"}
r3.status=404
r3.body=not found

Actual (from perry-compiled binary)

r1.status=200
r1.body={"hello":"world"}

— first call passes byte-for-byte; the second and third silently produce nothing. The process exits 0, so the second/third app.fetch() returns something; whatever it returns has empty .text() AND no .status.

Why this matters

#421 (single-route hello world) closed in v0.5.613. Followups for routes-with-params and JSON responses were noted as out-of-scope under #486 / #487. This is the smallest possible regression-catcher fixture for that gap; it now lives in-tree so a future fix can flip it from FAIL to PASS as an acceptance signal.

Likely overlaps with hono's RegExpRouter / TrieRouter codegen path (param extraction). Could also be the c.req.param() accessor — would help to bisect by replacing the param route with a non-param fallback that still uses c.json({...}) but no c.req.param(...).

Environment

  • Perry 0.5.699
  • hono ^4.6.0
  • macOS 26.4 / arm64
  • Discovered via scripts/release_sweep.sh --tier=3 (tests/release/packages/hono-basic/)

Refs #421, #486, #487.

Activity

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

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions