You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gossip: reputation-report staked gate still uses Option with inverse polarity to AnnounceGate (#1222 follow-up) #1338
#1335 (part of #1222) replaced the NodeAnnounce admission gate's Option<Arc<dyn StakedNodeSet>> with a purpose-named AnnounceGate<S> { Enforce(S), Disabled } enum, precisely because nullability was overloaded to encode two safety-opposite states (None = fail-open, Some = enforce ADR 001 rule 2).
That refactor left the reputation-report membership gate untouched:
This is exactly the "same type, opposite meaning" hazard #1222 set out to remove — now living one field over in the same file. It's currently not a bug (the reputation path's None semantics are correct), but a future reader can't tell the two Options apart by type, and a copy-paste between them would be silently wrong-way-round.
Options
Docs-only (cheapest): add a one-line note on AnnounceGate and on ReputationWiring.staked cross-referencing each other's inverse convention, so the asymmetry reads as deliberate.
Symmetric treatment: give the reputation-report gate its own named enum (e.g. ReportGate { Enforce(S), Disabled } or a domain-specific name) so both admission gates read identically and neither relies on Option polarity.
Reviewers leaned toward (1) as the minimum and flagged (2) as the more complete fix; either is fine. Not urgent — no behavior impact.
Acceptance
The two staked-membership gates are distinguishable without reading the surrounding semantics, or the inverse-polarity relationship is documented on both sides.
Activity
refactor(gossip): name the reputation-report gate's staked-membership…