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.
23 lines
893 B
JavaScript
23 lines
893 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
const manifest = readFileSync(new URL('../deploy/k8s/base/unrip.yaml', import.meta.url), 'utf8');
|
|
|
|
function deploymentBlock(name) {
|
|
const pattern = new RegExp(
|
|
`kind: Deployment\\nmetadata:\\n name: ${name}\\n[\\s\\S]*?(?=\\n---\\napiVersion:|\\n?$)`,
|
|
);
|
|
const match = manifest.match(pattern);
|
|
assert.ok(match, `expected deployment ${name}`);
|
|
return match[0];
|
|
}
|
|
|
|
for (const name of ['near-intents-ingest', 'history-writer', 'trade-executor', 'operator-dashboard']) {
|
|
test(`${name} has memory guardrails for live quote pressure`, () => {
|
|
const block = deploymentBlock(name);
|
|
|
|
assert.match(block, /name: NODE_OPTIONS\s+value: "--max-old-space-size=896"/);
|
|
assert.match(block, /resources:\s+requests:\s+memory: 256Mi\s+limits:\s+memory: 1280Mi/);
|
|
});
|
|
}
|