You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b67c1a9
Browse filesBrowse the repository at this point in the historyBrowse files
feat!: every catalog value of the client is lowercase snake_case
The owner decided on 2026-10-25 that every catalog value is lowercase
snake_case with no prefix, and the API carries it from monorepo
bbce0eb9 on, in one cut with no alias. openapi.json is that API's
/openapi: the 44 error codes drop the E_ prefix, forbidden, not_found,
idempotency_key_reused; the audience warnings are fingerprint_unknown
and unsupported_condition_share; an app's framework react-native is
react_native. No path, operation, schema or field changed.
The models follow the snapshot: Framework takes react_native and
AudienceWarning.code the two lowercase warnings. The client's own code
for a body outside the error shape follows the rule,
E_UNEXPECTED_RESPONSE becoming unexpected_response, and the docstrings,
the session-only note, the test fixtures and test titles name the codes
in the new form. The plan-gated docstrings take the snapshot's new
wording, a plan that includes the feature. CLAUDE.md states the rule.
BREAKING CHANGE: HotCodePushError.code carries the API's lowercase
codes, not_found rather than E_NOT_FOUND, and unexpected_response
rather than E_UNEXPECTED_RESPONSE; Framework is react_native rather
than react-native, and AudienceWarning.code is fingerprint_unknown or
unsupported_condition_share. A caller comparing the old values must
change them. The API answers the new
spellings to every client version, so a comparison against
"E_NOT_FOUND" never matches again, whichever client you pin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,10 @@ Run `uv run ruff format .` before every commit; the format check, lint, type che
55
55
56
56
- Auth is `Authorization: Bearer <token>`; the token falls back to `HOTCODEPUSH_TOKEN` and stays optional, since `/health` needs none.
57
57
- Every request sends `X-HotCodePush-Client: <name>/<version>`, `python/<this package's version>` unless the caller passes its own `client`; `User-Agent` goes out only when the caller sets `user_agent`, since a session keeps it and the sessions page names the client by it.
58
-
- Every error is one JSON shape, `code`, `message`, `details`; `HotCodePushError` carries them and the status verbatim, and a body without the shape becomes `E_UNEXPECTED_RESPONSE`.
58
+
- Every error is one JSON shape, `code`, `message`, `details`; `HotCodePushError` carries them and the status verbatim, and a body without the shape becomes `unexpected_response`.
59
59
- Every call goes through `HttpClient`, never a bare `httpx` call: sixty seconds per attempt, `JSON_TIMEOUT_SECONDS` or the caller's `timeout`, and ten minutes for a binary upload, `UPLOAD_TIMEOUT_SECONDS`, each httpx's limit on every phase of the attempt, the connect, each read and write and the pool; `send_with_retry` makes three attempts, backing off exponentially from 500 ms, on a transport error, 408, 429 and 5xx; a 429 or a 503 waits its `Retry-After` instead, at most sixty seconds, the rate-limit window.
60
60
- Every creating `POST` — the eight operations whose OpenAPI document lists the `Idempotency-Key` header: organizations, invitations, apps, channels, releases, rollbacks, bundles and binaries — goes through `fetch_creating_post`, which sends the caller's `idempotency_key` or a UUID generated per call and kept across its retries. A checkout and a customer portal session carry no key and are never retried, since each call creates another Polar object.
61
-
- Any other `POST` is retried only where a repeat is safe, `is_retryable=True`: `pause`, `resume`, the subscription's `cancel` and `uncancel`, a bundle's `complete`, a channel's bulk `revoke`, a signing key's `create`, the SSO verification, the two multipart starts and a file upload's completion; a pack's completion is never retried, since a repeat answers `E_NOT_FOUND` for an upload R2 already closed.
61
+
- Any other `POST` is retried only where a repeat is safe, `is_retryable=True`: `pause`, `resume`, the subscription's `cancel` and `uncancel`, a bundle's `complete`, a channel's bulk `revoke`, a signing key's `create`, the SSO verification, the two multipart starts and a file upload's completion; a pack's completion is never retried, since a repeat answers `not_found` for an upload R2 already closed.
62
62
- Lists take `limit` and `offset`; `relations` and `ids` are lists sent as comma lists, `?relations=user`, `?ids=a,b`, and any other list repeats its parameter, `?attribute=a&attribute=b`.
63
63
-`me` is accepted wherever a `{userId}` appears; the client passes it through.
64
64
- The `/v1/auth/*` slice is Better Auth's and outside the document; its client lives in the CLI and the console, never here.
@@ -75,7 +75,7 @@ Run `uv run ruff format .` before every commit; the format check, lint, type che
75
75
- A model is a `HotCodePushModel` named after the API's entity, its fields the snapshot's properties in snake_case: required ones without a default, nullable ones `X | None`, a relation `X | None = None`; a date-time is a `datetime`, an enum a `Literal`, an alias in `models.py` when two types share it.
76
76
- A query flag documented as `"true" | "false"` is a `bool`.
77
77
- After a resource's `list` method, an annotation writes `builtins.list`, since the method shadows the builtin in the class body.
78
-
- A method whose operation the document marks with `sessionAuth` carries ``An API token answers `E_FORBIDDEN`; sign in with a session.`` in its docstring; the contract test holds the note to the document.
78
+
- A method whose operation the document marks with `sessionAuth` carries ``An API token answers `forbidden`; sign in with a session.`` in its docstring; the contract test holds the note to the document.
79
79
80
80
## The OpenAPI snapshot
81
81
@@ -98,7 +98,7 @@ The integration test runs by hand against that API, started with `ENVIRONMENT=de
98
98
- Result variables carry the past participle of their operation: `fetched_channel`, `resolved_error`.
99
99
- Alphabetical ordering within a scope: imports, dict keys, keyword arguments, model fields, declarations of one kind.
100
100
- Booleans carry `is` or `has`; a state with a moment is a timestamp such as `paused_at`, never a boolean.
101
-
-Error codes are `E_` plus SCREAMING_SNAKE, passed through verbatim, never renamed.
101
+
-Every value of a catalog is lowercase snake_case with no prefix, error codes included: `not_found`, `unexpected_response`; the API's are passed through verbatim, never renamed.
102
102
- Never `cast` or `# type: ignore`; a real check.
103
103
- Test titles read `test_<verb>_…`, the verb in the third person, conditions starting with `when`; one test per request and branch.
0 commit comments