agent-zero/extensions/python/startup_migration/AGENTS.md
Alessandro f9031b7575 Sync stale self-update manager at startup
Add a core startup migration that refreshes /exe/self_update_manager.py from the repository copy when the installed runtime updater is missing the socket-safe backup and Desktop cleanup markers.

Validate the source updater before replacing anything, preserve the previous runtime script as a backup, and leave current or non-regular targets untouched. Add regression coverage for stale runtime replacement, safe no-op/refusal paths, and the real repository updater source.
2026-06-08 16:07:37 +02:00

883 B

Startup Migration Extensions DOX

Purpose

  • Own backend startup migrations.

Ownership

  • Ordered Python files in this folder own idempotent migration steps that run during startup.

Local Contracts

  • Migrations must be safe to run repeatedly.
  • Preserve user data and create backups or reversible paths when changing durable state.
  • Keep long-running work bounded and observable.
  • _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.

Work Guidance

  • Add migrations only for durable state changes that cannot be handled lazily elsewhere.

Verification

  • Smoke-test startup on a clean checkout and on representative existing user state when practical.

Child DOX Index

No child DOX files.