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
test(rigor): keep historical data outside move refusals [M1,D1,H16]
Corey Olson86379c23cd10
diff --git a/test/machine.test.js b/test/machine.test.jsindex 9e3b5886..9c046e97 100644--- a/test/machine.test.js+++ b/test/machine.test.js@@ -136,6 +136,13 @@ const CAUGHT = {'spec-approval.js#specApprovalState': ['board-query.js#specApprovalBaseline'],// Historical decline metadata is parsed inside a non-throwing boundary, covered by the Rigor history control.'board.js#reopen': ['rigor-notices.js#declinedRigorSource'],+ // Rigor projection folds inspect invalid cause results as data, never lifecycle refusals.+ 'rigor.js#eventCauses': ['rigor.js#causeProblem'],+ 'rigor-counter-state.js#neverKey': ['rigor.js#causeProblem'],+ // Historical decline grammar is caught locally; typed readers return invalid evidence as null.+ 'rigor-counter-state.js#declineKey': ['spec.js#parseSpec'],+ 'rigor-source.js#readRigorSource': ['rigor.js#causeProblem'],+ 'rigor-auto-source.js#readAutomaticRigorSource': ['rigor.js#causeProblem'],// Only an unsupported historical grammar is ignored; new caller refusals remain audited below.'rigor-auto-source.js#automaticDecisionSource': ['spec.js#parseSpec'],'rigor-auto-source.js#rigorDecisionKey': ['spec.js#parseSpec'],@@ -1457,3 +1464,9 @@ test('transport boundaries keep a new item refusal in ordered dispatch visible ['MOON_PHASE is raised by submit but not declared there',], 'transport authentication is separate but a dispatcher item guard still belongs to the lifecycle');});+++test('Rigor historical data boundaries do not hide a new projection refusal [M1,M4]', () => {+ const broken = editedSource('rigor-counter-state.js', /export function rigorCounterKeys\(event, person\) \{/, "export function rigorCounterKeys(event, person) { if (event.event_kind === 'probe') throw new Refused('RIGOR_PROBE', 'new item eligibility rule');");+ assert.ok(codeProblems(MACHINE, broken).includes('RIGOR_PROBE is raised by claim but not declared there'));+});diff --git a/test/rigor-counters.test.js b/test/rigor-counters.test.jsindex 1f625db8..dacba5e6 100644--- a/test/rigor-counters.test.js+++ b/test/rigor-counters.test.js@@ -15,6 +15,7 @@ import { RIGOR_COLD_NOTICE } from '../src/rigor-counters.js';import { RIGOR_TAIL_LIMIT } from '../src/rigor-counters.js';import { undraftedRigor } from '../src/rigor-notices.js';import { rigorSource } from '../src/rigor-source.js';+import { parseSpec } from '../src/spec.js';const PREFIX = 'local:proof-stats:rigor:v1:';@@ -243,3 +244,20 @@ test('malformed historical detail preserves native writes and the legacy read faassert.throws(() => resumeRigorCounters(board, {}), error => error.constructor === failure.constructor && error.message === failure.message,'a caught-up invalid projection delegates to the exact legacy reader, never empty or falsely green');});+++test('invalid historical cause and decline grammar remain data during a current native move [M1,D1,H16]', t => {+ const { board, item } = fixture(t);+ oldRepeat(board, item);+ oldAppend(board, 'reject', item, { cause: 'not a cause key' });+ oldAppend(board, 'fact', item, { cause: 'not a cause key', neverAgain: true }, store.PERSON);+ const source = '<!-- pullboard-grammar 999 -->\n- G1 [draft, must] Unsupported.';+ assert.throws(() => parseSpec(source), { code: 'A5_GRAMMAR_VERSION' });+ oldAppend(board, 'row_decision', null, { record: { decision: 'decline', source } }, store.PERSON);+ const oracle = expected(board);+ const before = store.events(board).length;+ store.appendFact(board, item, { agentId: 'coordinator', kind: 'note', text: 'A valid move survives optional historical metadata.' });+ assert.equal(store.events(board).length, before + 1);+ assert.deepEqual(resumeRigorCounters(board, {}).causes, oracle);+ assert.equal(resumeRigorCounters(board, {}).notice, null);+});