fix(agent99): align synthetic timeout contract
Some checks failed
CD Pipeline / select-latest-carrier (push) Successful in 2m12s
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 10m25s
CD Pipeline / revalidate-deploy-carrier (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / revalidate-post-deploy-carrier (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 38s

This commit is contained in:
Your Name
2026-07-19 13:49:57 +08:00
parent 5fa97b3d71
commit 3512d0c490
2 changed files with 13 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ def test_agent99_uses_dedicated_identity_and_preferred_jump_route() -> None:
def test_agent99_auto_recovery_is_single_flight_and_slo_measured() -> None:
source = CONTROL.read_text(encoding="utf-8")
contract = CONTRACT_CHECK.read_text(encoding="utf-8")
synthetic = (ROOT / "agent99-synthetic-tests.ps1").read_text(encoding="utf-8")
trigger = source[source.index("function Start-AgentRecoveryFromObservation") :]
trigger = trigger[: trigger.index("function Get-AgentRecoverySloConfig")]
identity = source[source.index("function New-AgentCanonicalControlledDispatchIdentity") :]
@@ -133,6 +134,17 @@ def test_agent99_auto_recovery_is_single_flight_and_slo_measured() -> None:
'$control.IndexOf(\'$process = Start-Process -FilePath "powershell.exe" '
"-ArgumentList $args')"
) not in contract
assert 'Add-SyntheticCheck "recovery:host112_timeout_contract"' in synthetic
assert "$control.Contains('$execution = Invoke-AgentBoundedProcess')" in synthetic
assert (
"$control.Contains('-TimeoutSeconds $script:Agent99QueueOuterDeadlineSeconds')"
in synthetic
)
assert (
"-not $control.Contains("
"'$process.WaitForExit($script:Agent99QueueOuterDeadlineSeconds * 1000)')"
in synthetic
)
assert 'correlationKey = $dispatchIdentity.idempotencyKey' in contract
assert 'canonicalDigest = $dispatchIdentity.canonicalDigest' in contract
assert 'Record-AgentEvent "recovery_slo_result"' in source