ruvnet/ruflo · error
Queen override not allowed for decision type: ${decision.typ
Error message
Queen override not allowed for decision type: ${decision.type} What it means
QueenCoordinator.queenOverride() is an autocratic fast path that lets the queen decide alone, but only for decision types emergency-action, agent-termination, and priority-override. Every other DecisionType is rejected because it must go through the full consensus voting flow. The throw happens before the synthetic approved ConsensusResult is built.
Source
Thrown at v3/@claude-flow/swarm/src/queen-coordinator.ts:1762
approvalRate: result.approvalRate,
latencyMs: latency,
});
return result;
} finally {
this.activeDecisions.delete(decision.decisionId);
}
}
private queenOverride(decision: Decision): ConsensusResult {
// Queen can make immediate decisions for:
// - Emergency actions
// - Agent termination
// - Priority overrides
const allowedTypes: DecisionType[] = ['emergency-action', 'agent-termination', 'priority-override'];
if (!allowedTypes.includes(decision.type)) {
throw new Error(`Queen override not allowed for decision type: ${decision.type}`);
}
return {
proposalId: decision.decisionId,
approved: true,
approvalRate: 1.0,
participationRate: 1.0,
finalValue: decision.proposal,
rounds: 1,
durationMs: 0,
};
}
private async majorityConsensus(decision: Decision): Promise<ConsensusResult> {
// Use swarm's consensus engine with majority threshold
const result = await this.swarm.proposeConsensus({
decision,
threshold: 0.51,View on GitHub (pinned to fa13ee4ad6)
Solutions
- Route non-listed decision types through the normal consensus flow (consensusEngine.propose/decide) instead of the override path
- If the new type genuinely needs queen fast-track, add it to allowedTypes inside queenOverride and re-run consensus tests
- Check decision.type spelling against the DecisionType union; a typo never matches the allowlist
Example fix
// before
const result = queenCoordinator.queenOverride({ decisionId: 'd1', type: 'config-change', proposal: value }); // throws
// after
// normal decisions go through full consensus voting
const result = await consensusEngine.propose(queenId, 'config-change', value); Defensive patterns
Strategy: type-guard
Validate before calling
const QUEEN_OVERRIDABLE = new Set(['emergency-action', 'agent-termination', 'priority-override']);
if (!QUEEN_OVERRIDABLE.has(decision.type)) {
// not overridable: use the full consensus flow
const result = await consensusEngine.propose(queenId, decision.type, decision.proposal);
} else {
const result = queenCoordinator.queenOverride(decision);
} Type guard
const QUEEN_OVERRIDABLE: ReadonlySet<string> = new Set(['emergency-action', 'agent-termination', 'priority-override']);
function isQueenOverridable(type: DecisionType): boolean {
return QUEEN_OVERRIDABLE.has(type);
} Try / catch
try {
return queenCoordinator.queenOverride(decision);
} catch (err) {
if (err instanceof Error && err.message.startsWith('Queen override not allowed')) {
return await runFullConsensus(decision); // degrade gracefully to voting
}
throw err;
} Prevention
- Keep the allowlist in one exported constant shared by caller and queenOverride
- Unit-test every DecisionType against the override path
- Log decision.type on every override attempt so misrouted types are visible
When it happens
Trigger: Forcing the queen-override path (a decide() call in override/immediate mode, or calling queenOverride directly) for a decision whose type is something like config-change, resource-allocation, or any custom type not in the allowlist.
Common situations: Adding a custom DecisionType and assuming the queen can fast-track it; porting decision code from a version where override was unrestricted; test fixtures using arbitrary type strings.
Related errors
- policy-${decision.enforcedOutcome}:${decision.reason}; recei
- Only primary can propose values
- Unknown consensus algorithm: ${this.config.algorithm}
- Consensus engine not initialized
- Only leader can propose values
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/3a09d469bd9c626f.
Report an issue: GitHub.