Merge remote-tracking branch 'origin/codex/production-intelligence-terminal' into codex/issue-4-memory-prediction-loop
# Conflicts: # test/fetch-utils.test.mjs
This commit is contained in:
@@ -122,6 +122,24 @@ test('server exposes memory-backed query APIs and dashboard memory action', () =
|
||||
assert.match(html, /runTerminalAction\('memory'\)/);
|
||||
});
|
||||
|
||||
test('server dashboard shell does not embed an operational snapshot', () => {
|
||||
const html = readFileSync(new URL('../dashboard/public/jarvis.html', import.meta.url), 'utf8');
|
||||
assert.match(html, /let D = createDashboardShellData\(\);/);
|
||||
assert.doesNotMatch(html, /2026-04-03T16:18:10\.188Z/);
|
||||
assert.doesNotMatch(html, /Trump announced new strikes on Iran/);
|
||||
});
|
||||
|
||||
test('server dashboard fetches api data before initialization', () => {
|
||||
const html = readFileSync(new URL('../dashboard/public/jarvis.html', import.meta.url), 'utf8');
|
||||
const serverMode = html.indexOf('if (canProbeApi)');
|
||||
const apiFetch = html.indexOf("fetch('/api/data')");
|
||||
const firstInitAfterServerMode = html.indexOf('init();', serverMode);
|
||||
|
||||
assert.ok(serverMode > -1);
|
||||
assert.ok(apiFetch > serverMode);
|
||||
assert.ok(firstInitAfterServerMode > apiFetch);
|
||||
});
|
||||
|
||||
test('stale alert is skipped for fresh health and resets active key', () => {
|
||||
const state = { lastStaleAlertKey: 'old', lastStaleAlertAt: 100 };
|
||||
const decision = shouldSendStaleAlert({ stale: false }, state, { now: 200 });
|
||||
|
||||
Reference in New Issue
Block a user