Repository navigation
feat(cli): add void project requests and match 5xx in --level error - #281
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_8f604859-52dc-45bc-bf39-0d09bc9b5e12) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25b7379c9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`void project logs --level error` now also matches responses with an HTTP status >= 500, so a worker that returns a 500 without throwing or logging is no longer invisible — this mirrors the server-side `blob6 LIKE '5%'` filter. Adds `void project requests [--status <5xx|500|…>] [--range <duration>]`, a request-level traffic view (time, method, status, type, timing) backed by edge request metering. Unlike `project logs` (which only has user-worker tail rows) it also surfaces 5xx the edge router generated itself and requests to static/SPA projects that never invoke a worker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011iZtc3xSUBc3NqapBXuYCH
Review feedback: the `\d{3}` alternative accepted out-of-range values such as
`600`, `000`, or `999`, so a typo was passed through to the API and silently
produced an empty result instead of the documented invalid-status error.
Mirrors the same bound applied server-side.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011iZtc3xSUBc3NqapBXuYCH
25b7379 to
78cfaf1
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ec1f9e54-f5b0-481f-8f96-7c00114aaa70) |
|
Addressed in Reject out-of-range exact status filters — valid. The same bound is applied server-side in voidzero-dev/void-platform#239, so the CLI and API validation stay in lockstep. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78cfaf1acb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`void project logs` only has rows when a worker actually ran. 5xx generated by the edge router, and every request to a static/SPA project, produce no log line at all — so AGENT_PROMPT.md and getting-started-prompt.txt were sending agents to a view that cannot show the errors this PR is about. Mirrors the `--level error` / `project requests` split already documented in docs/reference/cli.md, and adds `requests` to the README CLI list. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZzGBP6hyUQNVNZXfd3h5M
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5c00afc9-c8e2-4722-903c-b963ea6e3844) |
Why
A user got a "5xx errors detected" alert for their project but
void project logs --filter errorshowed nothing. Two CLI gaps contributed:--level errornever looked at HTTP status, so a worker that returns a 500 without throwing or callingconsole.errorwas invisible to it.What
--level errornow also matches a 5xx status. The client-side filter inlogs.tskeeps any entry withstatus >= 500, mirroring the server-sideblob6 LIKE '5%'predicate (paired platform PR). A returned-500 with no throw/log is now findable.void project requestscommand — a request-level traffic view (time, method, status, type, timing) backed by edge request metering:project logs(user-worker tail rows only), it surfaces edge-generated 5xx and static/SPA requests that never run a worker.--statusaccepts a class (5xx) or an exact code (500). Depends on theGET /projects/:id/requestsendpoint in the platform PR.client.getRequests,project-args/project-cmd,help, interactive hint, MCP tool catalog, anddocs/reference/cli.md.Known limitation (documented in
--helpand the docs): edge metering does not record the request path, so this view shows status/type rather than URLs. Useproject logsfor per-URL detail on requests that reach the worker.Tests
logs-filter.test.ts:--level errorkeeps a silent-500 (outcome ok, no logs/exceptions,status 500), drops a silent-404;getRequestsbuilds the right query string (omitsstatusby default / forall, appends a class filter).project-args.test.ts:requestsparsing — defaults,--status/--range, accepts classes + exact codes +all, rejects invalid--statusand unknown flags.vp run --filter ./packages/void typecheck,vp fmt --check,vp lintall clean; fullpackages/void/test/unitgreen (2698).🤖 Generated with Claude Code
https://claude.ai/code/session_011iZtc3xSUBc3NqapBXuYCH
Note
Low Risk
CLI-only observability and client-side log filtering; depends on the paired platform
/requestsendpoint but does not change deploy or runtime behavior.Overview
Adds
void project requestsso operators can inspect edge request metering (time, method, status, type, duration) viaGET /projects/:id/requests, with optional--status(e.g.5xx,500) and--range. This covers edge-generated 5xx and static/SPA traffic that never invokes a worker—casesvoid project logscannot show.void project logs --level errornow also keeps entries whose HTTP status is 5xx, even when the worker returned an error response without throwing or logging—aligned with the platform’s server-side error predicate.CLI wiring includes
PlatformClient.getRequests,requests.ts, arg parsing/validation, help, interactive hints, MCP catalog, and docs/agent prompts. Unit tests cover the new 5xx log filter, request URL query params, andrequestsflag parsing.Reviewed by Cursor Bugbot for commit 99dbe39. Bugbot is set up for automated code reviews on this repo. Configure here.