mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-20 18:25:11 +00:00
235b65b4e6
Adds two tests that fail on master: 1. TestResolveWithContext_Tier1_ConfidencePrefersMultiObserverEdge — two 8a candidates from the same anchor's neighborhood. candX has 25 contributions from 1 observer (single-source, suspect); candY has 30 contributions from 6 distinct observers (corroborated). Resolver currently picks candX via tier-2 geo_proximity because raw counts are within 3x of each other (1.2x). The test asserts candY via neighbor_affinity — i.e. confidence weighting must demote single-source edges enough that the corroborated edge clears the affinityConfidenceRatio gate. 2. TestNeighborEdge_ObserverSetIsDistinct — repeated contributions from the same observer must not inflate the Observers set; new observers must increment it. Pins the source-diversity counter behavior end-to-end via the public upsert path. Also asserts Confidence() returns 1.0 saturated for >=3 observers and a value in (0,1) for a single observer. Confidence() ships as a 1.0-returning stub so the RED test fails on an assertion (wrong candidate, wrong method) — not on a missing method — keeping AGENTS.md "red commit must compile + fail on assertion" discipline. Refs #1229