feat(L05): add Git log diff and restore card

This commit is contained in:
user
2026-07-21 18:05:05 +02:00
commit 6103bb547d
38 changed files with 7133 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import assert from 'node:assert/strict'; import { access, readFile } from 'node:fs/promises'; import test from 'node:test';
const source=JSON.parse(await readFile(new URL('../json/card_source.json',import.meta.url),'utf8'));
test('L05 identity and task order are stable',()=>{assert.equal(source.card.number,'05');assert.equal(source.card.uuid,'6c357743-5c79-568f-9577-1871542c21da');assert.deepEqual(source.tasks_order,['task01','task02','task03']);});
test('history, diff and safe restore evidence are explicit',()=>{const text=JSON.stringify(source);for(const token of ['HEAD','index','worktree','restore','trace.log'])assert.match(text,new RegExp(token,'i'));});
test('all task sources exist',async()=>{for(const name of ['task01_read_history','task02_compare_diffs','task03_restore_safely'])await access(new URL(`../src/tasks/${name}.sh`,import.meta.url));});