test: strengthen processing cancellation and refusal guards

Bound the halt-abort expectation, check Discord refusal before malformed journal reads, and isolate HTTP origin and valid oversized-body guards. These test changes are committed for the row 191 gate; execution awaits the coordinated slot.
This commit is contained in:
rocko committed 2026-10-21 21:04:37 -05:00
1 parent 9a7251403a
commit 154e08b511
3 files changed
+26 -3

No files matched your search

@@ -9,7 +9,7 @@ import { initializeControl, transition } from '../src/state.mjs';
const api = await import('../src/effects.mjs').catch(e => { if (e.code === 'ERR_MODULE_NOT_FOUND') return {}; throw e; });
function fixture(t) { const root = mkdtempSync(join(tmpdir(), 'processing-effect-')); initializeControl(root); t.after(() => rmSync(root, { recursive: true, force: true })); return root; }
const actor = { business: 'demo', human: 'jason', halted: true };
test('halt aborts an active local request and prevents a subsequent effect after halt/resume', async t => {
test('halt aborts an active local request and prevents a subsequent effect after halt/resume', { timeout: 4000 }, async t => {
assert.equal(typeof api.withProcessing, 'function');
const root = fixture(t); let started;
const ready = new Promise(resolve => { started = resolve; });