wfctl: skip background update check in CI and throttle to once per day#568
Merged
Conversation
Closed
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
- Add CI env var detection (CI, GITHUB_ACTIONS) to checkForUpdateNotice - Add daily throttle using ~/.cache/wfctl/last_update_check timestamp file - Add shouldCheckForUpdate / markUpdateChecked helpers - Add updateCheckCachePathOverride for test isolation - Add tests for CI skip, daily throttle (skips/allows), cache helpers Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/1b76a0f8-1d93-46f5-81aa-791f5f2e9b4d Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix wfctl triggering firewall rules
wfctl: skip background update check in CI and throttle to once per day
May 6, 2026
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.
checkForUpdateNotice()fires a GitHub API call on everywfctlinvocation, hittingapi.github.comeven inside firewalled CI environments (GitHub Actions, etc.) and on every single command rather than periodically.Changes
checkForUpdateNoticenow returns immediately whenCIorGITHUB_ACTIONSis set, covering GitHub Actions and virtually all other CI systems.~/.cache/wfctl/last_update_check. The background check is skipped if it ran within the last 24 hours, avoiding an API call on every command invocation.updateCheckCachePathOverride(mirrors the existinggithubReleasesURLOverridepattern) so tests redirect the cache to a temp directory.