From 1dad25085d15a8a4038453d2037cfacd48e4d50e Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Tue, 6 Oct 2026 23:42:54 +0000 Subject: [PATCH] test(training-agent): derive validator-gate seed passes from fixtures The drift test from #7541 hard-coded 14 and 18 seed_product passes. The @adcp/sdk 14.2 runner also seeds each fixture account through the controller, so /brand and /governance now earn 15 and 19 passes, and main fails Server integration tests (3/4). Count fixture products plus fixture accounts and accept seed_account steps alongside seed_product. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../training-agent-tool-catalog-drift.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/server/tests/integration/training-agent-tool-catalog-drift.test.ts b/server/tests/integration/training-agent-tool-catalog-drift.test.ts index 9b1691e74ee..23a13373411 100644 --- a/server/tests/integration/training-agent-tool-catalog-drift.test.ts +++ b/server/tests/integration/training-agent-tool-catalog-drift.test.ts @@ -152,13 +152,15 @@ describe('tool-catalog drift detection', () => { expect(tools).toContain('comply_test_controller'); expect(tools).not.toContain('validate_input'); expect(toolsForTenant(tenant)).not.toContain('validate_input'); - for (const [name, seedPasses] of [ - ['ctv-experience-validate-input', 14], - ['premium-display-canonical-validation', 18], - ] as const) { + for (const name of ['ctv-experience-validate-input', 'premium-display-canonical-validation'] as const) { const storyboard = YAML.parse(readFileSync(new URL( `../../../static/compliance/source/universal/${name}.yaml`, import.meta.url, ), 'utf8')) as Storyboard; + // The runner seeds every fixture product and fixture account through the + // controller, so those seeds are the only passes the old OR gate earned. + const fixtures = (storyboard as { fixtures?: { products?: unknown[]; accounts?: unknown[] } }).fixtures; + const seedPasses = (fixtures?.products?.length ?? 0) + (fixtures?.accounts?.length ?? 0); + expect(seedPasses).toBeGreaterThan(0); const options = { auth: { type: 'bearer' as const, token: 'tool-catalog-drift-token' }, allow_http: true, @@ -177,7 +179,7 @@ describe('tool-catalog drift detection', () => { const passed = steps.filter(step => step.passed && !step.skipped); expect(passed).toHaveLength(seedPasses); expect(passed.every(step => step.task === 'comply_test_controller' - && step.step_id.startsWith('seed_product.'))).toBe(true); + && (step.step_id.startsWith('seed_product.') || step.step_id.startsWith('seed_account.')))).toBe(true); const validators = steps.filter(step => step.task === 'validate_input'); expect(validators).toHaveLength(storyboard.phases.reduce((n, phase) => n + phase.steps.length, 0)); expect(validators.every(step => step.skipped && step.skip_reason === 'missing_tool')).toBe(true);