Files
buzz/docs/formal/nip-pl/fixed_payload_mutation.py
Tyler 1c006822e4 feat(push): add public APNs gateway (#1770)
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
2026-07-14 11:17:21 -04:00

17 lines
570 B
Python

"""Mutation teeth: each tempting caller->body flow must violate the theorem."""
from itertools import product
from fixed_payload import C, DOMAINS
caught = 0
for index in range(len(DOMAINS)):
violations = 0
for inputs in product(*DOMAINS):
mutated = C + b":" + inputs[index] # mutant copies one input category
if mutated != C:
violations += 1
assert violations
caught += 1
print(f"input category {index}: {violations} violations caught")
assert caught == len(DOMAINS)
print("RESULT: ALL NONINTERFERENCE MUTANTS CAUGHT")