Skip to content

[Bug]: contact-form recipe incorrectly promises test and audit will not emit signals #793

Closed

Description

@jimhoyd

Runtime revision and environment

URLCode 0.6.3, core 2383b1213546fb9fd1fbc51aa4d2ed6dfe27a457; published package on macOS, Node 26.10.0. Synthetic local copy of the shipped contact-form recipe. Outbound transport intercepted in the test process; no external webhook contacted.

Minimal reproduction

The current recipes/contact-form/README.md says:

Test and audit probes do not fire it.

It directly recommends running urlcode test and urlcode audit with the recipe's reviewed operator policy. The shipped valid POST fixture actually emits a signal in both workflows.

  1. Copy recipes/contact-form to a temporary project.
  2. Generate the revision-pinned policy using loadDocument, prepareFunctionSnapshot, and requestedPermissions (the same requested grant used by the CLI permissions command).
  3. For a safe in-process reproduction, intercept the published package's EgressClient.prototype.request to record requests and return a synthetic 204. This intercept changes only outbound transport; fixture execution, HTTP routing, signal scheduling and policy activation remain real.
  4. Call runProjectTests(project, {permissions}).
  5. Start a fresh server with startServer({project, port:0, local:true, permissions}), then call auditProject(server).

Each run attempts one POST to the recipe hook, with body:

{"version":1,"route":"/contact","status":202,"method":"POST"}

Expected: documentation must accurately state the side effects of the exact commands it recommends. If test/audit suppression is an intended behavioral contract, implement it through a trusted internal mechanism and add an integration test; otherwise remove the promise and explain that fixtures reaching this route can call the granted destination, recommending a controlled test receiver. Do not identify trusted probes solely from a caller-spoofable User-Agent.

Relevant output

  • runProjectTests: { "total": 7, "failed": 0 }; one intercepted signal POST.
  • auditProject: ready: true, checks: 7, passed: 7; one intercepted signal POST.
  • Both record signal: accepted followed by delivered using the synthetic transport.
  • runtime.ts suppresses signals for HEAD or trace.probe. Test/audit fixtures are ordinary HTTP requests and do not get that internal trace flag.
  • The existing runtime unit test manually supplies trace: {probe:true}; it does not demonstrate that test/audit fixture requests receive it.

Scope: this report concerns the recipe's test/audit fixture promise. A separate GET signal route without fixtures produced zero generated audit cases and zero signal calls, so I am not claiming generated readiness cases emitted signals. The hosted AI fixture warning that signal tests can perform real calls is consistent with the observed runtime.

Activity

  1. added
    bug
    documentation
    on Sep 26, 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

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions