Skip to content

test(web): lock in the engine's real (bare) no_such_endpoint 404 shape - #13

Open
Morgandri1 wants to merge 1 commit into
mainfrom
web/ingress-error-shape-gap
Open

test(web): lock in the engine's real (bare) no_such_endpoint 404 shape#13
Morgandri1 wants to merge 1 commit into
mainfrom
web/ingress-error-shape-gap

Conversation

@Morgandri1

Copy link
Copy Markdown
Owner

Summary

Re-probed the endpoint Test button now that engine-side ingress landed (340f318). Found a real shape mismatch (not a web bug — filing the fix request with SDK separately):

  • Every other engine route builds its error body from wheel_core::ErrorBody ({"error":{"code":...,"message":...}}) — see crates/wheel-engine/src/api/mod.rs:79.
  • API's own ingress_honesty test mocks the same wrapped shape (crates/wheel-api/tests/ingress_honesty.rs:43).
  • The real crates/wheel-engine/src/api/ingress.rs:169 err() helper instead emits a bare {"code":"no_such_endpoint"} — no error wrapper, no message.

Because web/src/lib/endpoint-probe.ts's errorCode() only recognizes the documented envelope (by design — a bare top-level code could belong to an endpoint's own response body, so it can't be loosened without risking a false positive), a real "no endpoint at this path" 404 today falls through to the generic bodied-404 message instead of the specific "no endpoint at this path" one already written for exactly this code. Not misleading, just less specific than intended.

This PR documents today's real, verified behavior in a test (rather than asserting the intended-but-not-yet-true behavior), with a comment pointing at exactly what to flip once the engine-side fix lands.

Test plan

  • pnpm typecheck / pnpm lint / pnpm test (endpoint-probe.test.ts: 16/16, full suite 279/279)

Ingress landed on main (340f318). Its 404 body is a bare
{"code":"no_such_endpoint"}, not the {"error":{"code":...,"message":...}}
envelope wheel_core::ErrorBody gives every other engine route and that
this parser requires by design. errorCode() correctly returns null for
it today, so probeVerdict falls through to the generic bodied-404
message instead of the specific one already written for this code.
Documents current real behavior rather than intended behavior; flip
once SDK's ingress.rs builds a real ErrorBody (reported separately).
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deployment failed for project wheel with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/morgandri1s-projects?upgradeToPro=build-rate-limit

Morgandri1 added a commit that referenced this pull request Sep 7, 2026
PM's objection, and it is correct: a fix that satisfies 'resolves within
60s' by killing and respawning the child every 60s PASSES a bare deadline
assertion while being worse than the bug. The agent leaves 'starting' on
schedule, forever, burning a spawn a minute and delivering nothing. From
outside it is indistinguishable from a real fix.

Three axes now, and the third is the one that tells them apart:
  SETTLED  — the status afterwards is an answer, not another transitional
             state. A deadline that re-enters 'starting' has made the hang
             periodic rather than resolved it.
  READABLE — a non-empty last_error. A status change with no reason sends
             the operator to the logs to reconstruct it, which is the 45
             minutes this class costs.
  ONE PROC — no second pid across the window (§3c #13). Counted over TIME,
             because at any single instant a respawn loop looks exactly
             like an agent that is simply starting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1nLndrG8rrdr5ar7P6WkN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant