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(merge-only): defer item reads until a carry exists [V1,V4,H16]
Corey Olson8cd0e2f4c244
diff --git a/docs/img/draw.mjs b/docs/img/draw.mjsindex ed8fcce7..49a3b6c4 100644--- a/docs/img/draw.mjs+++ b/docs/img/draw.mjs@@ -193,6 +193,7 @@ const PLACES = {const ROUTES = {'open>claimed': { points: [[185, 179], [231, 179]], label: [208, 171, 'middle'] },'claimed>submitted': { points: [[395, 179], [441, 179]], label: [418, 171, 'middle'] },+ 'claimed>verified': { points: [[375, 150], [375, 134], [695, 134], [695, 146]], label: [490, 126, 'middle'] },'submitted>verified': { points: [[605, 179], [651, 179]], label: [628, 171, 'middle'] },'open>submitted': { points: [[165, 208], [165, 248], [495, 248], [495, 208]], label: [405, 241, 'middle'] },'claimed>open': { points: [[335, 150], [335, 120], [145, 120], [145, 146]], back: true, label: [240, 94, 'middle'], wrap: 2 },diff --git a/docs/img/lifecycle-dark.svg b/docs/img/lifecycle-dark.svgindex ef1d68e5..e05d521d 100644--- a/docs/img/lifecycle-dark.svg+++ b/docs/img/lifecycle-dark.svg@@ -1,5 +1,5 @@<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 392" width="840" height="392" role="img" aria-labelledby="title desc">-<title id="title">An item's life</title><desc id="desc">Drawn from src/machine.js. An item starts open and ends withdrawn. open to submitted: intake. open to claimed: claim. claimed to open: release, lapse (clock), escalate, refreeze. claimed to submitted: submit. submitted to verified: accept. submitted to open: reject, reopen, refreeze. verified to open: reject, reopen. open to withdrawn: withdraw. claimed to withdrawn: withdraw. submitted to withdrawn: withdraw.</desc>+<title id="title">An item's life</title><desc id="desc">Drawn from src/machine.js. An item starts open and ends withdrawn. open to submitted: intake. open to claimed: claim. claimed to open: release, lapse (clock), escalate, refreeze. claimed to submitted: submit. claimed to verified: submit-merge. submitted to verified: accept. submitted to open: reject, reopen, refreeze. verified to open: reject, reopen. open to withdrawn: withdraw. claimed to withdrawn: withdraw. submitted to withdrawn: withdraw.</desc><style>text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif; fill: #1f2328; }.mono { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; }@@ -67,6 +67,8 @@ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',<text class="label back" x="240" y="109" text-anchor="middle">escalate · refreeze</text><path class="edge" d="M 395 179 L 441 179" marker-end="url(#tip)"/><text class="label" x="418" y="171" text-anchor="middle">submit</text>+<path class="edge" d="M 375 150 L 375 134 L 695 134 L 695 146" marker-end="url(#tip)"/>+<text class="label" x="490" y="126" text-anchor="middle">submit-merge</text><path class="edge" d="M 605 179 L 651 179" marker-end="url(#tip)"/><text class="label" x="628" y="171" text-anchor="middle">accept</text><path class="edge back" d="M 545 150 L 545 66 L 115 66 L 115 146" marker-end="url(#tip-back)"/>diff --git a/docs/img/lifecycle.svg b/docs/img/lifecycle.svgindex 3d05d211..2dd6e190 100644--- a/docs/img/lifecycle.svg+++ b/docs/img/lifecycle.svg@@ -1,5 +1,5 @@<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 392" width="840" height="392" role="img" aria-labelledby="title desc">-<title id="title">An item's life</title><desc id="desc">Drawn from src/machine.js. An item starts open and ends withdrawn. open to submitted: intake. open to claimed: claim. claimed to open: release, lapse (clock), escalate, refreeze. claimed to submitted: submit. submitted to verified: accept. submitted to open: reject, reopen, refreeze. verified to open: reject, reopen. open to withdrawn: withdraw. claimed to withdrawn: withdraw. submitted to withdrawn: withdraw.</desc>+<title id="title">An item's life</title><desc id="desc">Drawn from src/machine.js. An item starts open and ends withdrawn. open to submitted: intake. open to claimed: claim. claimed to open: release, lapse (clock), escalate, refreeze. claimed to submitted: submit. claimed to verified: submit-merge. submitted to verified: accept. submitted to open: reject, reopen, refreeze. verified to open: reject, reopen. open to withdrawn: withdraw. claimed to withdrawn: withdraw. submitted to withdrawn: withdraw.</desc><style>text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif; fill: #1f2328; }.mono { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; }@@ -49,6 +49,8 @@ text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans',<text class="label back" x="240" y="109" text-anchor="middle">escalate · refreeze</text><path class="edge" d="M 395 179 L 441 179" marker-end="url(#tip)"/><text class="label" x="418" y="171" text-anchor="middle">submit</text>+<path class="edge" d="M 375 150 L 375 134 L 695 134 L 695 146" marker-end="url(#tip)"/>+<text class="label" x="490" y="126" text-anchor="middle">submit-merge</text><path class="edge" d="M 605 179 L 651 179" marker-end="url(#tip)"/><text class="label" x="628" y="171" text-anchor="middle">accept</text><path class="edge back" d="M 545 150 L 545 66 L 115 66 L 115 146" marker-end="url(#tip-back)"/>diff --git a/src/merge-only-verdict.js b/src/merge-only-verdict.jsindex ea404e8c..adf58c8a 100644--- a/src/merge-only-verdict.js+++ b/src/merge-only-verdict.js@@ -13,9 +13,13 @@ const SHA = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/u;/** Derive the origin’s carry before sealing; caller-supplied carry facts are discarded. */export function prepareMergeOnlySubmit(board, id, options) {+ if (options?.gateGreen !== true) return null;+ // An absent item remains a replay-time refusal, not a new pre-transport policy.+ const held = board.db.prepare('SELECT * FROM item WHERE item_id = ?').get(id);+ const basis = held ? mergeOnlyBasis(board, held) : null;+ if (!basis) return null;const item = getItem(board, id);- const basis = options?.gateGreen === true ? mergeOnlyBasis(board, item) : null;- return basis && !retainedVerifierIdentityProblem(board, item, basis.by)+ return !retainedVerifierIdentityProblem(board, item, basis.by)&& mergeOnlySourceValid(board.gitRoot, board, item)? deriveMergeOnly(board.gitRoot, basis, options) : null;}