From b359b35de6d9b40cc0a99b928390d5b5a0c37df2 Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Tue, 12 May 2026 23:37:52 +0200 Subject: [PATCH] test(context): guard ingest identifier verification prompts --- .../src/ingest/ingest-runtime-assets.test.ts | 8 +++++ .../src/memory/memory-runtime-assets.test.ts | 30 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/packages/context/src/ingest/ingest-runtime-assets.test.ts b/packages/context/src/ingest/ingest-runtime-assets.test.ts index 2fafd69b..fd1fd66e 100644 --- a/packages/context/src/ingest/ingest-runtime-assets.test.ts +++ b/packages/context/src/ingest/ingest-runtime-assets.test.ts @@ -91,4 +91,12 @@ describe('ingest runtime assets', () => { expect(body).toContain('cross-table'); expect(body).not.toMatch(forbiddenProductPattern()); }); + + it('packages identifier verification prompt assets', async () => { + const shared = await readFile(join(skillsDir, '_shared', 'identifier-verification.md'), 'utf-8'); + expect(shared).toContain('## Identifier Verification Protocol'); + expect(shared).toContain('discover_data'); + expect(shared).toContain('entity_details'); + expect(shared).toContain('sql_execution'); + }); }); diff --git a/packages/context/src/memory/memory-runtime-assets.test.ts b/packages/context/src/memory/memory-runtime-assets.test.ts index ef056d18..4c77de1a 100644 --- a/packages/context/src/memory/memory-runtime-assets.test.ts +++ b/packages/context/src/memory/memory-runtime-assets.test.ts @@ -23,6 +23,19 @@ const expectedAdapterSkillHeadings: Record = { metabase_ingest: '# Metabase to KTX Semantic Layer', metricflow_ingest: '# MetricFlow to KTX Semantic Layer', }; +const verificationWriterSkills = [ + 'notion_synthesize', + 'dbt_ingest', + 'lookml_ingest', + 'looker_ingest', + 'metabase_ingest', + 'metricflow_ingest', + 'live_database_ingest', + 'historic_sql_table_digest', + 'historic_sql_patterns', + 'knowledge_capture', + 'sl_capture', +] as const; function forbiddenProductPattern() { return new RegExp([['Kae', 'lio'].join(''), ['kae', 'lio'].join(''), ['KAE', 'LIO_'].join('')].join('|')); @@ -117,4 +130,21 @@ describe('memory runtime assets', () => { expect(body).toContain('Do not call `sl_write_source` or `sl_edit_source`'); expect(body).toContain('LookML writes target the run connection directly'); }); + + it('ships identifier verification protocol in every synthesis writer skill', async () => { + for (const skillName of verificationWriterSkills) { + const body = await readFile(join(skillsDir, skillName, 'SKILL.md'), 'utf-8'); + expect(body).toContain('## Identifier Verification Protocol'); + expect(body).toMatch(/discover_data|entity_details/); + } + }); + + it('does not ship stale warehouse verification tool names or fictional identifiers', async () => { + for (const skillName of verificationWriterSkills) { + const body = await readFile(join(skillsDir, skillName, 'SKILL.md'), 'utf-8'); + expect(body).not.toContain('orbit_analytics.customer'); + expect(body).not.toContain('wiki_sl_search'); + expect(body).not.toContain('sl_describe_table'); + } + }); });