qol-tray-data-migrationslisted
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