← ClaudeAtlas

qol-tray-data-migrationslisted

Use when a qol-tray release breaks the on-disk config layout or cloud-backed user data, when adding a new migration between releases, or when debugging missing, duplicated, or stomped user data after startup. Defines the two-phase sliding-window migration pattern in the monorepo qol-migrations crate: PreFlight runs synchronously before any feature reads config, PostAuth runs asynchronously after GitHub auth loads, and old migrations are pruned once they fall outside the supported upgrade window.
qol-tools/qol-skills · ★ 0 · Data & Documents · score 62
Install: claude install-skill qol-tools/qol-skills
# qol-tray-data-migrations ## Where things live - Crate: `libs/qol-migrations/` in the qol-monorepo. - Root workspace dependency: `Cargo.toml` has `qol-migrations = { path = "libs/qol-migrations" }`. - Host dependency: `apps/qol-tray/Cargo.toml` uses `qol-migrations.workspace = true`. - Host boot orchestration: `apps/qol-tray/src/app/`. - Host post-auth facade: `apps/qol-tray/src/migrations/`; auth/session owners call this facade after credentials become available. - Standalone binary: `apps/qol-tray/src/migrate/main.rs`. ## Cargo dependency form (read this before touching Cargo.toml) qol-tray consumes qol-migrations through the workspace dependency, always: ```toml # Cargo.toml [workspace.dependencies] qol-migrations = { path = "libs/qol-migrations" } # apps/qol-tray/Cargo.toml [dependencies] qol-migrations.workspace = true ``` Do not replace this with `git = "..."`, `branch = "..."`, or a stale sibling path such as `../qol-migrations`. In the monorepo layout, `libs/qol-migrations` is the source of truth and Cargo.lock should resolve it as a path workspace crate. ## Two-phase boot model Two phases, two runtime contracts. - **PreFlight** - sync, file-only. No network, no auth, no daemon. Runs BEFORE any feature module reads config. Used for on-disk format / layout changes. - **PostAuth** - async, network-aware. Runs AFTER the GitHub auth token loads. Used for backend swaps (gist to repo) and recovery of cloud-stored data. Call shape in qol-tray: ```rust // pre-fli