Why this matters
AgentInfo::average_rating returns total_score / total_ratings as a truncated integer, so a 4.5 average reads as 4 with a systematic downward bias. Separately, rate_agent only stores a boolean at DataKey::AgentRating(agent, rater); the Rating struct (score, rater, timestamp) is never written, so the type is dead code and individual ratings can never be audited. There is also no getter exposing the average rating.
Acceptance criteria
Files to touch
contracts/agent_registry/src/types.rs
contracts/agent_registry/src/agent.rs
Out of scope
- Time-decayed reputation
- Migrating existing boolean flags
Why this matters
AgentInfo::average_rating returns total_score / total_ratings as a truncated integer, so a 4.5 average reads as 4 with a systematic downward bias. Separately, rate_agent only stores a boolean at DataKey::AgentRating(agent, rater); the Rating struct (score, rater, timestamp) is never written, so the type is dead code and individual ratings can never be audited. There is also no getter exposing the average rating.
Acceptance criteria
Files to touch
contracts/agent_registry/src/types.rscontracts/agent_registry/src/agent.rsOut of scope