Summary
validate_reputation_scoring documents the property "reputation scores decrease for agents that cheat", but that property is never asserted. The scores dict is accumulated and then read only inside a loop whose body is pass, so the score arithmetic is dead code. The validator's one real check is a set comparison between cheat: senders and report:...:bad recipients, which passes vacuously when the trace has no cheat: lines.
Low severity (the validator still does something, and the reputation scenario's own discrimination works), but the stated invariant isn't enforced, so a trace that violates "cheaters lose score" is not caught.
Where
packages/nest-core/nest_core/validators.py, validate_reputation_scoring (~lines 787-847). The dead loop:
for cheater in cheaters:
if scores[cheater] >= 0:
# ... comment ...
pass
scores is never compared against anything after this.
Reproduction
from nest_core.validators import validate_reputation_scoring
def send(a, to, msg): return {"ts": 1.0, "agent": a, "kind": "send", "to": to, "msg": msg}
# agent-9 receives 5 "bad" reports (its score should fall) and there are no cheat: lines
events = [send("reporter", "obs", "report:round:agent-9:bad") for _ in range(5)]
print(validate_reputation_scoring(events)[0].passed) # True
The validator passes regardless of the accumulated scores.
Suggestion
Either enforce the documented property (assert that agents with net-negative reports end below their starting score, or below non-cheaters), or drop the scores accumulation and the dead loop and tighten the docstring to match what the check actually verifies.
Reproduced on main (latest as of filing).
Summary
validate_reputation_scoringdocuments the property "reputation scores decrease for agents that cheat", but that property is never asserted. Thescoresdict is accumulated and then read only inside a loop whose body ispass, so the score arithmetic is dead code. The validator's one real check is a set comparison betweencheat:senders andreport:...:badrecipients, which passes vacuously when the trace has nocheat:lines.Low severity (the validator still does something, and the reputation scenario's own discrimination works), but the stated invariant isn't enforced, so a trace that violates "cheaters lose score" is not caught.
Where
packages/nest-core/nest_core/validators.py,validate_reputation_scoring(~lines 787-847). The dead loop:scoresis never compared against anything after this.Reproduction
The validator passes regardless of the accumulated scores.
Suggestion
Either enforce the documented property (assert that agents with net-negative reports end below their starting score, or below non-cheaters), or drop the
scoresaccumulation and the dead loop and tighten the docstring to match what the check actually verifies.Reproduced on
main(latest as of filing).