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.

test(team): bind replay fixture to its exact frozen bytes [E21,H16]

Corey Olson35c4058c3acd
diff --git a/test/team.test.js b/test/team.test.js
index a92b9cf4..90caafff 100644
--- a/test/team.test.js
+++ b/test/team.test.js
@@ -1,3 +1,4 @@
+import { createHash } from 'node:crypto';
/** @pullboard-test-loads src/board.js src/engine.js src/exchange.js */
/** Two independent Git/SQLite replicas derive verdict freshness without rewriting proof [E8]. */
import assert from 'node:assert/strict';
@@ -946,9 +947,11 @@ test('an agent grant narrows at claim without changing old receipts or permittin
for (const title of ['First', 'Second']) apply('addItem', [{ by: 'coordinator', lane: 'web', title,
criterion: 'A real file must exist', specIds: [], check: 'test -f grant-proof' }]);
/** Freeze an actual private Git revision; replicas receive only the canonical frozen value. */
- const freeze = item => ({ text: JSON.stringify({ title: item.item_title, criterion: item.item_criterion,
- check: item.item_check, rows: [], policy: { version: 1, commit: head, verify: { policy: 'any', family: 'off' } } }),
- digest: 'private-grant-fixture' });
+ const freeze = item => {
+ const text = JSON.stringify({ title: item.item_title, criterion: item.item_criterion,
+ check: item.item_check, rows: [], policy: { version: 1, commit: head, verify: { policy: 'any', family: 'off' } } });
+ return { text, digest: createHash('sha256').update(text).digest('hex') };
+ };
const options = { agentId: actor, lane: 'web', leaseMs: 60_000, freeze };
apply('claim', [1, options]);
const prior = apply('appendFact', [2, { agentId: actor, kind: 'note', text: 'Legacy behavior stays recorded.' }]);