Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(queue): retain coordinator overrides on re-rank [N22,B13,H16]
Corey Olsonc8cadd6e2858
diff --git a/src/milestones.js b/src/milestones.jsindex 8c9f8e15..3f39b885 100644--- a/src/milestones.js+++ b/src/milestones.js@@ -254,11 +254,17 @@ export function orderMilestoneItems(board, name, { agentId, items, place, reasonconst index = entries.findIndex(entry => entry.name === name);if (index < 0) throw new Refused('NO_MILESTONE', `no milestone named ${name}; list them with pullboard roadmap`);if (order.some(id => !entries[index].items.includes(id))) throw new Refused('MILESTONE_ITEMS', 'rank only items in this milestone; read pullboard roadmap and retry');- entries[index] = { ...entries[index], order };- if (engineOf(board) >= WORK_ORDER_ENGINE) entries[index] = withOverrides(entries[index], order, (entries[index].sunk ?? []).filter(id => !order.includes(id)));+ const current = entries[index];+ // Explicit coordinator overrides survive ordinary order, including a coordinator's re-rank.+ const pins = engineOf(board) >= WORK_ORDER_ENGINE+ ? (current.order ?? []).filter(id => Object.hasOwn(current.reasons ?? {}, String(id))) : [];+ const sunk = engineOf(board) >= WORK_ORDER_ENGINE ? current.sunk ?? [] : [];+ const ranked = [...pins, ...order.filter(id => !pins.includes(id) && !sunk.includes(id))];+ entries[index] = { ...current, order: ranked };+ if (engineOf(board) >= WORK_ORDER_ENGINE) entries[index] = withOverrides(current, ranked, sunk);saveMilestones(board, entries);logEvent(board, agentId, 'milestone_order', null, { name, items: order });- return order;+ return ranked;});}