feat(01-02): export and serve validated local media pairs

This commit is contained in:
UnixNight committed 2026-11-12 19:34:06 -05:00
1 parent 488c904807
commit 49f874e64c
6 files changed
+465 -3

No files matched your search

+4 -3
View File
@@ -1,7 +1,8 @@
import test from 'node:test';
import nodeTest from 'node:test';
import assert from 'node:assert/strict';
import {pathToFileURL} from 'node:url';
import {existsSync} from 'node:fs';
let declared = 0;
function test(name, action) { declared++; return nodeTest(name, action); }
const modulePath = new URL('../tools/recon/fidelity_viewer/viewer.mjs', import.meta.url);
const api = existsSync(modulePath) ? await import(modulePath) : {};
@@ -54,5 +55,5 @@ test('capability navigation is supplied through a renderer', () => {
assert.equal(typeof api.renderCapabilities, 'function');
});
test('suite executes a positive declared count', () => {
assert.ok(6 > 0);
assert.ok(declared >= 6, 'runner must register a positive number of behavior tests');
});
+3
View File
@@ -146,6 +146,9 @@ class FidelityReview(unittest.TestCase):
value['limitations'].append(hostile)
raw = self.original.parent / 'raw.json'
raw.write_text(json.dumps(value))
# A new collector bundle has no import sidecar; do not reuse another
# receipt's immutable metadata identity for this changed observation.
(self.original.parent / 'receipt.sha256').unlink()
data = self.api().export_review(raw, None, self.output)
self.assertIn(hostile, data['sides']['original']['limitations'])
self.assertNotIn(hostile, (self.output / 'index.html').read_text())