test: harden decision storage round-trip evidence

This commit is contained in:
Eve
2026-05-08 13:38:42 +08:00
parent a440187962
commit 37410c0be5
3 changed files with 391 additions and 0 deletions

View File

@@ -39,5 +39,12 @@ export function createFileDecisionStore({ decisionsDir, repoRootOverride } = {})
artifactPath: resolvedPath,
};
},
consume(artifactPath, consumer) {
if (typeof consumer !== 'function') {
throw new Error('decision store consumer must be a function');
}
const loaded = this.load(artifactPath);
return consumer(loaded);
},
};
}