Skip to content

spec: register the three AI_* quota codes in the error-code ledger (ruled Option A on the cloud#1168 vocabulary fork) #7495

Description

@claude

Part of objectstack-ai/cloud#1168. Maintainer ruling 2026-08-11, from the four-lens decision review: Option A — register three codes in ERROR_CODE_LEDGER (packages/spec/src/api/error-code-ledger.zod.ts):

  • AI_ALLOWANCE_EXHAUSTED
  • AI_DESIGN_QUOTA_EXHAUSTED
  • AI_DATA_CHAT_TRIAL_EXHAUSTED

Casing per the mechanical rule in error-code-ledger.test.ts. Each entry documents its CTA semantics (upgrade / top-up / trial) so the three-state mapping is on the ledger row, not in consumer folklore.

Why A over the standard-QUOTA_EXCEEDED-plus-details route: the three states carry distinct CTAs — real business branches, not synonyms; closed-enum literals are the hardest shape for AI consumers to misuse, whereas a structured details read downgrades the check even with a declared shape.

Downstream (not this card): cloud's two producers converge on the literals (cloud#1168, which should carry a Blocked-by: on this card); objectui's parseAiQuotaError switches to the three literals (objectui#3804, held finding until this lands).

Note: this changes the accepted error-code vocabulary — an acceptance-face change, hence domain:spec per the standing red line.

Filed by the triage seat Routine (#5474 pilot) recording a maintainer ruling of 2026-08-11. Unassigned — recording, not claiming.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions