Skip to content

feat: Stop agent emission - #448

Open
jmnmv12 wants to merge 18 commits into
stagingfrom
feat/stop-agent-emission
Open

feat: Stop agent emission#448
jmnmv12 wants to merge 18 commits into
stagingfrom
feat/stop-agent-emission

Conversation

@jmnmv12

@jmnmv12 jmnmv12 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a new endpoint PUT /admin/disqualified-agents/{agent_id} that allows an admin user to disqualify a single agent from receiving emission.

A disqualified agent is dropped from all emission/ranking/leaderboard queries and the remaining agents renormalize in normalize_agent_reward_weights. Removing an agent from the "approval chain" might influence the decisions made when it was the baseline agent to compare to.

Taking that into account when an agent is disqualified, a new async job is created, run_disqualification_reapproval , that walks every agent whose incentive decision came after B's (ordered by actual decision time) and re-runs the approve/reject gate against the evolving leader, starting from B's original baseline. Already-approved agents are only ever demoted, never rewritten, while rejected agents can be promoted with a freshly computed reward snapshot.

Two new DB tables were added: disqualified_agents and disqualification_jobs . It allows us to track disqualified agents and the reason why they were disqualified and disqualification_jobs and their respective status.

A new unified view, disqualified_agent_ids, was created to group common disqualification logic, i.e. an agent might be disqualified because it was specifically disqualified or because the miner CK they are associated with was banned. All of the operations that looked at the banned_coldkeys now look at this unified view.

New tests were added to validate the behaviour of this operation.

@jmnmv12
jmnmv12 marked this pull request as ready for review July 24, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant