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: mark only the requested command outcome [C6,N26]
Corey Olsonb4ff24473608
diff --git a/src/cli.js b/src/cli.jsindex 2be0edf5..5aa20d63 100644--- a/src/cli.js+++ b/src/cli.js@@ -1,3 +1,4 @@+import { requestedCommandMove } from './recorded-move.js';export { barActorForCommand } from './bar-actor.js';import {barReadinessRequired,@@ -594,16 +595,17 @@ export async function ordered(ctx, board, operation, args) {ensureSpecApprovalCoordinator(ctx, board, initialBaseline);const actor = ctx.info.isMain ? COORDINATOR : store.agentAt(board, ctx.info.root)?.agent_id;if (initialBaseline && actor) await recordBaseline(actor);+ const requested = requestedCommandMove(ctx.io.relayCommand?.cliOperation, operation);/** Called only for this requested operation, after its store transaction commits, never for bootstrap. */const applyRequested = () => {const before = board.lastEvent;const result = store[operation](board, ...args);- if (board.lastEvent !== before) ctx.io.recordedMove = true;+ if (requested && board.lastEvent !== before) ctx.io.recordedMove = true;return result;};const result = await withItemSession(ctx.info, operation, args, () => relayLinked(ctx.info.root) || relayRecovered(ctx.info.root)? relayOperation(ctx.info.root, operation, args, ctx.io, command, applyRequested,- () => { ctx.io.recordedMove = true; }) : applyRequested());+ requested ? () => { ctx.io.recordedMove = true; } : undefined) : applyRequested());return result;};const digest = agentSessionDigest();diff --git a/src/recorded-move.js b/src/recorded-move.jsindex 14d990ea..bd7690bc 100644--- a/src/recorded-move.js+++ b/src/recorded-move.js@@ -3,8 +3,33 @@ import { Refused } from './refused.js';/** Preserve the refusal code while distinguishing a partial recorded command from an unrecorded attempt. */export function recordedMoveRefusal(io, error) {- if (!io.recordedMove || !(error instanceof Refused)) return error;+ if (!io.recordedMove || !(error instanceof Refused) || !/^(?:RELAY_|AUTH_|TOKEN_)/u.test(error.code)) return error;+ if (/^(?:AUTH_|TOKEN_)/u.test(error.code)) return new Refused(error.code,+ error.message.replace(/^\[[A-Z0-9_]+\] /u, '') + '; a move from this command was already recorded; do not repeat the original command', error.next);return new Refused(error.code,'a move from this command was already recorded; any pending relay work remains queued locally. Do not repeat the command','run pullboard status to inspect the recorded work and pending relay sync; do not repeat the original command');}++/** Match the actual parsed command's requested effects, excluding check attempts and other preflight bookkeeping. */+export function requestedCommandMove(command, operation) {+ if (!command) return false;+ const forms = {+ add: ['addItem'], edit: ['editItem'], merged: ['merged'], submit: ['submit'],+ claim: ['claim'], release: ['release'], verify: ['verify'], withdraw: ['withdraw'],+ refreeze: ['refreeze'], reopen: ['reopen'], escalate: ['escalate'],+ next: ['claim', 'reserveReview', 'reserveNextReview'], run: ['claim', 'submit', 'reserveReview', 'reserveNextReview', 'verify'],+ join: ['register'], worktree: ['register'], takeover: ['takeCoordinator'],+ shout: ['shout'], answer: ['answerDecision'], pass: ['passDecision'], fact: ['appendFact'],+ hold: ['holdLane', 'releaseLane', 'holdItem', 'releaseItemHold'],+ bar: ['setBarReady', 'signBar'], settings: ['setLineSetting', 'setPersonSigning'], check: ['acceptCheck'],+ spec: ['recordRowDecisions', 'applyRowDecisions', 'draftSpecRow'],+ blueprint: ['draftSpecRow', 'addItem', 'appendFact'],+ milestone: ['addMilestone', 'editMilestoneItems', 'orderMilestoneItems', 'moveMilestone', 'editMilestone', 'removeMilestone', 'shipMilestone'],+ land: ['recordLandingBatch', 'recordLandingWaiver', 'finishLandingBatch'],+ sentinel: ['proposeSentinel', 'decideSentinel', 'beginSentinelRun', 'finishSentinelRun'],+ health: ['recordHealthFindings'], job: ['declareJob', 'recordJobRun'],+ intake: ['intakeOutside'], approve: ['approveOutside'], publish: ['recordPublishFinding'],+ };+ return Object.hasOwn(forms, command) && forms[command].includes(operation);+}