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
fix(gateway): a request waits while a connected worker's catalog is not read yet - #1788
No actionable comments were generated in the recent review.
Walkthrough
When a connected, undrained worker has no catalog, routing checks now defer rejection and wait. This applies to capability, except-list, leading-row, and capacity checks. Tests distinguish drained workers from unread workers and cover requests with unknown platform, model, runtime, or capability. The routing documentation now states this behavior.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 63715
Requests that arrive while a connected worker's catalog is still unread now wait instead of being rejected as unknown. No merge-blocking risk remains in the supplied evidence.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main behavior change: a request waits while a connected worker's catalog is not yet read. The raw summary shows serviceability and routing changes that defer rejection for unread w…
Description check
The description links issue #1629, states the implementation status, and names the pinned test at the old line 182 that is rewritten for the drained case. It relates directly to the serviceability cha…
Linked Issues check
Issue #1629 requires that a request for a model listed only by a connected, undrained worker without a catalog wait instead of failing with UNKNOWN_MODEL. At head 6371556, src/gateway/routing/service…
Out of Scope Changes check
Changes stay within the #1629 fix. serviceability.ts adds isUnread and gates the rejection rows on it. It also extracts the known-worker rows into assessKnown, which is the refactor the fix needs. ser…
Full details: Title check
Explanation
The title names the main behavior change: a request waits while a connected worker's catalog is not yet read. The raw summary shows serviceability and routing changes that defer rejection for unread workers, matching the title. The title uses the conventional fix(gateway) prefix and is 80 characters, slightly long but specific.
Full details: Description check
Explanation
The description links issue #1629, states the implementation status, and names the pinned test at the old line 182 that is rewritten for the drained case. It relates directly to the serviceability changes, so it is not off-topic. It is mostly process metadata, but the check is lenient.
Full details: Linked Issues check
Explanation
Issue #1629 requires that a request for a model listed only by a connected, undrained worker without a catalog wait instead of failing with UNKNOWN_MODEL. At head 6371556, src/gateway/routing/serviceability.ts adds isUnread (connection === "connected" && !drained && catalog === undefined). assessLeading returns no rejection when any view is unread, so the UNKNOWN_MODEL check in assessKnown is skipped. assessExcept, assessServing, and the requires branch of assessFleet also return route-or-wait when an unread view exists. The NO_DRIVER and RUNTIME_MISSING rows are skipped in the same way. The pinned test at serviceability.test.ts:182 is rewritten to the drained case, and a new wait test covers the unread case, per the PR description and the changed-file summary. #1300 (UNKNOWN_BASELINE) is background context only and is not a requirement here. The non-blocking note that the NO_CAPACITY row lacks a dedicated test is a coverage observation, not an issue requirement. Limit: the serviceability.test.ts diff was not readable, so test behavior is taken from the PR summary. The head file read confirms the implementation.
Full details: Out of Scope Changes check
Explanation
Changes stay within the #1629 fix. serviceability.ts adds isUnread and gates the rejection rows on it. It also extracts the known-worker rows into assessKnown, which is the refactor the fix needs. serviceability.test.ts changes the pinned test and adds the wait test. docs/internal/adr/0009-gateway-routing-is-a-list-of-stages.md and src/gateway/routing/AGENTS.md document the new waiting rule for unread workers. These documentation changes support the behavior change and do not add unrelated behavior. No unrelated change was found in the evidence available. The serviceability.test.ts diff could not be read, so test-only edits are assessed from the summary.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Runs: 10. Cost USD: 2.416. Agent seconds: 972.
Tokens input 188, output 43413, cache read 3705724, cache write 406218.
- build implementer: claude-sonnet-5-5 197 s $0.2452
- audit implementer: claude-sonnet-5-5 53 s $0.1226
- review 1 reviewer: claude-sonnet-5-5 220 s $0.1476
- review 1 spec: claude-sonnet-5-5 29 s $0.1542
- review 1 code behaviour: claude-opus-5-5 155 s $0.7868
- review 1 claims: claude-sonnet-5-5 27 s $0.1433
- fix 1 implementer: claude-sonnet-5-5 49 s $0.1792
- review 2 reviewer: claude-sonnet-5-5 141 s $0.1294
- review 2 code behavior: claude-opus-5-5 84 s $0.4038
- review 2 claims: claude-sonnet-5-5 17 s $0.1039
Finding outcomes: {"fixed":1}. Classes: {"restart window left on requires/except rows; claim false":1}.
{"findings":[{"id":"R1","role":"code","class":"restart window left on requires/except rows; claim false","outcome":"fixed","fix":"63715562c38520fb31f6ada6be64b4b169d62ceb","path":"src/gateway/routing/serviceability.ts","round":"1"}]}
Not blocking, not verified. Each is one reviewer's claim.
spec: src/gateway/routing/serviceability.test.ts row 5 (NO_CAPACITY) has no test of its own; the new wait test covers assessServing's isUnread guard only indirectly.
## Summary
Rewrites the website docs as task pages and concept pages, 63 pages in
all:
- **Task page:** one task: a `Result:` line, *Before you start*, steps
that end in a `Check:` line, and a *When it fails* table.
- **Concept page:** what a feature is and how it behaves, with no steps.
Getting started has one install page per OS (macOS, Linux, Windows
preview). New sections: Concepts and Troubleshooting. New reference
pages: MCP tools, Node client and Web console. Each fact lives on one
page; other pages link to it.
Also:
- Removed URLs redirect to their new pages.
- The docs links in the CLI, the console, the manuals and `README.md`
point at the new pages.
- The sidebar sections in `website/src/site/pages.ts` name the new
folders.
- SSO sign-in (#1632) and the gateway catalog wait (#1788) are
documented.
- Docs the code contradicted are fixed.
## Validation
- [x] `pnpm --dir website build`: 140 pages, no broken internal links
- [x] `node website/scripts/check-openapi.mjs`
- [x] `pnpm test:changed` (3610 passed)
- [x] `pnpm typecheck`
- [ ] Walk each install page on a clean machine
## Review
Spec review: skipped. Code review: 0 blocking, 0 fixed, 0 notes. Claims
review: 2 blocking, 2 fixed, 0 notes.
Assessment: complete
Rounds: 2. Tokens: 18.8M.
- claims: Ctrl-C on a waiting `simlock lease` cancels the request
(`concepts/queue-and-capacity`), fixed in 4a580f9.
- claims: a phone is not erased after a lease; only apps added since
enrolment are removed (`using-devices/keep-a-device`), fixed in
4a580f9.
*Written by an agent.*
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
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.
Closes #1629
Status
Implement: done Review: round 2 passed, 1 finding fixed Hardware: n/a Gate: running
Next: gate
Assumptions
Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 2. Tokens: 2.1M.
Runs: 10. Cost USD: 2.416. Agent seconds: 972.
Assessment: complete
Written by an agent.