Repository navigation
The SDKs raise a typed WrongCell that names the org and its cell - #521
Merged
Merged
Conversation
This was referenced Nov 11, 2026
zlareb1
force-pushed
the
feat/cell-router-lookup-cache
branch
from
November 11, 2026 14:48
59f8325 to
260150b
Compare
zlareb1
force-pushed
the
feat/cell-wrong-cell-error
branch
from
November 11, 2026 14:48
9dbb584 to
ee490a8
Compare
zlareb1
force-pushed
the
feat/cell-router-lookup-cache
branch
from
November 11, 2026 15:11
260150b to
d3a17d0
Compare
zlareb1
force-pushed
the
feat/cell-wrong-cell-error
branch
from
November 11, 2026 15:11
ee490a8 to
c342df7
Compare
zlareb1
force-pushed
the
feat/cell-router-lookup-cache
branch
from
November 11, 2026 15:31
d3a17d0 to
62935d3
Compare
zlareb1
force-pushed
the
feat/cell-wrong-cell-error
branch
from
November 11, 2026 15:31
c342df7 to
5386e61
Compare
zlareb1
force-pushed
the
feat/cell-router-lookup-cache
branch
from
November 11, 2026 15:47
62935d3 to
70d88ba
Compare
zlareb1
force-pushed
the
feat/cell-wrong-cell-error
branch
from
November 11, 2026 15:47
5386e61 to
1f1a1b2
Compare
zlareb1
force-pushed
the
feat/cell-router-lookup-cache
branch
from
November 12, 2026 00:51
70d88ba to
a193b36
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/cell-wrong-cell-error
branch
from
November 12, 2026 01:10
1f1a1b2 to
f920c51
Compare
zlareb1
marked this pull request as ready for review
November 12, 2026 01:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The Python and TypeScript SDKs raise
WrongCell(aPreconditionFailed) for the server's 409WRONG_CELL, with.organd.cellnaming the org and the cell that holds it, so a client can look that cell's host up with the router'sGET /cells/lookupand call it.Why
The seventh of the pull requests that implement cells. It stacks on #520. #473 added
WRONG_CELLand said the SDKs map it by status until a typed error comes; a caller had to parse the message to learn which cell holds its org.Design
server/core/errors.py):WrongCellErrorputsorgandcellin its detail (cellis '' when the router named none, for a caller that may not place the org). The detail tells the caller nothing new: the message already named both. The org is one the caller may act in (a principal is checked withmay_act_in_orgfirst), a configured sign-up or JIT org, or one a platform admin named (ratelimit.set), and an org's cell is public through the lookup.sdk/python/loom/errors.py):WrongCell(PreconditionFailed), registered forWRONG_CELL;from_responsefills.organd.cellfrom the detail. Exported fromloom.sdk/typescript/src/errors.ts):WrongCell extends PreconditionFailed, chosen for a 409 with codeWRONG_CELL;organdcellread the detail. Exported from the package.PreconditionFailedsubclasses, so a caller that catches that today keeps working.WRONG_CELLrow tells a raw HTTP or MCP caller aboutdetail.celland the lookup; the SDK public-surface snapshot gainsWrongCell.Scope and risk
Additive: two detail fields and one error class in each SDK. Still to come with the routing pull request: routing rules 1 to 4,
loom login --organd the org-first sign-in page.Compatibility, rollout and rollback
An SDK of this release talking to a server without the detail fields gets a
WrongCellwhosecellandorgare ''. An older SDK keeps mappingWRONG_CELLtoPreconditionFailedand ignores the new fields.Tests
tests/unit/test_sdk_errors_from_response.py: every server code maps to its documented SDK class (nowWRONG_CELL→WrongCell); aWrongCellError's own detail, with and without a cell, becomes aWrongCellthat is aPreconditionFailedand names the org and the cell.sdk/typescript/src/errors.test.ts: a 409WRONG_CELLis aWrongCelland aPreconditionFailed, naming the org and cell, and '' with no cell in the detail;test/package/exports.test.tslists the export.tests/unit/test_sdk_surface_contract.py: the snapshot is updated.npm run check(lint, type-check, 318 tests) andnpm run check:distpass; the SDK and doc unit tests pass (795 passed before the snapshot update, then the surface contract);make lintandmake typecheckpass. The full unit suite has not run on this stack.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass (the full unit suite result follows in Tests).docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code