Add gibberish-scores-well test: proves F3.3 is anti-spam not quality metric (16/16)

This commit is contained in:
Dispatch#70948f 2026-07-27 23:02:57 +00:00
parent b5fe12a626
commit 35eabca8e2
1 changed files with 30 additions and 0 deletions

View File

@ -188,6 +188,36 @@ def test_f32_idf_echo_combined():
assert edge.reciprocity_f32 > 0, "F3.2 should be positive for reciprocal edge" assert edge.reciprocity_f32 > 0, "F3.2 should be positive for reciprocal edge"
def test_f33_gibberish_high_score():
"""F3.3 CANNOT detect quality — only filter spam.
High-reciprocity, high-diversity gibberish scores well.
This is not a bug it's the boundary of what statistics can measure."""
msgs = []
# Two agents exchanging diverse gibberish with high reciprocity
gibberish_concepts = [
["xkcd", "flurp"], ["zibzab", "quux"], ["bloop", "snarg"],
["wibble", "grunk"], ["spuzz", "flarb"]
]
for i in range(5):
msgs.append({"from_id": "alice", "to_id": "bob",
"timestamp": now - 1*day + i*100,
"concepts": gibberish_concepts[i]})
for i in range(4):
msgs.append({"from_id": "bob", "to_id": "alice",
"timestamp": now - 0.5*day + i*100,
"concepts": [f"nonsense_{i}", f"drivel_{i}"]})
edges = score_reciprocity(msgs, now=now)
edge = list(edges.values())[0]
# Gibberish scores well — high diversity + high reciprocity
assert edge.reciprocity_f33 > 0.5, \
f"Gibberish should score high on F3.3: {edge.reciprocity_f33:.4f}"
# This is the proof: F3.3 measures not-spam, not quality.
# 18 unique concepts, reciprocity ~0.8 → high score.
# The formula chain is an anti-spam filter, not a quality metric.
# Run all tests # Run all tests
tests = [v for k, v in sorted(globals().items()) if k.startswith("test_")] tests = [v for k, v in sorted(globals().items()) if k.startswith("test_")]
passed = 0 passed = 0