diff --git a/docs/hosted-managed-operations.md b/docs/hosted-managed-operations.md index 11019bb..b4b3579 100644 --- a/docs/hosted-managed-operations.md +++ b/docs/hosted-managed-operations.md @@ -433,7 +433,7 @@ Run the isolated maintenance profile explicitly; it is not started by normal `up`: ```bash -backup_id="production-$(date -u +%Y%m%dT%H%M%SZ)" +backup_id="production-$(date -u +%Y%m%dt%H%M%Sz)" docker compose --project-name platform-managed-production \ --file docker-compose.hosted-managed-production.example.yml \ --profile maintenance run --rm managed-operation-maintenance \ diff --git a/tests/test_hosted_managed_production.py b/tests/test_hosted_managed_production.py index 93e0ee5..6a213ce 100644 --- a/tests/test_hosted_managed_production.py +++ b/tests/test_hosted_managed_production.py @@ -116,6 +116,20 @@ def test_dry_run_requires_explicit_preflight_mode(self) -> None: class HostedManagedRuntimeBackupTests(unittest.TestCase): + def test_runbook_backup_id_matches_runtime_contract(self) -> None: + runbook = ( + Path(__file__).resolve().parents[1] + / "docs" + / "hosted-managed-operations.md" + ).read_text(encoding="utf-8") + self.assertIn( + 'backup_id="production-$(date -u +%Y%m%dt%H%M%Sz)"', + runbook, + ) + self.assertIsNotNone( + backup.BACKUP_ID_PATTERN.fullmatch("production-20260713t002228z") + ) + def test_backup_archives_workspace_artifacts_without_paths_in_summary(self) -> None: with tempfile.TemporaryDirectory() as temp_dir: root = Path(temp_dir)