Fix consensus endpoint bug - use request_data.consensus_threshold
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

Bug: achieve_consensus endpoint was trying to access request.consensus_threshold
but the parameter is named request_data (type ConsensusRequest), causing AttributeError.

Fix: Changed request.consensus_threshold to request_data.consensus_threshold
in apps/coordinator-api/src/app/contexts/agent_coordination/routers/swarm.py

Service restarted: aitbc-coordinator-api
This commit is contained in:
aitbc
2026-05-15 06:27:30 +02:00
parent f86d9379ae
commit 81e53996d1

View File

@@ -121,7 +121,7 @@ async def achieve_consensus(request: Request, task_id: str, request_data: Consen
"""Achieve swarm consensus on task result."""
return {
"task_id": task_id,
"consensus_threshold": request.consensus_threshold,
"consensus_threshold": request_data.consensus_threshold,
"consensus_reached": True,
"status": "consensus_achieved"
}