Skip to content

fix: desktop updates resume a short 206, ambiguous citations stay ambiguous, and mobile mentions keep retained models - #453

Merged
trancong12102 merged 3 commits into
mainfrom
onicode/followups-p2
Nov 19, 2026
Merged

trancong12102 merged 3 commits into
mainfrom
onicode/followups-p2

Conversation

@trancong12102

@trancong12102 trancong12102 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Three follow-ups from upstream sync reviews, one per surface.

What was wrong and the fix

  • The desktop updater gave up on a short 206. After a stall, the patched electron-updater resumed with a Range request and checked only where the 206 started. A mirror that answered bytes 4-7/12 let it finish the file at 8 bytes. The whole-file digest then failed with ERR_CHECKSUM_MISMATCH, and bytes 8-11 were never requested.
    • Now a resumed response that ends before the total it declared counts as a stall. The next retry asks for the rest, as the server's pinned runtime download already does.
  • An ambiguous citation could open one file across overlapping projects. Take a root whose own basename search was ambiguous by case (team/Foo.ts and archive/FOO.ts under /repo). It added nothing to the root hit count. With /repo/team also registered, the count was 1, the cross-root scan was skipped, and foo.ts opened /repo/team/Foo.ts.
    • Now a root that lists the name, even ambiguously, counts as a hit.
  • Mobile @ mentions dropped retained models. After a failed provider check, the server publishes status: "error" with modelsRetained: true. Desktop's model picker kept offering the models, but mobile's mention menu required status === "ready".
    • The picker's readiness rule moves to @onicode/client-runtime/providerPickerReadiness. Desktop's picker and mobile mentions use it. Prompt links keep preferring a ready, then a warning instance, and fall back to one that kept its models, so a provider=codex link no longer drops to the default model while the pickers still offer Codex.

Tests

  • ElectronHttpExecutor.test.ts: a resumed response that ends early is followed by a request for the rest, and the file completes.
  • workspaceBasenameLookup.test.ts: an ambiguous root plus an overlapping root returns no single match.
  • use-composer-command-menu.test.ts: a provider that kept its models after a failed check is offered in mentions.
  • promptLinks.test.ts: a prompt link resolves to an instance that kept its models after a failed check.
  • Each new case fails on main.

Rejected

  • Pinned runtime resume under Content-Encoding. The concern was that a gzip-encoding mirror would make the decoded byte count a wrong Range offset. GitHub and R2 release assets send no Content-Encoding, and undici sends accept-encoding: identity with a Range request, so no host Onicode downloads from can trigger it.

Council review

Round 1: Codex (gpt-6.2-sol, high) and Claude Opus. Both confirmed the three fixes and that each new case fails on main for the right reason.

  • Both, the shared prompt-link resolver still skipped an instance with retained models, so a link fell back to the user's default. Fixed (see round 2 for the final shape).
  • Both, desktop's picker is slightly stricter now: a ready snapshot that is not installed or is signed out no longer passes. No provider reports that combination. Kept, since it matches mobile's rule.
  • Codex, mobile mentions can offer fx's Default model while fx's default backend is signed out and another backend is usable. Desktop's picker already does the same, because Default carries no backend. Left, see below.
  • Both, an empty resumed 206 still falls through to the digest. Kept: retrying a response that made no progress could loop.
  • Opus, stalls and short 206s share 3 retries that don't reset on progress. Opus, the progress bar reaches 100% at a short end. Left, see below.

Round 2: both reviewers on the prompt-link change.

  • Both, using the readiness rule as the prompt-link filter let a retained error instance win over a usable warning one, and dropped warning instances that resolved before (Claude's account check still pending). Fixed: prompt links keep main's ready-then-warning order and use a retained-models instance only last.
  • Opus, no test pinned the ready preference. Added.
  • Both confirmed desktop's picker rule is unchanged by the type narrowing.

Left

  • fx Default with a signed-out default backend is offered by both pickers and mobile mentions. fx should publish Default under its backend, or leave it out while that backend is signed out.
  • Updater retries don't reset when an attempt makes progress, so a mirror that caps every range at a few bytes still fails after 3 retries, now with "Partial content ended before the declared total". A body cut short by ERR_CONTENT_LENGTH_MISMATCH or a reset isn't retried either.
  • Mobile's own model picker never checks status, so it offers models of an error provider with no retained models, which desktop hides.

Opus 5.5 in Claude Code, through Onicode.

🤖 Generated with Claude Code

trancong12102 and others added 3 commits November 20, 2026 03:11
…iguous, and mobile mentions keep retained models

- The patched electron-updater treats a resumed 206 that ends before its
  declared total as a stall and asks for the rest.
- A project root left ambiguous by case still counts as listing the name, so
  an overlapping root cannot make the citation open one file.
- The model picker's readiness rule moves to client-runtime; mobile mentions
  and prompt links use it, so models kept after a failed check stay offered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… kept after a failed check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trancong12102
trancong12102 merged commit e363d11 into main Nov 19, 2026
18 checks passed
@trancong12102
trancong12102 deleted the onicode/followups-p2 branch November 19, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant