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(train): retain speculative merge resolutions [B3,R3,C7]
Corey Olsoneda6ed665aa6
diff --git a/src/land.js b/src/land.jsindex 3c1ff427..163b4cbf 100644--- a/src/land.js+++ b/src/land.js@@ -604,7 +604,7 @@ async function promoteCandidate(state, candidate) {if (!isClean(state.batch.root) || untracked(state.batch.root).length) throw new Refused('LAND_DIRTY', 'the landing worktree changed; inspect it before adopting');git(state.batch.root, ['checkout', '--detach', candidate.batch.tip]);await save(state, { tip: candidate.batch.tip, items: candidate.batch.items,- conflicts: candidate.batch.conflicts ?? [], doctrineCounts: candidate.batch.doctrineCounts ?? [] });+ conflicts: candidate.batch.conflicts ?? [], resolutions: candidate.batch.resolutions ?? [], doctrineCounts: candidate.batch.doctrineCounts ?? [] });}/** Exclude a returned candidate and explicit or Git-stacked dependents from later speculation. */diff --git a/test/train-mechanical-merge.test.js b/test/train-mechanical-merge.test.jsindex d6e41c52..ebba3eca 100644--- a/test/train-mechanical-merge.test.js+++ b/test/train-mechanical-merge.test.js@@ -25,6 +25,12 @@ import {writeFormatTable,} from '../src/format-registry.js';import { discoverMoves } from '../src/move-registry.js';+import {+ GATE_SLOT_HELD_ENV,+ GATE_SLOT_POOL_ENV,+ GATE_SLOT_TOKEN_ENV,+ BROWSER_SLOT_HELD_ENV,+} from '../src/resources.js';const e2e = createE2eHelpers();after(e2e.cleanup);@@ -32,12 +38,16 @@ const FILE = 'src/api-moves.js';const BASE = "const MOVES = {\n base: { item: true },\n};\nexport { MOVES };\n";/** Create a real private board and remote whose web builders own the fixture registry. */-function project() {+function project(parallel = false) {const box = e2e.project('true');const path = join(box.repo, 'pullboard.json');const config = JSON.parse(readFileSync(path, 'utf8'));config.lanes.web.owns.push('src/');config.affectedTests = 'true';+ if (parallel) {+ config.landing = { parallel: true };+ for (const key of [GATE_SLOT_HELD_ENV, GATE_SLOT_POOL_ENV, GATE_SLOT_TOKEN_ENV, BROWSER_SLOT_HELD_ENV]) delete box.env[key];+ }writeFileSync(path, JSON.stringify(config, null, 2));mkdirSync(join(box.repo, 'src'), { recursive: true });writeFileSync(join(box.repo, FILE), BASE);@@ -71,8 +81,9 @@ function item(box, number, text) {return id;}-test('the train keeps both added registry entries and lands without a reopen [B3,R3,C7]', () => {- const box = project();+/** Exercise the identical native acceptance assertions under serial and speculative-prefix landing. */+function assertAdditions(parallel) {+ const box = project(parallel);const first = item(box, 1, BASE.replace(' base:', ' alpha: { item: true },\n base:'));const second = item(box, 2, BASE.replace(' base:', ' beta: { item: true },\n base:'));const landed = json(box, box.repo, 'land', '--max', '2');@@ -88,6 +99,14 @@ test('the train keeps both added registry entries and lands without a reopen [B3assert.ok(state.item_merged_commit);}assert.equal(box.git(box.remote, 'rev-parse', 'main'), box.git(box.repo, 'rev-parse', 'main'));+}++test('the train keeps both added registry entries and lands without a reopen [B3,R3,C7]', () => {+ assertAdditions(false);+});++test('parallel train promotion retains its mechanical resolution receipt [B3,R3,C7]', () => {+ assertAdditions(true);});test('a registry edit remains a conflict and reopens instead of being unioned [B3,R3,C7]', () => {