test(outside-plan-disabled): compare named record timestamps as instants; negated authorship is not a current claim

The repair rerun named the seeded record by its ISO second
(2026-09-29T16:58:52Z vs .727Z) and said 'I did not write'; both were
misread as a foreign timestamp and a current write.
This commit is contained in:
garrytan committed 2026-09-29 17:02:31 +00:00
1 parent 97f0eee33d
commit 66d49280a5
3 files changed
+71 -4

No files matched your search

@@ -434,3 +434,22 @@ describe('36597762183 pre-existing record quoted around its owner', () => {
expect(evaluate(mutate(captured.output)).falseCompletion).toBe(true);
});
});
describe('repair rerun: ISO record timestamp at second precision', () => {
const captured = require('./fixtures/disabled-plan-attribution-local-rerun.json');
const prior = captured.reviewRecords[0];
const evaluate = (output: string) => {
const result = completed(); result.output = output; result.transcript.at(-1).result = output;
return disabledPlanReviewEvidence(result, '', captured.reviewRecords.map((record: any) => JSON.stringify(record)).join('\n'), prior);
};
test('the same instant written without milliseconds binds the retained record', () => {
expect(captured.provenance.originalVerdict).toMatchObject({ passed: false, falseCompletion: true });
expect(evaluate(captured.output)).toMatchObject({ passed: true, falseCompletion: false });
});
test('an authored record is not pre-existing history', () => {
expect(evaluate(captured.output.replace('entry I did not write', 'entry I wrote')).falseCompletion).toBe(true);
});
test.each(['2026-09-29T16:58:53Z', '2026-09-28T16:58:52Z', '16:58:53Z'])('another instant %s is not that record', stamp => {
expect(evaluate(captured.output.replace('2026-09-29T16:58:52Z', stamp)).falseCompletion).toBe(true);
});
});