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(land): only the export line takes the engine number [B3,R3]
Corey Olsonb5696c7af0a7
diff --git a/src/engine-numbers.js b/src/engine-numbers.jsindex 5cee8940..61c664e5 100644--- a/src/engine-numbers.js+++ b/src/engine-numbers.js@@ -70,7 +70,7 @@ export function assignEngineNumbers(root) {next += 1;const path = join(directory, leaf.file);const text = readFileSync(path, 'utf8').split('\n').filter((line) => line !== UNASSIGNED_IMPORT).join('\n')- .replace(/= unassignedEngine\(\);$/mu, `= ${next};`);+ .replace(/^(export const [A-Z][A-Z0-9_]*_ENGINE = )unassignedEngine\(\);$/mu, `$1${next};`);writeFileSync(path, text);files.push(`src/${leaf.file}`);assigned.push({ name: leaf.name, number: next });diff --git a/test/land-engine-fixture.js b/test/land-engine-fixture.jsindex bee75f22..9d6f79ac 100644--- a/test/land-engine-fixture.js+++ b/test/land-engine-fixture.js@@ -7,7 +7,8 @@ import { exportBoard, importBoard } from '../src/exchange.js';/** An unlanded engine leaf, as an item adds one under #1101. */function unlandedLeaf(name) {- return `/** The ${name} feature's engine. */\nimport { unassignedEngine } from './engine-next.js';\nexport const ${name.toUpperCase()}_ENGINE = unassignedEngine();\n`;+ // The comment names the placeholder too: only the export line itself may be rewritten.+ return `/** The ${name} feature's engine, written as ${name.toUpperCase()}_ENGINE = unassignedEngine(); until it lands. */\nimport { unassignedEngine } from './engine-next.js';\nexport const ${name.toUpperCase()}_ENGINE = unassignedEngine();\n`;}/** The engine number a leaf holds at a commit, or null when the leaf is not there or not yet numbered. */@@ -53,7 +54,9 @@ export function landEnginesInOrder({ landProject, itemWorktree, submitItem, acceif (position === 0) assert.equal(numberAt(box, merge, other), null, `${other} had not landed yet at the first merge`);}assert.match(box.git(box.repo, 'show', `${result.batch.tip}:docs/formats.md`), /\| `move engine` \| `82` \|/u, 'the documented move engine follows the highest landed number');- assert.ok(!box.git(box.repo, 'show', `${result.batch.tip}:src/alpha-engine.js`).includes('unassignedEngine'), 'a landed leaf names its number, not the placeholder');+ const landed = box.git(box.repo, 'show', `${result.batch.tip}:src/alpha-engine.js`);+ assert.match(landed, /^export const ALPHA_ENGINE = \d+;$/mu, 'the export line itself names its number');+ assert.ok(!landed.includes("from './engine-next.js'"), 'a landed leaf no longer imports the placeholder');assert.notEqual(box.git(box.repo, 'rev-parse', 'main'), base);// The landed board replays: its events import into a fresh board unchanged.const document = onBoard(box, (board) => exportBoard(board));