test descriptions
This commit is contained in:
@@ -168,8 +168,7 @@ class HopReferenceValidator(ValidatorProcess):
|
||||
|
||||
|
||||
def test_bisection_blames_first_divergent_hop_not_last_hop():
|
||||
"""Red: corrupt hop-0 only. The old `_final_text_node` bug blames
|
||||
max(shard_end) == hop-1 (wallet-hop1), which is innocent here."""
|
||||
"Red: corrupt hop-0 only.\n\nTags: general"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
@@ -202,8 +201,7 @@ def test_bisection_blames_first_divergent_hop_not_last_hop():
|
||||
|
||||
|
||||
def test_bisection_blames_the_actual_faulty_hop_when_it_is_the_second_hop():
|
||||
"""Integration test: multi-hop pipeline, fault injected at a known
|
||||
(non-first) hop — proves blame follows the real culprit, not a fixed index."""
|
||||
"Integration test: multi-hop pipeline, fault injected at a known\n\nTags: general"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
@@ -235,6 +233,7 @@ def test_bisection_blames_the_actual_faulty_hop_when_it_is_the_second_hop():
|
||||
|
||||
|
||||
def test_honest_two_hop_route_is_not_slashed():
|
||||
"Honest two hop route is not slashed\n\nTags: routing"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
@@ -263,9 +262,7 @@ def test_honest_two_hop_route_is_not_slashed():
|
||||
|
||||
|
||||
def test_expired_commitment_window_falls_back_to_text_only_audit():
|
||||
"""ADR-0018 §3: nodes only retain boundary activations briefly. Once the
|
||||
on-demand TTL has passed, bisection can't be verified — the validator must
|
||||
fall back to the text-comparison path instead of erroring out."""
|
||||
"ADR-0018 §3: nodes only retain boundary activations briefly.\n\nTags: general"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16, commitment_ttl_seconds=1.0)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
@@ -296,9 +293,7 @@ def test_expired_commitment_window_falls_back_to_text_only_audit():
|
||||
|
||||
|
||||
def test_hop_commitments_are_not_requested_unless_the_event_is_audit_selected():
|
||||
"""On-demand: the (expensive) per-hop commitment retrieval only happens
|
||||
for events the tracker RNG actually selects for audit — sample_rate is
|
||||
the selection gate, and a miss must not touch the reference node at all."""
|
||||
"On-demand: the (expensive) per-hop commitment retrieval only happens\n\nTags: general"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
@@ -328,9 +323,7 @@ def test_hop_commitments_are_not_requested_unless_the_event_is_audit_selected():
|
||||
assert validator.sampled_count == 0
|
||||
|
||||
def test_validator_fetches_missing_hop_commitments_on_demand_after_sampling():
|
||||
"""Production route events only carry hop metadata. Once sampled, the
|
||||
validator asks each route node for its retained boundary commitment window
|
||||
and then runs the same first-divergent-hop bisection path."""
|
||||
"Production route events only carry hop metadata.\n\nTags: general"
|
||||
config = ToplocAuditConfig(topk=2, decode_batching_size=16)
|
||||
backend = FakeToploc()
|
||||
reference_hop0 = [[1.0, 2.0], [3.0, 4.0]]
|
||||
|
||||
Reference in New Issue
Block a user