Expand description
Self-update policy — synchronous, throttled pre-run update checks.
User-initiated update (the subcommand) is always available; this
module governs the automatic check a tool may run at the start of an
invocation, per its UpdatePolicy baseline. The check is throttled by
a persisted last-check timestamp so it runs at most once per
update_check_interval. This is not a background daemon — it is a
single synchronous check before command dispatch.
The engine here is deliberately decoupled from the crate::Updater:
it queries a ReleaseProvider and reports a PolicyDecision; the
caller (the application pre-run hook) acts on it per policy — Enabled
performs the update before running, Prompt notifies the user.
See docs/development/specs/2026-06-23-rtb-update-policy-v0.1.md.
Structs§
- Update
State - Persisted throttle state — when the last automatic check ran and the
newest version it observed. Stored as TOML beside the tool’s
consent.toml(the caller supplies the path).
Enums§
- Policy
Decision - What the pre-run policy check determined.
- Update
Policy - Author-set baseline for synchronous, pre-run self-update checks.
Functions§
- evaluate
- Run the synchronous, throttled pre-run update check.