Skip to content

fix(core-sync): a server that never answers is out of reach in seconds, and the engine opens without waiting on it - #4688

Merged
datlechin merged 1 commit into
mainfrom
lane/f21-core-offline-launch
Nov 28, 2026
Merged

datlechin merged 1 commit into
mainfrom
lane/f21-core-offline-launch

Conversation

@datlechin

@datlechin datlechin commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • A server that takes the connection and never answers (a paused container behind a published port, over plain HTTP/1.1) is now out of reach after ANSWER_TIMEOUT (10 s). Before, it took the client's 30 s request timeout per call.
  • The window bounds only how long a small call waits for its answer to start. It applies to the token refresh, the company server's license and JWKS, discovery, the account's generated-client calls and the sync scopes read. A body that has started still reads under the client's timeout, and transfers keep 30 s.
  • Account::signed_in_as answers from the last published sign-in that names the account and the device, so the sync engine opens and shows last_synced_ms while the launch refresh still waits on the server. An incomplete or unpublished sign-in still waits for the call in flight, as before.
  • After a pass fails in a way a later try can get past, the next pass reports Waiting { retry_in_ms: 0 } until the scopes read answers, whoever runs it. The backoff's end keeps Waiting too. Before, every retry said Syncing for the length of its timeout.

Test plan

  • http: the scopes read of a server that never answers fails as the network within the answer window.
  • oauth: a token refresh against such a server is Unreachable within the window.
  • account: the sign-in names itself while a refresh waits on such a server; one with no device yet waits for the refresh.
  • tests/engine/status.rs: a pass after a network failure says Waiting, then Syncing only once answered.
  • Local behind mem-guard at b3f3667dba (before the rebase onto 07a3028, which touches none of these files): verify.sh --platform windows core for cloud-api, account, sync and ffi all PASS. Clippy -D warnings passes on host and in the tablepro-linux-dev container. verify.sh --platform windows bindings passes with no change.
  • After the rebase, at b82534e: clippy -D warnings on the touched crates passes.

…s, and the engine opens without waiting on it

- Small calls wait `ANSWER_TIMEOUT` (10 s) for their answer to start: token refresh, license, JWKS, discovery, the generated client, the scopes read. Transfers keep 30 s.
- `Account::signed_in_as` answers from the last published complete sign-in, so the engine opens while the launch refresh waits.
- A pass after a retryable failure reports `Waiting { retry_in_ms: 0 }` until the scopes read answers.
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