feat: tell the operator when a newer release exists - #263
Conversation
|
@coderabbitai review |
|
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
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. Comment |
A live fleet sat 33 releases behind and nothing anywhere said so. Half the machinery was already here -- version.skewed() compares this build against each worker -- but nothing knew what the newest PUBLISHED release was, so there was no reference point outside the deployment. Once a day, one unauthenticated GET to the public releases endpoint; a dismissible banner when there is something newer. THREE CONSTRAINTS, and they are what separate this from an unwelcome feature: * SILENT WHEN UNKNOWN. Offline, firewalled, disabled, never-run, or a dev build all produce known=false, and unknown renders NOTHING -- no error, no spinner, and above all no reassuring "up to date" it never earned. Every failure mode inside refresh() lands on the same answer. * NEVER AUTO-UPDATES. This deploys containers and holds credentials. * ANSWERABLE. CASHPILOT_UPDATE_CHECK=off makes no connection at all -- not "fetch and discard", which is what an operator disabling it would reasonably assume it does NOT do. Dismissible per version, so dismissing 1.20.1 leaves it gone until 1.20.2 exists and it cannot become wallpaper. TWO EXISTING TESTS FAILED, and both were right to: * The scheduler test pins the exact job set and a uniform misfire_grace_time. I had used 3600 for a daily job; conformed to 300 rather than carving out an exception to a convention a test enforces uniformly. A missed daily check simply happens tomorrow. * test_no_telemetry_or_phone_home_code_exists fired on the WORD "telemetry" in my module's docstring -- in a sentence saying it sends none. A check that cannot tell a denial from an admission gets worked around by rewording, and then it protects nothing. It now strips comments and docstrings but KEEPS string literals, so a telemetry endpoint URL or a posthog import is still caught. Proved by control, not asserted: dropping a module with `import posthog` and a TELEMETRY_URL string into app/ fails it on both needles. Five controls on the feature itself: reporting up-to-date when unreachable, comparing series as strings (1.9 vs 1.10 -- live, this project has passed its tenth minor), fetching despite the off switch, trusting a non-version tag, and re-fetching after every failure. Closes CashPilot-w0ss
de0a3e8 to
192dd16
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
==========================================
+ Coverage 95.47% 95.49% +0.02%
==========================================
Files 47 48 +1
Lines 6294 6350 +56
==========================================
+ Hits 6009 6064 +55
- Misses 285 286 +1
🚀 New features to boost your workflow:
|
Closes
CashPilot-w0ss. Your own fleet is the evidence: 33 releases behind, and no surface said so.What was actually missing
Half the machinery already existed —
version.skewed()compares this build against each worker. What was missing is a reference point outside the deployment: nothing in the application had any idea what the newest published release was.Once a day, one unauthenticated
GETto the public releases endpoint. A dismissible banner when there's something newer.Three constraints, and they're the whole design
known: false, and unknown renders nothing — no error, no spinner, and above all no reassuring "up to date" it never earned. Every failure mode insiderefresh()lands on the same answer, which is what makes it safe on an air-gapped install.CASHPILOT_UPDATE_CHECK=offmakes no connection at all — not "fetch and discard", which is precisely what an operator disabling it would assume it doesn't do. Tested by asserting the HTTP client is never even constructed.Dismissible per version: dismiss
v1.20.1and it stays gone untilv1.20.2exists, so it can't become wallpaper.Two existing tests failed, and both were right to
The scheduler test pins the exact job set and a uniform
misfire_grace_time. I'd used3600for a daily job. I conformed to300rather than carve out an exception to a convention a test enforces uniformly — a missed daily check simply happens tomorrow.test_no_telemetry_or_phone_home_code_existsfired on the word "telemetry" in my module's docstring — in a sentence saying it sends none.That's worth more than a reword. A check that can't tell a denial from an admission gets worked around by rephrasing, and then it protects nothing. It now strips comments and docstrings but keeps string literals, so a telemetry endpoint URL or a
posthogimport is still caught.Proved by control rather than asserted — dropping this into
app/:fails it on both needles.
What it sends
Nothing about you. No request body, no identifier, and your version is not reported upstream. GitHub learns that an IP asked what the latest release is. Documented in
docs/configuration.mdalongside the opt-out.Verification
Five controls on the feature, all failing as required: reporting up-to-date when unreachable; comparing series as strings (
1.9vs1.10— live, this project passed its tenth minor); fetching despite the off switch; trusting a non-version tag; re-fetching after every failure.3688 tests pass, coverage 95.54%.