Marks `running` as fully installed by advancing both version markers, returning whether anything changed. This is the single home of the marker-advancement protocol: only a completed full agent install pass (the startup silent reinstall, or `post-update`'s reinstall step) may record its version here, so the next startup's maintenance knows the work does not need repeating.
(&mut self, running: &str)
| 216 | /// record its version here, so the next startup's maintenance knows the |
| 217 | /// work does not need repeating. |
| 218 | pub fn mark_version_installed(&mut self, running: &str) -> bool { |
| 219 | if self.previous_version == running && self.last_installed_version == running { |
| 220 | return false; |
| 221 | } |
| 222 | self.previous_version = running.to_string(); |
| 223 | self.last_installed_version = running.to_string(); |
| 224 | true |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | /// Parse a human-readable duration string like "15s" or "1m" into a Duration. |
no outgoing calls
no test coverage detected