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(relay): include new native moves in parity inventory [H5,H16,A2]

Corey Olson3463c37c736e
diff --git a/test/relay-parity-extra-seeds.js b/test/relay-parity-extra-seeds.js
index 2fb4bf12..d01d0b01 100644
--- a/test/relay-parity-extra-seeds.js
+++ b/test/relay-parity-extra-seeds.js
@@ -47,7 +47,7 @@ export async function seedLandingObservations(context) {
export async function seedMembership(context) {
const { board, store, exercise } = context;
await exercise('setBoardMembers', () => store.setBoardMembers(board, { agentId: 'coordinator', document: {
- body: { v: 1, board: store.boardId(board), repository: 'fixture/repository', revision: 1, members: ['parity-member'] },
+ body: { v: 1, board: store.boardId(board), repository: 'fixture/repository', revision: (store.readBoardMembers(board)?.body.revision ?? 0) + 1, members: ['parity-member'] },
by: 'parity-owner', signature: '-----BEGIN SSH SIGNATURE-----\nSynthetic projection fixture; not a verified signature\n-----END SSH SIGNATURE-----' } }));
}
@@ -128,3 +128,24 @@ export async function seedBarSignature(context) {
sourceCheck: check, timeoutMs: 300000, runner: 'node --test', required: [], files: [] } }));
store.setBarReady(board, { agentId: 'coordinator', enabled: false });
}
+
+/** New declared operations retain unknown proof facts and real cross-lane child state, without fabricated execution claims. */
+export async function seedCurrentOperations(context) {
+ const { board, box, store, exercise, agent } = context;
+ const item = store.addItem(board, { by: 'coordinator', lane: box.lane, title: 'Synthetic provenance projection', criterion: 'Readers retain unknown receipt facts' });
+ const head = resolveCommit(box.root, 'HEAD');
+ const tree = tryGit(box.root, ['rev-parse', `${head}^{tree}`]).stdout.trim();
+ const receipt = { version: 2, id: randomUUID(), kind: 'check', head, tree, main: null,
+ command: 'c'.repeat(64), green: false, failures: [], load: null, at: board.clock.now().toISOString(),
+ proof: { item, frozenDigest: null, seat: agent, environment: null, runner: null, exitCode: null,
+ counts: { passed: null, failed: null, skipped: null }, durationMs: 0, sourceClean: false } };
+ // Exactly as the accepted native storage-boundary fixture, this models a historical record,
+ // never evidence that this test ran a gate or observed any executor/counts.
+ const folder = join(box.root, '.git', 'pullboard', 'gate-receipts');
+ mkdirSync(folder, { recursive: true });
+ writeFileSync(join(folder, `${receipt.id}.json`), receiptBody(receipt));
+ await exercise('recordProofRun', () => store.recordProofRun(board, { agentId: agent, itemId: item, receiptId: receipt.id }));
+ await exercise('requestCompanion', () => store.requestCompanion(board, { agentId: agent, parentId: item,
+ lane: box.lane === 'tests' ? 'core' : 'tests', key: 'reader-parity', title: 'Projection companion',
+ criterion: 'A real cross-lane child remains visible in both readers', brief: 'Synthetic private board child; no real work requested.' }));
+}
diff --git a/test/relay-parity-fixture.js b/test/relay-parity-fixture.js
index 04b0371b..9c3b5e4e 100644
--- a/test/relay-parity-fixture.js
+++ b/test/relay-parity-fixture.js
@@ -8,6 +8,7 @@ import { decodeBoardKey } from '../src/seal.js';
import { relayPresentation } from '../src/relay-presentation.js';
import { presentationDigest } from '../src/relay-presentation.js';
import { runFixtureChild } from './fixture-child.js';
+import { runFixtureChildAsync } from './fixture-child.js';
export { assertReaderParity } from './relay-parity-reader.js';
import { createParityReader } from './relay-parity-reader.js';
import { relayClientFixture } from './relay-client-fixture.js';
@@ -87,11 +88,16 @@ export async function parityRoundtrip(t, { foreign = false } = {}) {
const file = join(box.root, '.git', 'pullboard', 'parity-reader-session.json');
writeFileSync(file, JSON.stringify(parameters), { mode: 0o600 });
try {
- const result = await box.script(`import { readFileSync } from 'node:fs';
+ const running = runFixtureChildAsync(process.execPath, ['--input-type=module', '-e', `import { readFileSync } from 'node:fs';
import { exerciseOperationParity } from ${JSON.stringify(module)};
-try { console.log(JSON.stringify(await exerciseOperationParity(JSON.parse(readFileSync(${JSON.stringify(file)}, 'utf8'))))); } catch (error) { console.log(JSON.stringify({ error: error.message })); process.exitCode = 1; }`);
- assert.equal(result.code, 0, `complete operation inventory: ${result.failure ?? result.document?.error ?? 'no result'}`);
- return result.document;
+try { console.log(JSON.stringify(await exerciseOperationParity(JSON.parse(readFileSync(${JSON.stringify(file)}, 'utf8'))))); } catch (error) { console.log(JSON.stringify({ error: error.message })); process.exitCode = 1; }`], { cwd: box.root, env: box.env, signal: t.signal });
+ t.after(async () => {
+ if (running.child.exitCode === null && running.child.signalCode === null) running.child.kill('SIGTERM');
+ await running;
+ });
+ const result = await running;
+ assert.equal(result.status, 0, result.failure ?? result.context);
+ return JSON.parse(result.stdout.trim());
} finally { rmSync(file, { force: true }); }
}
return { native, relay, exercised: seeded.exercised, exerciseOperations };
diff --git a/test/relay-parity-operations.js b/test/relay-parity-operations.js
index ad44ccff..5c7b7b8f 100644
--- a/test/relay-parity-operations.js
+++ b/test/relay-parity-operations.js
@@ -12,7 +12,7 @@ import { decodeBoardKey } from '../src/seal.js';
import { createParityReader, assertReaderParity } from './relay-parity-reader.js';
import { createStudyExercise, seedStudyState } from './relay-parity-seeds.js';
import { submitFixture } from './board-submit-fixture.js';
-import { seedOutside, seedLandingObservations, seedMembership, seedAdministrative, seedBatch, seedCoordinatorAuthority, seedSpecOutcomes, seedBarSignature } from './relay-parity-extra-seeds.js';
+import { seedOutside, seedLandingObservations, seedMembership, seedAdministrative, seedBatch, seedCoordinatorAuthority, seedSpecOutcomes, seedBarSignature, seedCurrentOperations } from './relay-parity-extra-seeds.js';
import { syntheticFlakeObservation } from './flake-observation-fixture.js';
/** Run inside the existing private fixture's genuine environment, retaining one HTTP server and person session. */
@@ -51,6 +51,7 @@ export async function exerciseOperationParity({ root, origin, token, boardId, la
await seedAdministrative(context);
await seedBatch(context);
await seedSpecOutcomes(context);
+ await seedCurrentOperations(context);
await seedBarSignature(context);
await seedCoordinatorAuthority(context);
const missing = tracking.missing(MOVE_OPERATIONS);