main
md 29 lines 1.08 KB
Rendered Raw
1 # Startup Migration Extensions DOX
2
3 ## Purpose
4
5 - Own backend startup migrations.
6
7 ## Ownership
8
9 - Ordered Python files in this folder own idempotent migration steps that run during startup.
10
11 ## Local Contracts
12
13 - Migrations must be safe to run repeatedly.
14 - Preserve user data and create backups or reversible paths when changing durable state.
15 - Keep long-running work bounded and observable.
16 - `_10_self_update_manager.py` may replace `/exe/self_update_manager.py` from the repository copy when the installed runtime updater is stale; it must validate required safety markers and keep a backup before replacement.
17 - After synchronizing a stale self-update manager, `_10_self_update_manager.py` starts that manager's best-effort Codex CLI refresh in the background so the update that introduces the hook does not need a second restart.
18
19 ## Work Guidance
20
21 - Add migrations only for durable state changes that cannot be handled lazily elsewhere.
22
23 ## Verification
24
25 - Smoke-test startup on a clean checkout and on representative existing user state when practical.
26
27 ## Child DOX Index
28
29 No child DOX files.