{"record":{"id":"d1ef645a2f24e121","repo":"jlcodes99/cockpit-tools","slug":"startupperf-updatercommand-check-version-jump-f","errorCode":null,"errorMessage":"[StartupPerf][UpdaterCommand] check_version_jump failed in {}ms: {}","messagePattern":"\\[StartupPerf\\]\\[UpdaterCommand\\] check_version_jump failed in (.+?)ms: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/src/commands/update.rs","lineNumber":116,"sourceCode":"}\n\n/// Check if a version jump occurred (for post-update changelog display)\n#[tauri::command]\npub fn check_version_jump() -> Result<Option<VersionJumpInfo>, String> {\n    let started = Instant::now();\n    let result = update_checker::check_version_jump();\n    match &result {\n        Ok(Some(info)) => logger::log_info(&format!(\n            \"[StartupPerf][UpdaterCommand] check_version_jump hit in {}ms: {} -> {}\",\n            started.elapsed().as_millis(),\n            info.previous_version,\n            info.current_version\n        )),\n        Ok(None) => logger::log_info(&format!(\n            \"[StartupPerf][UpdaterCommand] check_version_jump completed in {}ms: no jump\",\n            started.elapsed().as_millis()\n        )),\n        Err(err) => logger::log_error(&format!(\n            \"[StartupPerf][UpdaterCommand] check_version_jump failed in {}ms: {}\",\n            started.elapsed().as_millis(),\n            err\n        )),\n    }\n    result\n}\n\n/// Read release history from changelog files\n#[tauri::command]\npub fn get_release_history(\n    locale: Option<String>,\n    limit: Option<usize>,\n) -> Result<Vec<ReleaseHistoryItem>, String> {\n    update_checker::get_release_history(locale.as_deref(), limit)\n}\n\n/// Write updater lifecycle logs from frontend into app.log","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/jlcodes99/cockpit-tools/blob/1ed8b77992d62ca81fabf744deb0839ad361d5bf/src-tauri/src/commands/update.rs#L98-L134","documentation":"The check_version_jump command compares current vs previously-run version to detect a version jump; on Err it logs '[StartupPerf][UpdaterCommand] check_version_jump failed in {ms}ms: {err}' and returns the error. It means the version-jump detection (reading stored last-version and comparing) failed.","triggerScenarios":"update_checker::check_version_jump returns Err: cannot read the stored last-run version (settings/registry file access), or persisting the new version after a jump fails.","commonSituations":"First run after install/update with missing or corrupted version marker file; read-only config dir; concurrent startup writers locking the version store.","solutions":["Inspect the inner err to distinguish read vs write failure on the version marker.","Check permissions on the config/data directory holding the version marker.","Delete a corrupted version marker file so it is recreated on next startup.","Retry after other startup update tasks complete to avoid file contention."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const marker = await readVersionMarker().catch(() => null);\nif (marker !== null && !isValidVersion(marker)) await invoke('reset_version_marker');","typeGuard":"function isSemver(v: unknown): v is string {\n  return typeof v === 'string' && /^\\d+\\.\\d+\\.\\d+/.test(v);\n}","tryCatchPattern":"try {\n  const jump = await invoke('check_version_jump');\n} catch (e) {\n  // treat as 'no jump' and continue startup\n  const jump = null;\n  console.warn('version jump check skipped', e);\n}","preventionTips":["Write the version marker atomically after successful startup","Handle first-run (missing marker) as a normal case, not an error","Keep version strings strictly semver-formatted","Sequence version check after settings store is available"],"tags":["updater","versioning","startup-perf","tauri"],"backgroundTag":"version-check-failed","analyzedSha":"1ed8b77992d62ca81fabf744deb0839ad361d5bf","analyzedAt":"2026-09-05T09:51:41.178Z","contentChangedAt":"2026-09-05T09:51:41.178Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}