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(hooks): allow supported grammar repairs [S19,A5,S8]

Corey Olson0099db6e4187
diff --git a/src/approved-rows.js b/src/approved-rows.js
index e42140ad..d44601ef 100644
--- a/src/approved-rows.js
+++ b/src/approved-rows.js
@@ -76,7 +76,8 @@ export function approvedRowProblems(root, config, boardFile) {
const staged = rowSourceAt(root, '', stagedPolicy[key], kind);
if (before.text === null || before.text === staged.text) continue;
const rows = parseSpec(staged.text ?? '');
- for (const old of parseSpec(before.text).rows.filter((row) => row.status === 'approved')) {
+ // Historical grammar declarations must not prevent a repair to the supported staged grammar.
+ for (const old of parseSpec(before.text, { strictGrammarVersion: false }).rows.filter((row) => row.status === 'approved')) {
const matches = rows.rows.filter((row) => row.id === old.id);
if (matches.length === 1 && matches[0].text === old.text) continue;
changes.push({ kind, file: staged.file, files: [before.file, staged.file], row: matches[0] ?? old, ambiguous: matches.length !== 1,
diff --git a/test/signoff.test.js b/test/signoff.test.js
index 380291f0..23a1bb07 100644
--- a/test/signoff.test.js
+++ b/test/signoff.test.js
@@ -122,6 +122,7 @@ test('[S17,S18,S19,S20,S21] signed rows require every named principal and surviv
writeFileSync(join(box.root, 'SPEC.md'), SPEC.replace('Exact row text is signed.', 'The exact approved row text is signed.'));
const stale = JSON.parse(succeeds(box, 'show', 'G1', '--json').stdout);
assert.equal(stale.standing.stale.length, 2, 'cryptographically valid records become stale when row text changes');
+ succeeds(box, 'signoff', 'G1', '--by', 'AB', '--note', 'approved the exact changed row');
box.git('add', 'SPEC.md', '.pullboard/signers', '.pullboard/signers.initial', '.pullboard/first-commit', '.pullboard/signoffs.jsonl');
box.git('commit', '-q', '-m', 'chore: record signed sign-offs');