Skip to content

[Bug]: function errors and rejected reloads are invisible during urlcode dev #580

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

  • A function that throws returns 502 Function execution failed; nothing reaches the dev log, even with --request-log detailed (packages/core/src/trusted-functions.ts:73,95,136 replace every error).
  • A syntax error or bad import gives Function initialization failed (check module syntax, imports and exports) in both validate and dev, with no file or line, and dev exits.
  • A config typo during dev logs only {"event":"reload","status":"rejected"} and keeps serving the old config. When a project uses an operator policy pinned to projectSha256, every edit is rejected the same way, silently, so live reload never applies.

Relevant output

curl after an edit still returns the previous response; the log line above is the only signal.

Suggested fix

In dev (and behind an opt-in serve --debug-errors), log route, source file and stack to stderr while keeping the generic 502 body; print the same message validate would on a rejected reload; for a pinned policy say so and offer a dev-only re-pin (e.g. dev --policy-repin or regenerating from urlcode permissions).

Activity

  1. added
    bug
    ai-first
    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-firstbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions