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(submit): require full landing evidence OIDs [C7,V4,H16]
Corey Olsonfba49536154a
diff --git a/src/submit-invariants.js b/src/submit-invariants.jsindex 5092f455..f92e35c2 100644--- a/src/submit-invariants.js+++ b/src/submit-invariants.js@@ -5,7 +5,7 @@ import { relative } from 'node:path';export const SUBMISSION_PROOF_ENGINE = 38;const BUDGET_MS = 60_000;-const COMMIT = /^[a-f0-9]{40,64}$/u;+const COMMIT = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/u;/** Accept only literal project-relative paths that can be displayed and configured safely. */function projectFile(value) {diff --git a/test/submit-invariants.test.js b/test/submit-invariants.test.jsindex 77de3af1..ce0ccb69 100644--- a/test/submit-invariants.test.js+++ b/test/submit-invariants.test.js@@ -107,6 +107,28 @@ test('a landing escape is proposed as a submit invariant [C7,V4]', async () => {assert.throws(() => store.recordLandingBatch(board, { agentId: 'coordinator', revision: previous.revision,batch: { ...previous, invariantEvidence: { ...previous.invariantEvidence, gates: [] } } }), { code: 'LAND_EVIDENCE' });assert.equal(store.events(board).length, eventCount, 'a prior receipt cannot be removed or rewritten');+ // Modern evidence names Git OIDs, whose full hexadecimal shape is SHA-1 or SHA-256.+ for (const length of [41, 63]) for (const field of ['gate', 'submission', 'diagnostic']) {+ const malformed = structuredClone(previous);+ if (field === 'diagnostic') {+ malformed.invariantEvidence.diagnostics.push({ commit: 'e'.repeat(length), test: 'test/oid.test.js', isGreen: true, wallMs: 1 });+ } else {+ const gate = structuredClone(previous.invariantEvidence.gates[0]);+ if (field === 'gate') gate.commit = 'e'.repeat(length);+ else gate.submissions[0].commit = 'e'.repeat(length);+ malformed.invariantEvidence.gates.push(gate);+ }+ assert.throws(() => store.recordLandingBatch(board, { agentId: 'coordinator', revision: previous.revision, batch: malformed }),+ { code: 'LAND_EVIDENCE' }, `${field} evidence rejects a ${length}-digit pseudo-commit`);+ assert.equal(store.events(board).length, eventCount, 'malformed exact-commit evidence adds no event');+ assert.deepEqual(store.landingBatches(board).find(batch => batch.id === previous.id), previous, 'malformed evidence preserves its prior revision');+ }+ const oid = 'f'.repeat(64);+ const valid = { ...previous, id: 'sha256-evidence-control', invariantEvidence: { version: 1,+ gates: [{ commit: oid, isGreen: true, submissions: [{ id: submit.id, commit: oid }], failures: [], fileTimes: [] }],+ diagnostics: [{ commit: oid, test: 'test/oid.test.js', isGreen: true, wallMs: 1 }] } };+ const accepted = store.recordLandingBatch(board, { agentId: 'coordinator', batch: valid });+ assert.deepEqual(accepted.invariantEvidence, valid.invariantEvidence, '64-digit SHA-256 evidence remains representable; existing 40-digit receipts stay intact');});const untouchedConfig = readFileSync(configPath, 'utf8');const proposals = json(box, box.repo, 'status').submitInvariantProposals;