From d68577843e0108a7d95c20813662a18feb434fcc Mon Sep 17 00:00:00 2001 From: Studio Date: Fri, 27 Nov 2026 23:11:48 -0500 Subject: [PATCH] =?UTF-8?q?T-78:=20M1.1j=20=E2=80=94=20Persist=20Pass=203/?= =?UTF-8?q?5/6=20results=20into=20the=20security=20master:=20idempotent=20?= =?UTF-8?q?PostgreSQL=20loader=20with=20permanent=20`listing=5Fid`s=20and?= =?UTF-8?q?=20`override`=20precedence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/postgres/security-master-persist.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/postgres/security-master-persist.test.ts b/test/postgres/security-master-persist.test.ts index 7c0f3262..3c547b93 100644 --- a/test/postgres/security-master-persist.test.ts +++ b/test/postgres/security-master-persist.test.ts @@ -5,7 +5,6 @@ import { getLogger, setLoggerConfig } from '@stock-bot/logger'; import { PostgreSQLClient, runPostgresMigrations } from '@stock-bot/postgres'; import { DEFAULT_OTC_MICS, - DEFAULT_VALID_FROM, formatListingNaturalKey, linkDelistingChains, matchInstrumentsStageA, @@ -704,12 +703,12 @@ describe.skipIf(!url)('persistSecurityMaster PostgreSQL integration', () => { const aaplId = initial.listingIdByKey.get(aaplKey)!; const shopNyseId = initial.listingIdByKey.get(shopNyseKey)!; - // 1) Override an existing matcher mapping (eod, AAPL.US, 1900-01-01) -> shopNyseId + // 1) Override an existing matcher mapping (eod, AAPL.US, 1980-12-12) -> shopNyseId // 2) Add an override-only mapping absent from matcher output (qm, MANUAL_OVR:US, 2021-01-01) -> aaplId await f.pool.query( `INSERT INTO override (source, source_id, valid_from, valid_to, listing_id, reason, created_by) VALUES - ('eod', 'AAPL.US', DATE '1900-01-01', DATE '2025-12-31', $1, 'conflict resolution', 'director'), + ('eod', 'AAPL.US', DATE '1980-12-12', DATE '2025-12-31', $1, 'conflict resolution', 'director'), ('qm', 'MANUAL_OVR:US', DATE '2021-01-01', NULL, $2, 'manual addition', 'director')`, [shopNyseId, aaplId] ); @@ -743,7 +742,7 @@ describe.skipIf(!url)('persistSecurityMaster PostgreSQL integration', () => { { source: 'eod', source_id: 'AAPL.US', - valid_from: DEFAULT_VALID_FROM, + valid_from: '1980-12-12', valid_to: '2025-12-31', listing_id: shopNyseId, method: 'override',