fix: repair production recovery lock ownership
Independent Staging Quality Gate / validate (push) Successful in 12m23s
Independent Staging Quality Gate / publish (push) Successful in 2m6s

This commit is contained in:
Jesse_Chen
2026-08-16 01:50:50 +08:00
parent 934c4175d3
commit 2b1deff0e9
5 changed files with 43 additions and 7 deletions
@@ -1085,6 +1085,11 @@ test("production recovery workflow creates a verified encrypted off-site artifac
assert.doesNotMatch(workflow, /STAGING_BACKUP_ENCRYPTION_KEY|\.env\.production\.database[^\n]*(?:cat|awk)/);
assert.match(runner, /^#!\/usr\/bin\/env bash\nset -euo pipefail\nset \+x\n/);
assert.match(runner, /for directory in "\$state_directory" "\$backup_directory"/);
assert.match(runner, /sudo -n chown "\$deployment_uid:\$deployment_gid" "\$state_directory" "\$backup_directory"/);
assert.match(runner, /production mutation lock is unsafe/);
assert.match(runner, /sudo -n chown "\$deployment_uid:\$deployment_gid" "\$lock_file"/);
assert.doesNotMatch(runner, /rm -f[^\n]*mutation\.lock|chown -R/);
assert.match(runner, /another production mutation holds the host lock/);
assert.match(runner, /usage_percent < 70/);
assert.match(runner, /pg_dump[\s\S]*--format=custom --no-owner --no-acl/);