Upgrade Path
Sanctum upgrades should be boring. The system is now strong enough that upgrades should look like a bounded operator procedure, not a spiritual trial.
The Rule
Section titled “The Rule”Do not upgrade on top of known drift.
Before touching anything, run:
python3 tools/sanctumctl.py doctor --quickIf that fails, fix the drift first. Upgrading a machine that is already lying to you is how one problem becomes three.
Standard Upgrade Flow
Section titled “Standard Upgrade Flow”- Pull the checked-in changes.
- Run
python3 tools/sanctumctl.py renderto sync generated surfaces. - Run
python3 tools/sanctumctl.py doctor --quick. - Run
python3 tools/sanctumctl.py verify. - If docs changed, run
pnpm buildinsanctum-docs. - Only then consider the upgrade complete.
Minimal command sequence:
git pullpython3 tools/sanctumctl.py renderpython3 tools/sanctumctl.py doctor --quickpython3 tools/sanctumctl.py verifycd sanctum-docs && pnpm buildWhat render Actually Syncs
Section titled “What render Actually Syncs”python3 tools/sanctumctl.py render reconciles the generated surfaces that most often drift during upgrades:
- checked-in workspace manifests
- runtime manifests in
~/.sanctum/services - synced agent capabilities
- agent markdown
- runtime calibration artifacts
This is the line between “new code exists in git” and “the running machine is using the new shape.”
If The Upgrade Touches Runtime Services
Section titled “If The Upgrade Touches Runtime Services”Pay extra attention when changes affect:
sanctum/runtime_catalog.yamltools/render_runtime_services.py- launchagent templates
- health or remediation scripts
Those changes alter the machine contract, not just repo logic. Treat them as operational changes, not cosmetic ones.
Rollback Posture
Section titled “Rollback Posture”Sanctum does not currently have one universal rollback command. The practical rollback posture is:
- keep upgrades small
- keep generated surfaces reproducible
- re-run
renderto restore canonical generated state - use subsystem-specific recovery paths from Troubleshooting
- rely on existing backup and restore guidance in Backup & Restore
That is not yet perfect product-grade rollback. It is, however, explicit.
When To Delay An Upgrade
Section titled “When To Delay An Upgrade”Delay the upgrade if any of these are true:
- the stability window is active and you are measuring calm runtime behavior
doctor --quickis already failing- the machine has unresolved runtime drift
- the docs build is already red
The right time to upgrade is when the current state is legible. Upgrades are not a substitute for diagnosis.