Skip to content

Retry FW Lite update check after a failed fetch - #2729

Open
hahn-kev-bot wants to merge 2 commits into
developfrom
fw-lite-update-check-retry
Open

hahn-kev-bot wants to merge 2 commits into
developfrom
fw-lite-update-check-retry

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

if something blocks the update check (no internet for example), then it won't retry for another 8 hours. It should retry next startup or if internet comes back.


AI summary

A field log showed FW Lite launched while a VPN was still connecting: DNS was dead for about 75 seconds, the update check failed with No such host is known, and the app then treated that as a completed check, so it did not try again for the 8-hour UpdateCheckInterval.

  • UpdateChecker.CheckForUpdate only records the check and populates the 2-minute manual-check cache when the server actually answered. A server error response still counts as a check; a request that never reached the server does not.
  • ConnectivitySyncTrigger re-runs TryUpdate() when network access transitions into Internet, alongside re-establishing push listeners. The throttle still gates it.
  • The FW_LITE_CHAOS handler now also covers the Lexbox client used by the update check, adds an HttpRequestException wrapping SocketException(HostNotFound) fault (the shape seen in the field), and accepts a numeric injection rate (FW_LITE_CHAOS=1.0) so a failure is reproducible. true still means 30%.
  • .claude/launch.json gains viewer-dev and fw-lite-web-chaos entries for running that repro from the Claude desktop app.

Test plan

  • dotnet test backend/FwLite/FwLiteShared.Tests --filter FullyQualifiedName~UpdateCheckerTests (11 pass, 3 new: failed fetch does not record or cache and retries; successful response records and caches; server error still records)
  • FwLiteMaui Windows target builds
  • Ran FwLiteWeb with FW_LITE_CHAOS=1.0 and UpdateCheckCondition=Always: startup update check and OIDC discovery both fail with the injected No such host is known fault, matching the field log

🤖 Generated with Claude Code

A request that never reached the server (offline, DNS still down while a
VPN connects) used to count as an update check, so the next attempt was
UpdateCheckInterval (8h) away. Only record the check and populate the
manual-check cache when the server actually answered, and re-run the
check from ConnectivitySyncTrigger when internet access returns.

The FW_LITE_CHAOS handler now also covers the "Lexbox" client used by the
update check, injects the HttpRequestException/SocketException(11001)
shape seen in the field, and accepts a numeric injection rate so a
specific failure is reproducible instead of a dice roll.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da8190c6-2b5a-4410-a184-6201d5d8a796
📥 Commits

Reviewing files that changed from the base of the PR and between 4e1a664 and dd84f2d.

📒 Files selected for processing (7)
  • .claude/launch.json
  • backend/FwLite/FwLiteMaui/Services/ConnectivitySyncTrigger.cs
  • backend/FwLite/FwLiteShared.Tests/AppUpdate/UpdateCheckerTests.cs
  • backend/FwLite/FwLiteShared/AppUpdate/UpdateChecker.cs
  • backend/FwLite/FwLiteShared/FwLiteSharedKernel.cs
  • backend/FwLite/FwLiteWeb/Services/NetworkChangeSyncTrigger.cs
  • backend/FwLite/Taskfile.yml
  • Autopilot · 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Oct 6, 2026
@argos-ci

argos-ci Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Oct 7, 2026, 7:24 AM
e2e (Inspect) ✅ No changes detected - Oct 7, 2026, 7:31 AM

… record malformed replies

- TryUpdate takes a lock so the startup check and a connectivity-regained
  retry cannot both pass the throttle and apply the same update twice.
- FwLiteWeb's NetworkChangeSyncTrigger retries the update check when the
  network comes back, matching the MAUI trigger.
- Only a request that never got a response skips the throttle record; a
  response we fail to read or parse still counts as a check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@myieye myieye left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work 👍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants