Repository navigation
Conversation
CLI benchmark (Lightweight Commands): no changes foundCommit
API calls: unchanged for all 9 commands. Binary size: 135.6 MB, unchanged. Details: timing ranges, API calls per command, slowest phasesTiming ranges
API calls per command
Slowest phasesNo command moved beyond noise, so there are no phase deltas. Comment |
There was a problem hiding this comment.
🤖 AI Review
CLI reference prose guidance: snapshot supabase/supabase@ca8ee0b supplied to reviewers (advisory, not a style pass).
Machine-readable errors can now carry an entitlement without the upgrade URL required by stable v3.3.0, which can break consumers that rely on that field. SSO denials also lose the billing link when the previous lookup would have succeeded. The PR changes no CLI reference prose, and the supplied next-branch context shows no fundamental conflict.
Findings
| Severity | Location | Category | Sources | Claim |
|---|---|---|---|---|
| 🟠 MAJOR | apps/cli/src/shared/output/normalize-error.ts:56 |
compatibility |
codex | Consumers of json or stream-json errors that check for error.entitlement before validating or using upgrade_url can now fail while handling a plan denial. A response that previously omitted the entire entitlement can now emit an entitlement without the required URL. |
| 🟡 MINOR | apps/cli/src/command-internal/upgrade-suggest.ts:83 |
ux-regression |
claude | For sso add, update, list, and remove, plan denials without an upgrade URL now skip a lookup that could supply the organization billing link and telemetry slug. When the handler forwards the entitlement, the hint omits the link and cli_upgrade_suggested carries an empty org_slug. The SSO 404 branches that discard the entitlement also lose the hint and event when the old lookup would have succeeded. |
| ⚪ NIT | apps/cli/src/shared/output/normalize-error.ts:18 |
documentation |
codex | The upgradeHint JSDoc describes only the billing-link variant. |
| ⚪ NIT | apps/cli/src/command-internal/http-errors.unit.test.ts:138 |
test-quality |
codex | The new assertion reads the entitlement through reflection, bypassing the TestStatusError field declaration. |
| ⚪ NIT | apps/cli/AGENTS.md:253 |
docs |
claude | The contributor guide describes entitlement as an optional object containing both feature and upgrade_url. The URL is now optional within the object. |
Findings outside the diff
- 🟡 MINOR
apps/cli/src/command-internal/upgrade-suggest.ts:83— Forsso add,update,list, andremove, plan denials without an upgrade URL now skip a lookup that could supply the organization billing link and telemetry slug. When the handler forwards the entitlement, the hint omits the link andcli_upgrade_suggestedcarries an emptyorg_slug. The SSO 404 branches that discard the entitlement also lose the hint and event when the old lookup would have succeeded. - ⚪ NIT
apps/cli/AGENTS.md:253— The contributor guide describesentitlementas an optional object containing bothfeatureandupgrade_url. The URL is now optional within the object.
Refuted findings (kept for transparency, not posted as review comments)
apps/cli/src/command-internal/http-errors.ts:136(error-handling): When a branching denial omits the upgrade URL, text-mode users lose the organization billing link even when the existing fallback could resolve it.
Refuted: The pre-PR branch handler already mapped the status error directly and had no billing lookup to lose. The changed unit test exercises the shared helper in isolation with a synthetic feature key. The actual callers that lose the fallback are the SSO handlers covered by claude-1.
Stats
Claude findings: 2 · Codex findings: 4 · Confirmed: 5 · Refuted: 1 · Uncertain: 0
Models: claude-opus-5-5 + gpt-6.2-sol · Trigger: auto · Workflow run
This review runs once per PR. A maintainer can request another with a /ai-review comment.
987ad4b to
5718fae
Compare
|
On the AI review's findings outside the diff:
|
5718fae to
d9374a6
Compare
The Management API omits upgrade_url from an entitlement_required body
when it cannot resolve the organization. The CLI dropped such gates, so
the error had no entitlement, telemetry did not classify it as plan_limit,
and no upgrade hint printed. A gate with a valid feature now keeps its
entitlement, with upgrade_url only when it is a safe web URL, and the text
hint omits the upgrade link when there is none.
BREAKING CHANGE: in json and stream-json errors, `error.entitlement` can
now be `{ feature }` without `upgrade_url`.
d9374a6 to
ea538eb
Compare
The Management API's
entitlement_requiredbody has an optionalupgrade_url: the API leaves it out when it can't resolve the organization. The CLI treated a gate without a usable URL as no gate at all. The failure carried noentitlement, telemetry classified it from the bare status instead ofplan_limit, and text mode printed no upgrade hint.A gate with a valid
featurenow always keeps itsentitlement.upgrade_urlis included only when it's a safe web URL, as before. A missing, non-web, credential-bearing or oversized URL now gives{ feature }instead of dropping the gate, so an unsafe URL is still never printed.Your organization's plan does not include this feature.cli_upgrade_suggestedfires with an emptyorg_slug, as it already did for a URL it couldn't parse.Breaking change
In
jsonandstream-jsonerrors,error.entitlementcan now be{ "feature": "…" }withoutupgrade_url. Until now,entitlementappeared only with both fields. Consumers that useupgrade_urlwheneverentitlementis present should treat it as optional.