Skip to content

fix(build): correct billing error code in error-report docstring - #837

Open
christian-byrne wants to merge 1 commit into
mainfrom
christian-byrne/fix-build-error-code-docstring
Open

fix(build): correct billing error code in error-report docstring#837
christian-byrne wants to merge 1 commit into
mainfrom
christian-byrne/fix-build-error-code-docstring

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

What

`_report_builder_error`'s docstring cited `SUBSCRIPTION_REQUIRED` as an example builder error code. comfy-builder never emits that code — it only emits `PAYMENT_REQUIRED` for billing refusals (`services/comfy-builder/apiserver/httpkit/billing_gate.go:44`, confirmed against current cloud `main`).

Why this matters

Agent-facing guidance (docstrings/comments agents read to decide how to react to a builder error) told them to match a code the server never sends, risking a permanent billing refusal being treated as an unmatched/retryable error by any caller trying to special-case it.

Verification

  • `_builder_msg` (the actual error-body parser) has no hardcoded code matching — it passes the body's `error` field through verbatim, so runtime behavior already surfaced the real `PAYMENT_REQUIRED` string correctly. This is a documentation-only fix; no behavior change.
  • Cross-checked against comfy-builder source: `PAYMENT_REQUIRED` is the only billing error code emitted (billing_gate.go, api.gen.go, releases/builds billing_gate_test.go).
  • Full build test suite: 574 passed, 1 skipped.
  • ruff clean.

Source: Linear BE-11190

…ring

Docstring cited SUBSCRIPTION_REQUIRED as an example builder error code,
but comfy-builder only ever emits PAYMENT_REQUIRED for billing refusals
(services/comfy-builder/apiserver/httpkit/billing_gate.go). The actual
error-mapping code (_builder_msg) passes the body's error field through
verbatim with no hardcoded matching, so behavior was already correct —
this fixes the misleading guidance only.

Source: Linear BE-11190
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 61936d0f-ac27-4c8f-9fc0-b57b35f0376e

📥 Commits

Reviewing files that changed from the base of the PR and between 3fddc3e and dfb8c8f.

📒 Files selected for processing (1)
  • comfy_cli/command/build.py

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The builder error documentation now identifies PAYMENT_REQUIRED responses instead of SUBSCRIPTION_REQUIRED. No exported or public entities changed.

Changes

Builder error documentation

Layer / File(s) Summary
Update documented error response
comfy_cli/command/build.py
The documented builder error body now uses PAYMENT_REQUIRED. A tiny wording fix, but the error name now fits the payment flow.

Suggested reviewers: guill, james00012

Merge Risk: ⚪ Minimal · up to dfb8c

This localized documentation-only change corrects the billing error code example without changing runtime behavior, and the reported checks pass; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch christian-byrne/fix-build-error-code-docstring
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch christian-byrne/fix-build-error-code-docstring

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested review from guill and james00012 September 2, 2026 00:26
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