feat(#596): per-worker RigForge "new version available" badge - #688
Merged
Conversation
All five external call sites — the GitHub release check (#224), the three XvB reads (stats, reward estimates, winners), and the CoinGecko price feed (#651) — read via a shared helper/http.py bounded_get that streams the body and cuts it at 1 MiB. Over-cap raises a RequestException subclass, so each client's existing fail-silent contract (None / keep last good) applies unchanged. Known residual from the #642/#646 security reviews; the local Telegram/healthchecks/monerod clients keep their own contracts and stay out of scope. Closes #660 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One fleet-wide, hourly, Tor-routed fetch of the latest RigForge release
(UpdateChecker.latest_release_cached, gated on the same
dashboard.check_for_updates flag) cached as raw {tag, url}; each rig's
badge is derived at the render seam from its live reported version
(rigforge_update_for), so derived state never outlives its inputs (#664)
and a rig on X can never badge X available. compute_update normalizes
the rig's bare 1.11.2 against the tag's v1.11.2. Badges render in the
Workers Alive table and Worker Inspect; rigs reporting no version show
no badge (unknown, not up-to-date).
Closes #596
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 19, 2026
…cstring + catalog row - Snapshot restore popped `update` (#664) but not `rigforge_release`, so with check_for_updates flipped off a restored snapshot re-seeded stale per-worker badges until the first poll cycle. Pop it alongside `update`; the checker re-fetches on its own cadence. Extends the #664 restore test (fails without the pop). - update_checker docstring said the check is opt-in (default off) — the config default and docs/configuration.md say on by default. Docstring now matches. - testing-strategy scenario catalog (Section I) gains the #596 badge row: tier 1 covered today, live badge owed to the #597 gouda loaner session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
VijitSingh97
added a commit
that referenced
this pull request
Jul 21, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #596. Stacked on #686 (the #660 bounded-HTTP helper — this adds the next GitHub call site on top of it); retarget to
developafter #686 merges.An operator has no way to see that a rig is running an old RigForge. This adds the notify-only visibility half of the v1.10 worker-upgrade theme (#598): a rig whose reported RigForge version is older than the latest published release gets a clickable badge in the Workers Alive table and in Worker Inspect, linking to the release notes. The one-click upgrade is the separate #597, which gates its button on this badge.
Design
UpdateCheckergrows alatest_release_cached(now)accessor (same hourly throttle, same fail-silent keep-last-good contract;maybe_checknow rides it);DataServiceruns a second checker pointed atGITHUB_RIGFORGE_RELEASES_APIover the existing Tor SOCKS route and stores the raw{tag, url}aslatest_data["rigforge_release"].rigforge_updateis derived per-serialize byviews.rigforge_update_forfrom its live reported version — derived state never outlives its inputs, so a rig on X can never badge "X available", and a snapshot can't resurrect a stale verdict. The release is written unconditionally in the poll loop (the accessor returnsNonewithout dialing when the check is off), so a snapshot-restored release can't outlive a flag flip either.1.11.2; release tags arev1.11.2—compute_update/parse_semveralready handle both; a tier-1 test now pins that equality across the formats.dashboard.check_for_updatesgates the stack check and this one — off means neither dials GitHub.:8080rig reports no version → no badge (unknown, not "up to date").Tests
latest_release_cached(throttle one-call-many-reads, disabled → no dial, blip keeps cache); bare-vs-v equality incompute_update.rigforge_update_formatrix (behind / current / newer / unparseable / no-version / no-release);build_workers+build_state+build_worker_detailcarry the field; DataService wiring drift-guard (right API, same flag, same Tor proxy).state.jsonfixture regenerated (contract grew).make testgreen; patch coverage 98%; docs voice pass clean.RigUpdateBadgefollows the established tiny-component idiom;rigforge_update_forandlatest_release_cachedeach have two consumers.Docs
docs/workers.md(new "RigForge new-release badge" section),docs/dashboard.md(Workers Alive),docs/configuration.md+docs/privacy.md(the flag now covers both checks; the RigForge check sends no rig versions upstream).🤖 Generated with Claude Code