Skip to content

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.

fix(merge): retain original native reviewer authority [V1,H16]

Corey Olsonfe9b3cc898cf
diff --git a/docs/lifecycle.md b/docs/lifecycle.md
index 929af598..f01a1b00 100644
--- a/docs/lifecycle.md
+++ b/docs/lifecycle.md
@@ -60,7 +60,7 @@ Each move checks its guards in this order and refuses with the first one that do
| claim | open, claimed | claimed | agent, coordinator | joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_CLAIMABLE), checkProvesSomething (CRITERION_PROVES_NOTHING), barReady (BAR_NOT_READY), itemNotHeld (ITEM_HELD), inLane (WRONG_LANE or OUTSIDE_NATIVE_BUILD), routeAllows (ROUTE), dependenciesVerified (BLOCKED), notHeldByAnother (HELD), builderFirstRefusal (REOPEN_HELD_FOR_BUILDER), correctionRefrozen (PENDING_REFREEZE), laneOpen (LANE_HELD), lineCapacity (LINE_WIP_LIMIT or LINE_SETTING_RANGE), oneLiveClaim (ONE_CLAIM), rowsInForce (UNKNOWN_SPEC or A5_GRAMMAR_VERSION or NO_POLICY or BAD_CONFIG or SPEC_BEHIND_MAIN or AGENT_APPROVAL_REQUIRED or BAR_NOT_READY) |
| release | open, claimed | open | agent, coordinator | joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_YOURS), releaseOwnsWork (NOT_YOURS), reviewReleaseExplained (NOTE_REQUIRED) |
| lapse | claimed | open | clock, when its lease runs out | none |
-| submit | claimed | submitted | agent, coordinator | joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS or OUTSIDE_NATIVE_BUILD), correctionRefrozen (PENDING_REFREEZE), checkProvesSomething (CRITERION_PROVES_NOTHING), barReady (BAR_NOT_READY), criterionUnchanged (CRITERIA_CHANGED), treeClean (DIRTY), nothingUntracked (UNTRACKED), hasCommit (NO_COMMIT or HOST_NAME), withinLane (OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), trunkInCandidate (MAIN_NOT_COMPOSED), noUnverifiedStack (STACKED_ON_UNVERIFIED), infraExplained (INFRA_NOTE_REQUIRED), doctrineHolds (RATCHET_ROSE or RATCHET_UNCOUNTED), gateConfigured (NO_GATE), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), gateGreen (GATE_RED or RUNNER_GUI_SESSION_REQUIRED or LAND_TIMEOUT_CUSTODY or LAND_GATE_OUTPUT or SLOT_DB_LOCKED or TIMING_SLOT_REQUIRED or RUNNER_BROWSER_SLOT_REQUIRED or PIPEFAIL_UNAVAILABLE), treeStillDuringGate (MOVED_DURING_GATE), submissionProofValid (SUBMISSION_PROOF), childrenDone (CHILDREN_OPEN), headIsNew (HEAD_NOT_NEW), result (LINE_SETTING_RANGE), result (MERGE_ONLY_PROOF), result (SELF_VERIFY), result (SELF_SESSION_VERIFY), result (VERIFIER_STANDING), result (PROOF_REQUIRED) |
+| submit | claimed | submitted | agent, coordinator | joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS or OUTSIDE_NATIVE_BUILD), correctionRefrozen (PENDING_REFREEZE), checkProvesSomething (CRITERION_PROVES_NOTHING), barReady (BAR_NOT_READY), criterionUnchanged (CRITERIA_CHANGED), treeClean (DIRTY), nothingUntracked (UNTRACKED), hasCommit (NO_COMMIT or HOST_NAME), withinLane (OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), trunkInCandidate (MAIN_NOT_COMPOSED), noUnverifiedStack (STACKED_ON_UNVERIFIED), infraExplained (INFRA_NOTE_REQUIRED), doctrineHolds (RATCHET_ROSE or RATCHET_UNCOUNTED), gateConfigured (NO_GATE), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), gateGreen (GATE_RED or RUNNER_GUI_SESSION_REQUIRED or LAND_TIMEOUT_CUSTODY or LAND_GATE_OUTPUT or SLOT_DB_LOCKED or TIMING_SLOT_REQUIRED or RUNNER_BROWSER_SLOT_REQUIRED or PIPEFAIL_UNAVAILABLE), treeStillDuringGate (MOVED_DURING_GATE), submissionProofValid (SUBMISSION_PROOF), childrenDone (CHILDREN_OPEN), headIsNew (HEAD_NOT_NEW), result (LINE_SETTING_RANGE), result (MERGE_ONLY_PROOF), result (SELF_VERIFY), result (SELF_SESSION_VERIFY), result (PROOF_REQUIRED) |
| submit-merge | claimed | verified | agent, coordinator, when only an unchanged accepted bar and a proved trunk-only merge; no new reviewer verdict is created | joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS or OUTSIDE_NATIVE_BUILD), correctionRefrozen (PENDING_REFREEZE), checkProvesSomething (CRITERION_PROVES_NOTHING), barReady (BAR_NOT_READY), criterionUnchanged (CRITERIA_CHANGED), treeClean (DIRTY), nothingUntracked (UNTRACKED), hasCommit (NO_COMMIT or HOST_NAME), withinLane (OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), trunkInCandidate (MAIN_NOT_COMPOSED), noUnverifiedStack (STACKED_ON_UNVERIFIED), infraExplained (INFRA_NOTE_REQUIRED), doctrineHolds (RATCHET_ROSE or RATCHET_UNCOUNTED), gateConfigured (NO_GATE), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), gateGreen (GATE_RED or RUNNER_GUI_SESSION_REQUIRED or LAND_TIMEOUT_CUSTODY or LAND_GATE_OUTPUT or SLOT_DB_LOCKED or TIMING_SLOT_REQUIRED or RUNNER_BROWSER_SLOT_REQUIRED or PIPEFAIL_UNAVAILABLE), treeStillDuringGate (MOVED_DURING_GATE), submissionProofValid (SUBMISSION_PROOF), childrenDone (CHILDREN_OPEN), headIsNew (HEAD_NOT_NEW), mergeOnlyRecorded (MERGE_ONLY_PROOF), atSubmittedCommit (NOT_AT_COMMIT or OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), notBuilder (SELF_VERIFY or VERIFIER_STANDING or SELF_SESSION_VERIFY), proofNoted (PROOF_REQUIRED) |
| reserve | submitted | submitted | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), roadmapReadable (MILESTONES_CORRUPT or LINE_SETTING_RANGE), itemExists (NO_ITEM), inState (NOT_SUBMITTED), reviewCooldownElapsed (REVIEW_COOLDOWN), notBuilder (SELF_VERIFY or VERIFIER_STANDING or SELF_SESSION_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD) |
| accept | submitted, verified | verified | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED or AGENT_REPLACED or SESSION_LEDGER), itemExists (NO_ITEM), inState (NOT_SUBMITTED), atSubmittedCommit (NOT_AT_COMMIT or OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), notMerged (ALREADY_MERGED), verdictReviewRecorded (BAD_VERDICT_REVIEW), reviewTreeCurrent (STALE_VERDICT or DIRTY or UNTRACKED or VERDICT_TRUNK_MOVED), notBuilder (SELF_VERIFY or VERIFIER_STANDING or SELF_SESSION_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD), criterionUnchanged (CRITERIA_CHANGED), reasonIsMet (BAD_REASON), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), noUnverifiedStack (STACKED_ON_UNVERIFIED), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), itemCheckGreen (CHECK_RED or RUNNER_GUI_SESSION_REQUIRED or SANDBOX_PROVIDER_REQUIRED or SANDBOX_IMAGE_REQUIRED or SANDBOX_RUNTIME or SANDBOX_EXPORT or SANDBOX_EXECUTION or SANDBOX_CLEANUP_REQUIRED or SANDBOX_CHECK_REQUIRED or CHECK_NO_PROOF or OUTSIDE_SANDBOX_REQUIRED or SLOT_DB_LOCKED or TIMING_SLOT_REQUIRED or CHECK_UNVERIFIED or GUARD_CANNOT_FAIL or GUARD_NOT_FOUND), proofNoted (PROOF_REQUIRED), result (VERDICT_ENVIRONMENT), result (LAND_HEADER), result (ENGINE_VERSION) |
@@ -194,9 +194,9 @@ Each move checks its guards in this order and refuses with the first one that do
| DIRTY | a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check | commit the reviewed composition before re-reviewing |
| UNTRACKED | a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check | commit or ignore untracked files before re-reviewing |
| VERDICT_TRUNK_MOVED | a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check | merge the latest main and re-review the clean composition |
-| SELF_VERIFY | the caller did not build it, and its agent session did not build or submit it under any seat; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | another agent verifies it: pullboard next --verify |
-| VERIFIER_STANDING | the caller did not build it, and its agent session did not build or submit it under any seat; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>" |
-| SELF_SESSION_VERIFY | the caller did not build it, and its agent session did not build or submit it under any seat; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | ask another agent session to verify it: pullboard next --verify from that session's own worktree |
+| SELF_VERIFY | the decision’s verifier did not build it, and its agent session did not build or submit it under any seat; a carried verdict retains its original native authority while rechecking all author identities; for a fresh review on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | another agent verifies it: pullboard next --verify |
+| VERIFIER_STANDING | the decision’s verifier did not build it, and its agent session did not build or submit it under any seat; a carried verdict retains its original native authority while rechecking all author identities; for a fresh review on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>" |
+| SELF_SESSION_VERIFY | the decision’s verifier did not build it, and its agent session did not build or submit it under any seat; a carried verdict retains its original native authority while rechecking all author identities; for a fresh review on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | ask another agent session to verify it: pullboard next --verify from that session's own worktree |
| COORDINATOR_VERIFIES | the repo's verify policy lets the caller verify this lane's work | the coordinator verifies it |
| O2_FAMILY_MATCH | the builder and verifier have different declared families; an undeclared family counts as a match, only when verify.family is require | ask the coordinator for a verifier from another declared family |
| REVIEW_HELD | no other agent holds its review under a live lease | pullboard next --verify, which passes over reviews another agent holds |
@@ -221,7 +221,6 @@ Each move checks its guards in this order and refuses with the first one that do
| MERGE_ONLY_PROOF | a requested carry matches the recorded conflict return, acceptance and exact gated source (submit result) | submit normally for outside review |
| SELF_VERIFY | the retained original verifier did not author the merge resubmission (submit result) | submit the changed source for outside review |
| SELF_SESSION_VERIFY | the retained verifier shares no author parent with the resubmitting builder (submit result) | submit for another parent session to review |
-| VERIFIER_STANDING | the retained verifier still has independent native standing (submit result) | ask an enrolled outside verifier to review the resubmission |
| PROOF_REQUIRED | a carried acceptance records the actual resolution diff (submit result) | submit with the current CLI or get an outside review |
| VERDICT_ENVIRONMENT | optional recorded verdict environment contains exact platform, architecture and Node version (accept result) | run the frozen check with current Pullboard, then have an independent reviewer record a fresh verdict with its actual executor environment |
| LAND_HEADER | a displayed merge command fits the commit-header limit (accept result) | shorten the item title or cited rows so the merge header fits |
diff --git a/src/board.js b/src/board.js
index a61fabc8..854848d1 100644
--- a/src/board.js
+++ b/src/board.js
@@ -228,7 +228,10 @@ export { decideSpecRevisions } from './spec-revisions.js';
import * as landingEnvironment from './landing-environment-guards.js';
import { Refused } from './refused.js';
import { saveJoinedSession } from './parent-session.js';
-import { itemAuthorProblem } from './item-authors.js';
+import {
+ itemAuthorProblem,
+ retainedVerifierIdentityProblem,
+} from './item-authors.js';
import { refuseMaskedExit } from './check-mask.js';
import {
ROUTES,
@@ -1127,7 +1130,7 @@ export function release(board, id, agentId, note = '') {
export function prepareMergeOnlySubmit(board, id, options) {
const item = getItem(board, id);
const basis = options?.gateGreen === true ? mergeOnlyBasis(board, item) : null;
- return basis && !itemAuthorProblem(board, item, basis.by)
+ return basis && !retainedVerifierIdentityProblem(board, item, basis.by)
&& mergeOnlySourceValid(board.gitRoot, board, item)
? deriveMergeOnly(board.gitRoot, basis, options) : null;
}
@@ -1182,7 +1185,7 @@ export function submit(board, id, { agentId, commit, tree, files = [], policyCom
...(carry ? {
mergeOnlyRecorded: carriedProblem,
atSubmittedCommit: null, // The same post-gate HEAD check binds both submission paths.
- notBuilder: found => itemAuthorProblem(board, found, basis.by),
+ notBuilder: found => retainedVerifierIdentityProblem(board, found, basis.by),
proofNoted: () => typeof mergeOnly?.resolutionDiff === 'string' ? null : new Refused('PROOF_REQUIRED', 'record the actual merge resolution diff'),
} : {}),
submissionProofValid: () => {
diff --git a/src/item-authors.js b/src/item-authors.js
index 217bfeb1..30d54004 100644
--- a/src/item-authors.js
+++ b/src/item-authors.js
@@ -16,9 +16,8 @@ export function itemAuthors(board, item) {
return [...authors];
}
-/** Apply the same author and linked-seat independence rule to explicit reviews and queue selection. */
-export function itemAuthorProblem(board, item, reviewer) {
- const authors = itemAuthors(board, item);
+/** Compare immutable author and parent identities without borrowing the current sender’s verifier credential. */
+function authorIdentityProblem(board, item, reviewer, authors) {
if (authors.includes(reviewer)) return new Refused('SELF_VERIFY', 'the builder never verifies its own work; another agent must');
if ((board.executionEngineVersion ?? ENGINE_VERSION) >= PARENT_SESSION_ENGINE) {
const parent = effectiveAgentParent(board, reviewer);
@@ -26,6 +25,19 @@ export function itemAuthorProblem(board, item, reviewer) {
return new Refused('SELF_SESSION_VERIFY', `this seat shares a parent session with an author of #${item.item_id}; ask a seat under another parent session to verify it`);
}
}
+ return null;
+}
+
+/** A retained native verdict keeps its original authority but may not cover work by a newly related author. */
+export function retainedVerifierIdentityProblem(board, item, reviewer) {
+ return authorIdentityProblem(board, item, reviewer, itemAuthors(board, item));
+}
+
+/** Apply full author identity and current linked standing to every fresh review and queue selection. */
+export function itemAuthorProblem(board, item, reviewer) {
+ const authors = itemAuthors(board, item);
+ const identity = authorIdentityProblem(board, item, reviewer, authors);
+ if (identity) return identity;
return (authors.length ? authors : [item.item_built_by])
.map(author => standingProblem(board, reviewer, author, item.item_id)).find(Boolean) ?? null;
}
diff --git a/src/machine.js b/src/machine.js
index 556ad1b5..d7fb77f3 100644
--- a/src/machine.js
+++ b/src/machine.js
@@ -141,7 +141,7 @@ export const GUARDS = [
{ id: 'atSubmittedCommit', refuse: 'NOT_AT_COMMIT', alsoRefuses: [{ code: 'OUTSIDE_LANE', next: 'restore foreign paths before accepting' }, { code: 'NO_POLICY', next: 'restore the frozen policy objects' }, { code: 'BAD_CONFIG', next: 'repair the committed coordinator configuration' }, { code: 'GIT_GRAFTS', next: 'ask the coordinator to remove the Git graft file before retrying' }], rule: "the caller's checkout contains the submitted commit", next: 'git switch --detach <commit>', source: 'cli' },
{ id: 'verdictReviewRecorded', refuse: 'BAD_VERDICT_REVIEW', rule: 'a new review binds the submitted commit, its exact checked commit, a valid trunk commit and canonical candidate paths', next: 'restore the submitted Git objects and retry the review with current Pullboard', source: 'board' },
{ id: 'reviewTreeCurrent', refuse: 'STALE_VERDICT', alsoRefuses: [{ code: 'DIRTY', next: 'commit the reviewed composition before re-reviewing' }, { code: 'UNTRACKED', next: 'commit or ignore untracked files before re-reviewing' }, { code: 'VERDICT_TRUNK_MOVED', next: 'merge the latest main and re-review the clean composition' }], rule: 'a stale acceptance is re-reviewed at a clean HEAD containing the current trunk, which stays fixed through its check', next: 'merge current main into the submitted commit and re-review it', source: 'cli' },
- { id: 'notBuilder', refuse: 'SELF_VERIFY', alsoRefuses: [{ code: 'VERIFIER_STANDING', next: 'the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>"' }, { code: 'SELF_SESSION_VERIFY', next: 'ask another agent session to verify it: pullboard next --verify from that session\'s own worktree' }], rule: 'the caller did not build it, and its agent session did not build or submit it under any seat; on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join', next: 'another agent verifies it: pullboard next --verify', source: 'board' },
+ { id: 'notBuilder', refuse: 'SELF_VERIFY', alsoRefuses: [{ code: 'VERIFIER_STANDING', next: 'the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>"' }, { code: 'SELF_SESSION_VERIFY', next: 'ask another agent session to verify it: pullboard next --verify from that session\'s own worktree' }], rule: 'the decision’s verifier did not build it, and its agent session did not build or submit it under any seat; a carried verdict retains its original native authority while rechecking all author identities; for a fresh review on a linked board, at engine 48 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join', next: 'another agent verifies it: pullboard next --verify', source: 'board' },
{ id: 'policyAllows', refuse: 'COORDINATOR_VERIFIES', rule: "the repo's verify policy lets the caller verify this lane's work", next: 'the coordinator verifies it', source: 'board' },
{ id: 'familyAllows', refuse: 'O2_FAMILY_MATCH', rule: 'the builder and verifier have different declared families; an undeclared family counts as a match', next: 'ask the coordinator for a verifier from another declared family', source: 'board', when: 'only when verify.family is require' },
{ id: 'reviewFree', refuse: 'REVIEW_HELD', rule: 'no other agent holds its review under a live lease', next: 'pullboard next --verify, which passes over reviews another agent holds', source: 'board' },
@@ -179,7 +179,6 @@ export const MOVES = [
{ code: 'MERGE_ONLY_PROOF', rule: 'a requested carry matches the recorded conflict return, acceptance and exact gated source', next: 'submit normally for outside review' },
{ code: 'SELF_VERIFY', rule: 'the retained original verifier did not author the merge resubmission', next: 'submit the changed source for outside review' },
{ code: 'SELF_SESSION_VERIFY', rule: 'the retained verifier shares no author parent with the resubmitting builder', next: 'submit for another parent session to review' },
- { code: 'VERIFIER_STANDING', rule: 'the retained verifier still has independent native standing', next: 'ask an enrolled outside verifier to review the resubmission' },
{ code: 'PROOF_REQUIRED', rule: 'a carried acceptance records the actual resolution diff', next: 'submit with the current CLI or get an outside review' }],
guards: ['joined', 'itemExists', IN_STATE, 'isHolder', 'correctionRefrozen', 'checkProvesSomething', 'barReady', 'criterionUnchanged', 'treeClean', 'nothingUntracked', 'hasCommit', 'withinLane', 'trunkMergeClean', 'trunkInCandidate', 'noUnverifiedStack', 'infraExplained', 'doctrineHolds', 'gateConfigured', 'queuedItemLease', 'gateGreen', 'treeStillDuringGate', 'submissionProofValid', 'childrenDone', 'headIsNew'],
sets: ['item_built_by', 'item_commit'], command: 'pullboard submit <id>',