fix(agent99): require durable queue receipt
This commit is contained in:
@@ -209,6 +209,26 @@ def test_live_preflight_adapts_inbox_evidence_without_raw_message_readback() ->
|
||||
assert forbidden not in preflight
|
||||
|
||||
|
||||
def test_agent99_relay_requires_identity_bound_queue_receipt_before_promotion() -> None:
|
||||
relay = read("agent99-sre-alert-relay.ps1")
|
||||
inbox = read("agent99-sre-alert-inbox.ps1")
|
||||
|
||||
assert 'schemaVersion = "agent99_sre_queue_receipt_v1"' in inbox
|
||||
assert 'queueAccepted = $QueueAccepted' in inbox
|
||||
assert 'storesRawPayload = $false' in inbox
|
||||
assert 'Write-AgentRelayQueueReceipt $alert $alertId "queued" $true' in inbox
|
||||
assert 'Write-AgentRelayQueueReceipt $alert $alertId "duplicate_suppressed" $false' in inbox
|
||||
assert 'Wait-AgentRelayQueueReceipt $relayReceiptId $alert' in relay
|
||||
assert '$queueReceipt.queueAccepted -and $queueReceipt.dispatchIdentityMatched' in relay
|
||||
assert 'queueReceiptFound = [bool]$queueReceipt.found' in relay
|
||||
assert 'dispatchIdentityMatched = [bool]$queueReceipt.dispatchIdentityMatched' in relay
|
||||
response_block = relay.split("Send-AgentRelayResponse $context 202 @{", 1)[1]
|
||||
response_block = response_block.split("Write-AgentRelayEvent", 1)[0]
|
||||
assert "incomingFile" not in response_block
|
||||
assert "inboxProcessId" not in response_block
|
||||
assert "storesRawPayload = $false" in response_block
|
||||
|
||||
|
||||
def test_recover_receipt_readback_requires_verifier_and_notification() -> None:
|
||||
readback = read("scripts/reboot-recovery/agent99-recover-receipt-readback.ps1")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user