mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #426] [MERGED] fix(cursor-approve): name the API error when the direct axis runner fails #426
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#426
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/426
Author: @mattmillerai
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @mattmillerai
Base:
main← Head:matt/axis-direct-api-error-cause📝 Commits (2)
b98f70dfix(cursor-approve): name the API error when the direct axis runner fails8fd42c9docs(cursor-approve): say the axis error gate is narrower than the panel's, not identical📊 Changes
3 files changed (+105 additions, -4 deletions)
View changed files
📝
.github/cursor-approve/tests/test_axis_direct.py(+86 -1)📝
.github/workflows/cursor-axis-base.yml(+18 -2)📝
docs/callers/cursor-approve.md(+1 -1)📄 Description
What
Run the axis (direct)gated itsagent-error.pydiagnostic onrc != 0. Claude Code reports an API-level failure as:— note
subtype, which reads as success — and exits 0. So the one shape_api_error_causewas written to name never reached the diagnostic.This gates it on the outcome instead, like the panel's direct cell (
Report cell outcome, onstatus != ok). The gate is narrower, though: it fires only on a nonzero exit oris_error, the two outcomes that can carry a provider cause. A clean result that fails a later guard (num_turns, reply type) has no cause to name, and those guards print their own::error::.Why
On a private consumer's PR, the
CURSOR_REVIEW_ANTHROPIC_API_KEYorg hit its Anthropic spend cap. Both axes uploaded no verdict, so cursor-approve posted CHANGES_REQUESTED with zero findings and the card read:That is indistinguishable from a model that answered nothing. The real cause —
400 You have reached your specified API usage limits. You will regain access on 2026-11-01 at 00:00 UTC— was sitting unread in/tmp/axis-claude-result.json, and finding it meant opening the job log. This is theagent-error.pydocstring's own stated purpose ("an Anthropic-lane outage was otherwise undiagnosable without re-running the cell") not being reached on the axis lane.Verified against the real shape — old gate skips, new gate fires:
Security
No new publishing surface:
agent-error.pyscreens the cause forANTHROPIC_API_KEYand thesk-ant-prefix, and caps it atCAUSE_LIMIT. The bounded, documented channel from #402 is unchanged — deliberately not widened, even though the cap truncates just before the words "usage limits" (api_error_status=400plus the visible prefix is already unambiguous).jqloads no module from the cwd, so it needs no-Iequivalent like the adjacent stdin Python.Tests
New
ApiErrorDiagnosticclass in.github/cursor-approve/tests/test_axis_direct.py— 6 tests that read the realifcondition out of the workflow and execute it, so the gate cannot drift back:No input was added or removed, so no caller needs to change.
docs/callers/cursor-approve.mdgains one sentence on the now-named cause.Provenance
Authored by: agent-work loop
Verified:
.github/cursor-approve/tests: 310 tests OK at head (includes the 6ApiErrorDiagnostictests that run the real gate)check_workflow_pins.py,check_agents_md.py --root .,check-org-repo-literals.sh: all pass8fd42c9(all checks pass; no merge-queue run yet)Deviations:
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.