Skip to content

Declarative JSON error format, extension field references, Windows extension suites on PRs, V8 crash reproducers (#821, #822, #823, #824, #708) - #827

Merged
jimhoyd merged 8 commits into
mainfrom
claude/issues-708-824
Sep 27, 2026
Merged

jimhoyd merged 8 commits into
mainfrom
claude/issues-708-824

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

This PR covers five issues. The owner decided #821 and #708 on 2026-09-27; the decisions are recorded on the issues.

#821: declarative JSON error format (owner: option a)

  • Route: errors: {format: text|json}.
  • Site: site.errors: {format: json, paths: [/api/*, …]}, which also covers unmatched paths, sitting next to site.notFound.
  • Precedence: the route's own setting, then the site paths, then text. Text stays the default, byte for byte.
  • JSON body: a fixed envelope, {"error":{"code":"…","message":"…"}}, with application/json; charset=utf-8. The code set is closed and keyed by status: 400, 404, 405, 410, 413, 414, 415, 421, 422 (the [Request]: Structured JSON error body for request.body.schema 422 responses #320 body-schema issues, bounded to 4 KiB), 500, 502, 503 and 504.
  • Unchanged: status, Allow on 405, the HEAD rule, and the security, no-store, nosniff and request-id headers. Handler, policy (429), plugin and extension (401) responses are never rewritten. /_urlcode probes stay text.
  • Targets: native on self-hosted, AWS and Vercel, including host-level errors such as the pre-handle 413. Cloudflare carries it in the build artifact. Static refuses it before building. It is reported through a new errors capability.
  • Docs and recipes:
    • New RIM-ERRORS-001 card; RIM-OUTPUT-001 updated.
    • HTTP, SPECIFICATION, SITE, CAPABILITIES and the YAML guide; YAML-REFERENCE regenerated.
    • The cookbook /status route gains a 405 fixture.
    • spa-shell now declares site.errors for /api/*, and its plugin serves only the shell.

#822 and #823: extension syntax references for agents

  • [Bug]: Abuse extension is missing agent reference metadata #823: abuse now declares agent metadata (README and SECURITY). A check fails if any first-party extension has no agent references, or names a file its package doesn't ship. A test shows an installed abuse appears in the agent tooling result.
  • [Request]: Complete extension syntax references and schema descriptions for agents #822:
    • Descriptions: all 299 extension config and policy properties, plus 30 hook properties, now have descriptions written from the code.
    • Gate: the [Request]: describe every field in urlcode.schema.json #750 description gate (now scripts/schema-descriptions.ts) also applies to extension schemas.
    • References: a generated field reference sits at the end of each package README. It covers peers, config, route policy, hook contracts, and the distinction between schema-valid and activatable. docs/EXTENSION-REFERENCE.md has the index and a capability-to-reference table.
    • Tooling: npm run docs:extensions generates the references, and check:docs fails when they are stale or a description is missing.
    • Examples: the forms onSubmit and store shortLinks README examples are executed by package tests.
    • llms-full.txt: now opens with a coverage note and bounded retrieval paths.

#824: PR CI runs changed extensions' suites on Windows

On pull requests, workspace-verify gains windows-latest / Node 24 entries for the changed extensions and everything that depends on them, computed by the new windowsWorkspacePackages in ci-plan. Checked against #819's real diff, it would have caught #820 before merge.

  • Core-only PRs: add no Windows extension suites.
  • Empty or unclassifiable diffs: fail closed to all ten extensions.
  • Main and release: unchanged.
  • Required checks: the new entries are part of the existing matrix, so the required-check set and verify-complete are unchanged.
  • Untested until it runs on GitHub.

#708: reproduce and report upstream (owner decision; this PR does not close #708)

  • Reproducers in scripts/repro/:

    • a standalone script that churns worker threads compiling and running WebAssembly (no URLCode code);
    • a real SandboxPool terminate/respawn churn;
    • a runner that captures the fatal signature.

    They're not run by npm test and not in the npm package.

  • Workflow: v8-jit-repro.yml runs them on demand (workflow_dispatch only, read-only, never retried, not required; Windows / Node 24 by default, with 22 and 26 available).

  • Local runs on macOS / Node 26 do not crash, as expected. The Windows crash is still not reproduced.

  • Upstream report: a nodejs/node report is drafted for the owner outside the repo; issue text isn't kept in the repo.

  • test/workflows.test.ts now allows the fourth workflow and pins it as dispatch-only.

Verification

  • npm run verify exits 0 on this exact tree:

    • core: 1072 pass;
    • workspaces: abuse 41, audit 42, mail 34, mcp 49, ui 103, forms 58, store 86, auth 267, form-records 23, admin 49, all with 0 failures;
    • test:addons 4/4.
  • npm run test:package exits 0, with 39 packaged example commands run.

  • New tests:

  • Size budgets, raised from measurements of the merged branch:

    Package Measured (packed / unpacked) New budget (packed / unpacked)
    core 860834 / 3403684 844 / 3330 KiB
    forms 49761 / 196778 52 / 200 KiB
    store 56504 / 220290 58 / 225 KiB
    mcp 45653 / 177930 47 / 180 KiB
    form-records unpacked 115346 unpacked 118 KiB

    The extension growth comes from descriptions now appearing in the schema, the descriptor and the generated README.

Limitations

Closes #821
Closes #822
Closes #823
Closes #824
Refs #708

🤖 Generated with Claude Code

jimhoyd and others added 8 commits September 27, 2026 16:54
…sts (#824)

Package suites ran on Windows only in release coverage, so a Windows-only
package test failure (#819) passed PR CI and first failed at publish (#820).

A pull request whose diff changes extension code now adds Windows Node 24
entries to the existing workspace-verify matrix for those extensions and
their reverse dependencies, selected by ci-plan's dependency map from the
extension paths alone. Core-only changes add none; an empty or
unclassifiable diff fails closed to every extension. Main pushes and
exact-commit/release runs are unchanged. Because the entries live in
workspace-verify, verify-complete's existing requirement covers them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ker abort (#708)

Owner decision: reproduce and report upstream, no crash-masking retry.

- scripts/repro/wasm-worker-churn.mjs: standalone (no URLCode code) worker_threads
  churn that compiles/runs WebAssembly (synthetic hot loops, the QuickJS .wasm,
  quickjs-emscripten) under top-level await and terminates workers while
  loading, compiling or tiering up, then exits with workers live.
- scripts/repro/function-pool-churn.ts: drives the real SandboxPool through the
  deadline-terminate/respawn/close cycle of test/sandbox.test.ts in a loop.
- scripts/repro/run-capture.mjs: runs a command N times, records exit codes and
  the V8 fatal block, writes logs and a step summary; never retries.
- .github/workflows/v8-jit-repro.yml: workflow_dispatch only, read-only, runs
  the reproducers (and test/sandbox.test.ts under node --test) on chosen
  OS x Node legs and uploads logs. Not called by ci.yml or publish.yml.
- test/workflows.test.ts: admit the fourth workflow and pin it as manual-only.

Sandbox isolation and normal npm test/CI runs are unchanged; scripts/ is not
in the published package.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Route `errors: {format: text|json}` and a site-wide `site.errors:
{format: json, paths: [...]}` scope select how runtime-generated errors are
written. `text` stays the default, byte for byte. `json` is the fixed
envelope {"error":{"code","message"}} (application/json; charset=utf-8)
with a closed status-keyed code set; the body-schema 422 carries its bounded
issues inside it. 405 keeps Allow, HEAD keeps no body, security headers are
unchanged, and handler, policy, plugin and extension responses are never
rewritten. A route's own setting wins; otherwise the decoded (or raw) path
decides the site scope, so unmatched paths get a JSON 404 and skip
site.notFound. Hosts write their own pre-handle errors (body-limit 413) via
Runtime.errorFormat.

Self-hosted, AWS and Vercel are native; the Cloudflare artifact carries the
formats (compiled); static hosting refuses the `errors` capability before
building. The spa-shell recipe now uses site.errors for its /api JSON errors
and keeps the plugin for the shell only. Adds RIM-ERRORS-001 and its focused
fixture test/error-format.test.ts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…822, #823)

#823: abuse now declares agent metadata (README.md, SECURITY.md), so its
descriptor and the release catalog carry references and an installed abuse
appears in get_addon_agent_tooling. The extension reference check fails
when any first-party extension has no agent references, none naming its
README, or names a file its package does not ship.

#822: every property in the ten first-party configuration schemas, auth's
route-policy schema and the hook contracts' input/output schemas now has a
description written from the implementation (299 schema/policy properties
plus 30 hook properties; core's shared hook reference schema too).
scripts/generate-extension-reference.ts reuses the #750 description walk
(now scripts/schema-descriptions.ts), fails on an undescribed property, and
renders a Field reference block at the end of each package README from its
urlcode.json: configuration, route policy, peers, hook contracts, authoring
surfaces and the schema-valid-is-not-activatable caveat. The README ships in
every package and is what search_docs reads for an installed add-on, so no
new packaged file. docs/EXTENSION-REFERENCE.md indexes the ten references
and maps capabilities (store shortLinks, forms onSubmit, ...) to keys and
checked examples. npm run check verifies freshness; build:addons refreshes.

The forms README gains a concrete onSubmit declaration and module, and the
store README a shortLinks example; package tests run both verbatim.
llms-full.txt opens with a coverage note naming what it omits and the
bounded paths to it, and bundles the index page. llms.txt, AI-AUTHORING,
FRAMEWORK, EXTENSIONS and CONTRIBUTING link the references;
create-extension scaffolds described schemas and agent metadata.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…measurement

Measured on the merged branch (Node 26):
- core 860834 packed / 3403684 unpacked / 490 entries -> 844 / 3330 KiB
- forms 49761 / 196778 -> 52 / 200 KiB
- store 56504 / 220290 -> 58 / 225 KiB
- mcp 45653 / 177930 -> 47 / 180 KiB
- form-records unpacked 115346 -> 118 KiB

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 27, 2026 22:26
@jimhoyd
jimhoyd merged commit ebc68a1 into main Sep 27, 2026
40 checks passed
@jimhoyd
jimhoyd deleted the claude/issues-708-824 branch September 27, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment