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
test(merge): keep failed generators out of conflict returns [B3,R3,C7]
Corey Olsonb2387ed30274
diff --git a/test/mechanical-merge.test.js b/test/mechanical-merge.test.jsindex 0910c22e..3f5950f1 100644--- a/test/mechanical-merge.test.js+++ b/test/mechanical-merge.test.js@@ -97,6 +97,13 @@ test('add-only Markdown retains both contributors without reopening [B3,R3,C7]',land(box, '# API\n\nLeft.\nRight.\nEnd.\n');});+test('a valid JavaScript union is checked without executing its top-level body [B3,R3,C7]', () => {+ const box = fixture('src/cli.js', 'export {};\n', "throw new Error('inspection must not execute this');\nexport {};\n",+ 'export const added = true;\nexport {};\n');+ inspect(box, []);+ land(box, "throw new Error('inspection must not execute this');\nexport const added = true;\nexport {};\n");+});+test('generated lifecycle is classified without executing item code and regenerated only by landing [B3,R3,C7]', () => {const box = fixture('docs/lifecycle.md', 'old\n', 'left\n', 'right\n', {'package.json': '{"type":"module"}\n',@@ -221,3 +228,25 @@ test('version-one conflict replay keeps its original Git meaning while fresh mecassert.equal(store.getItem(board, id).item_status, 'open', 'a validated historical replay retains its recorded outcome');assert.deepEqual(JSON.parse(store.events(board, { itemId: id }).at(-1).event_detail).computedConflict, historical);});++test('a failing lifecycle generator blocks landing without reopening accepted work [B3,R3,C7]', () => {+ const box = boardFixture();+ const config = JSON.parse(readFileSync(join(box.repo, 'pullboard.json'), 'utf8'));+ config.lanes.web.owns.push('bin/');+ writeFileSync(join(box.repo, 'pullboard.json'), JSON.stringify(config, null, 2));+ mkdirSync(join(box.repo, 'bin'));+ writeFileSync(join(box.repo, 'bin/pullboard.js'), 'process.exit(7);\n');+ writeFileSync(join(box.repo, 'docs/lifecycle.md'), 'base\n');+ box.git(box.repo, 'add', '-A');+ box.git(box.repo, 'commit', '-q', '-m', 'chore: configure failing private generator');+ const left = accepted(box, 1, { 'docs/lifecycle.md': 'left\n' });+ const right = accepted(box, 2, { 'docs/lifecycle.md': 'right\n' });+ const before = box.git(box.repo, 'rev-parse', 'main');+ const result = box.run(box.repo, 'land', '--max', '2', '--json');+ assert.equal(result.code, 1, `${result.out}\n${result.err}`);+ const error = JSON.parse(result.out).error;+ assert.equal(error.code, 'LAND_MERGE');+ assert.match(error.message, new RegExp(`#${right}.*bin/pullboard\\.js.*docs/lifecycle\\.md|bin/pullboard\\.js.*docs/lifecycle\\.md.*#${right}`, 'u'));+ for (const id of [left, right]) assert.equal(json(box, box.repo, 'show', String(id)).item_status, 'verified');+ assert.equal(box.git(box.repo, 'rev-parse', 'main'), before, 'generator failure publishes nothing');+});