fix(agent99): bind offsite verifier freshness

This commit is contained in:
ogt
2026-07-15 05:14:17 +08:00
parent 096f61ed69
commit 91f91813ba
2 changed files with 35 additions and 4 deletions

View File

@@ -131,6 +131,9 @@ def test_agent99_backupcheck_reads_offsite_and_escrow_without_mutation() -> None
):
assert metric in source
assert "stat -c '__PROTECTION_MTIME__=%Y'" in readback
assert "protectionVerifyMetricsPath" in source
assert "offsite_full_sync_verify.prom" in source
assert "stat -c '__OFFSITE_VERIFY_MTIME__=%Y'" in readback
assert "grep -E" in readback
assert "backupRunPerformed = $false" in source
assert "restoreRunPerformed = $false" in source
@@ -141,6 +144,8 @@ def test_agent99_backupcheck_reads_offsite_and_escrow_without_mutation() -> None
assert "protectionEscrowExpectedCount" in source
assert "$evidenceAgeMinutes -ge -5" in source
assert "$evidenceAgeMinutes -le" in source
assert "$verifyEvidenceAgeMinutes -ge -5" in source
assert "$verifyEvidenceAgeMinutes -le" in source
assert "function Get-AgentBackupProviderMetricRows" in source
assert "$offsiteFresh.Count -eq $offsiteFreshRows.Count" in source
assert "$remoteVerify.Count -eq $remoteVerifyRows.Count" in source
@@ -151,6 +156,7 @@ def test_agent99_backupcheck_reads_offsite_and_escrow_without_mutation() -> None
assert 'provider="b2"} 0' in source
assert 'provider="rclone"} 1' in source
assert "optionalB2ProviderTerminalEligible" in source
assert "staleOffsiteVerifyEvidenceBlocked" in source
assert "allProvidersUnconfiguredBlocked" in source
assert "configuredProviderStaleBlocked" in source
assert "configuredProviderRemoteVerifyFailedBlocked" in source