Skip to content

feat: automatic update check via GitHub Releases - #82

Merged
e6qu merged 1 commit into
mainfrom
feat/update-check
Mar 14, 2026
Merged

feat: automatic update check via GitHub Releases#82
e6qu merged 1 commit into
mainfrom
feat/update-check

Conversation

@e6qu

@e6qu e6qu commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a non-fatal, cached update check that runs after every fv command, querying the GitHub Releases API at most once per 24 hours
  • Prints a notice to stderr with the new version, release page URL, and platform-specific download link when a newer version is available
  • Cfg-gated out of WASM builds; respects --quiet; opt-out via FV_NO_UPDATE_CHECK=1

Changes

  • Cargo.toml — added ureq + serde_json (cfg-gated for non-WASM)
  • src/update.rs — new module with all update check logic (~170 lines + 10 unit tests)
  • src/lib.rs — registered pub mod update (cfg-gated)
  • src/main.rs — calls maybe_print_update_notice after command dispatch

Test plan

  • cargo test --lib update — all 10 new tests pass
  • cargo test --all-features — full suite passes
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • Manual: build with old FV_RELEASE_TAG, run fv version, verify notice appears
  • Manual: verify FV_NO_UPDATE_CHECK=1 suppresses the notice
  • Verify WASM build still compiles (cargo build --target wasm32-wasip2)

Queries the latest GitHub release at most once per 24 hours (cached in
.funveil/update_check.json) and prints a notice to stderr when a newer
version is available, including release page URL and platform-specific
download link. The check is non-fatal (all errors silently swallowed),
respects --quiet, and can be disabled with FV_NO_UPDATE_CHECK=1.
The update module is cfg-gated out of WASM builds.
@github-actions

Copy link
Copy Markdown

🔒 Security Report

Check Status
cargo audit ✅ Pass
cargo deny ✅ Pass
pip-audit ✅ Pass

@github-actions

Copy link
Copy Markdown

📊 Coverage Report

Metric Value
PR coverage 97.52%
Base coverage 97.51%
Delta ✅ +0.01%
Per-file coverage (26 files)
File Coverage Lines Change
🟢 src/main.rs 91.4% 489/535 (+0.03%)
🟢 src/checkpoint.rs 93% 160/172 (+0.00%)
🟢 src/veil.rs 93.9% 417/444 (+0.00%)
🟢 src/cas.rs 94.6% 88/93 (+0.00%)
🟢 src/logging.rs 95.5% 42/44 (+0.00%)
🟢 src/parser/languages/markdown.rs 97% 65/67 (+0.00%)
🟢 src/parser/languages/typescript.rs 97.2% 210/216 (+0.00%)
🟢 src/parser/languages/html.rs 97.6% 80/82 (+0.00%)
🟢 src/parser/languages/zig.rs 98.1% 209/213 (+0.00%)
🟢 src/parser/languages/go.rs 98.3% 229/233 (+0.00%)
🟢 src/config.rs 98.4% 182/185 (+0.00%)
🟢 src/update.rs 98.6% 68/69
🟢 src/parser/languages/css.rs 98.8% 80/81 (+0.00%)
🟢 src/parser/tree_sitter_parser.rs 99.4% 496/499 (+0.00%)
🟢 src/analysis/cache.rs 100% 105/105 (+0.00%)
🟢 src/analysis/call_graph.rs 100% 204/204 (+0.00%)
🟢 src/analysis/entrypoints.rs 100% 564/564 (+0.00%)
🟢 src/output.rs 100% 12/12 (+0.00%)
🟢 src/parser/languages/xml.rs 100% 40/40 (+0.00%)
🟢 src/parser/mod.rs 100% 122/122 (+0.00%)
🟢 src/patch/manager.rs 100% 260/260 (+0.00%)
🟢 src/patch/parser.rs 100% 192/192 (+0.00%)
🟢 src/perms.rs 100% 27/27 (+0.00%)
🟢 src/strategies/header.rs 100% 108/108 (+0.00%)
🟢 src/strategies/mod.rs 100% 7/7 (+0.00%)
🟢 src/types.rs 100% 190/190 (+0.00%)

@e6qu
e6qu merged commit c9d02d8 into main Mar 14, 2026
14 checks passed
@e6qu
e6qu deleted the feat/update-check branch March 14, 2026 18:19
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