Some checks failed
deploy / deploy (push) Failing after 52s
Proof: npm test (209/209) covers stale command expiry, bounded executor state, bounded strategy quote cache, bounded quote outcome refresh, and resource guardrails. Assumptions: current DB pair config and armed state remain the operator-approved live trading controls; stale quote commands are unsafe to submit after their min_deadline_ms. Still fake: quote outcomes still infer fills from inventory deltas rather than a venue-native terminal fill event.
12 lines
508 B
JavaScript
12 lines
508 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
const source = readFileSync(new URL('../src/apps/strategy-engine.mjs', import.meta.url), 'utf8');
|
|
|
|
test('strategy duplicate quote tracking is bounded and state-safe', () => {
|
|
assert.match(source, /createRecentIdCache\(\{ limit: 5000 \}\)/);
|
|
assert.match(source, /seenQuotes\.has/);
|
|
assert.match(source, /seenQuotes\.getState\(\)/);
|
|
assert.doesNotMatch(source, /seen_quotes:\s*\{\}/);
|
|
});
|