import test from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import { CURRENT_PAIR_KEY, buildSeedStrategyConfig, } from '../src/core/trading-config.mjs'; test('repo DB seed carries the approved 49 bps current-pair edge', () => { const config = buildSeedStrategyConfig(CURRENT_PAIR_KEY); assert.equal(config.edgeBps, 49); }); test('kubernetes production config does not carry pair, asset, or edge env vars', () => { const manifest = readFileSync(new URL('../deploy/k8s/base/unrip.yaml', import.meta.url), 'utf8'); assert.doesNotMatch(manifest, /NEAR_INTENTS_PAIR_FILTER/); assert.doesNotMatch(manifest, /TRADING_BTC_/); assert.doesNotMatch(manifest, /TRADING_EURE_/); assert.doesNotMatch(manifest, /STRATEGY_GROSS_THRESHOLD_PCT/); assert.doesNotMatch(manifest, /STRATEGY_MAX_NOTIONAL_EURE/); assert.doesNotMatch(manifest, /INTENT_REQUEST_DEFAULT_AMOUNT_EURE/); assert.doesNotMatch(manifest, /INTENT_REQUEST_MAX_AMOUNT_EURE/); }); test('live market-maker watch script reads DB assets instead of removed trading env vars', () => { const source = readFileSync(new URL('../scripts/ops/watch_live_mm.py', import.meta.url), 'utf8'); assert.match(source, /from trading_assets/); assert.doesNotMatch(source, /TRADING_BTC_ASSET_ID/); assert.doesNotMatch(source, /TRADING_EURE_ASSET_ID/); });