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(spec): accept SSH email principals [S18,S21]

Corey Olson61a93e425c7b
diff --git a/src/cli.js b/src/cli.js
index 5ce6cf3e..0e74dd87 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1453,6 +1453,7 @@ function specCommand(io, { first, second, rest, values }) {
show: [],
unmet: ['must'],
signoff: ['by', 'note', 'note-file'],
+ signers: ['key', 'by'],
}[first ?? '--json'];
if (!commandFlags) throw new Refused('USAGE', 'use pullboard spec --json | check | view | show <id> | unmet [--must] | signoff <ids> --by <name> [--note "..."]');
const allowedFlags = [...new Set([...commandFlags, 'json'])];
diff --git a/src/spec.js b/src/spec.js
index 8296d17e..1f6c2fd4 100644
--- a/src/spec.js
+++ b/src/spec.js
@@ -289,8 +289,8 @@ export function unmetRows(rows, signoffs, { mustOnly = false } = {}) {
}
/**
- * Record a person's sign-off on approved rows, with the text they read (S5). Only a person's word
- * belongs here: the signer is initials or a first name.
+ * Record a person's sign-off on approved rows, with the text they read (S5). The signer is the
+ * exact SSH principal named by the key's allowed-signers entry.
*
* @param {string} root
* @param {ReturnType<typeof parseSpec>} spec
diff --git a/test/spec.test.js b/test/spec.test.js
index 3c1d5d44..10a05ce0 100644
--- a/test/spec.test.js
+++ b/test/spec.test.js
@@ -52,11 +52,11 @@ test('rows parse with id, status, tier, text, gate, serves, section and line [S1
});
test('rows parse signer requirements and lint their names and duplicates [S18]', () => {
- const spec = parseSpec('## G\n- G1 [approved, must] Two people sign. | gate: proof | signers: CO, AB\n');
- assert.deepEqual(spec.rows[0].signers, ['CO', 'AB']);
+ const spec = parseSpec('## G\n- G1 [approved, must] Two people sign. | gate: proof | signers: [email protected], AB\n');
+ assert.deepEqual(spec.rows[0].signers, ['[email protected]', 'AB']);
assert.deepEqual(lintSpec(spec), []);
- const invalid = lintSpec(parseSpec('## G\n- G1 [approved, must] Bad names. | gate: proof | signers: co,CO,CO\n'));
- assert.ok(invalid.some((finding) => /signer "co" must be initials/u.test(finding.message)));
+ const invalid = lintSpec(parseSpec('## G\n- G1 [approved, must] Bad names. | gate: proof | signers: bad name,CO,CO\n'));
+ assert.ok(invalid.some((finding) => /signer "bad name" must be one SSH principal/u.test(finding.message)));
assert.ok(invalid.some((finding) => /signers are unique/u.test(finding.message)));
});