refactor: remove legacy ktx compatibility shims (#211)

* refactor: remove legacy ktx compatibility shims

* fix: restore overlay collision guidance
This commit is contained in:
Andrey Avtomonov 2026-05-24 16:57:23 +02:00 committed by GitHub
parent a954a29a76
commit 96952fb43c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 294 additions and 342 deletions

View file

@ -175,6 +175,35 @@ describe('buildPublicIngestPlan', () => {
).toEqual(['--deep affects database ingest only; ignoring it for docs.']);
});
it('does not infer deep ingest from legacy scanMode values', () => {
const project = projectWithConnections({
warehouse: { driver: 'postgres' },
});
const plan = buildPublicIngestPlan(project, {
projectDir: '/tmp/project',
targetConnectionId: 'warehouse',
all: false,
scanMode: 'enriched',
});
expect(plan.targets[0]).toMatchObject({
connectionId: 'warehouse',
databaseDepth: 'fast',
steps: ['database-schema'],
});
});
it('rejects stale local Looker source driver aliases', () => {
const project = projectWithConnections({
local_looker: { driver: 'local_looker' } as never,
});
expect(() => buildPublicIngestPlan(project, { projectDir: '/tmp/project', all: true })).toThrow(
'unsupported public ingest driver "local_looker"',
);
});
it('upgrades effective depth when query history is explicitly enabled', () => {
const project = projectWithConnections({
warehouse: { driver: 'postgres', context: { queryHistory: { enabled: false } } },
@ -1045,7 +1074,7 @@ describe('runKtxPublicIngest', () => {
expect(io.stdout()).toContain('warehouse requires deep ingest readiness');
});
it('can request enriched relationship scans for setup-managed context builds', async () => {
it('does not infer enriched relationship scans from legacy scanMode values', async () => {
const io = makeIo();
const project = deepReadyProject({ warehouse: { driver: 'postgres' } });
const runScan = vi.fn(async () => 0);
@ -1074,8 +1103,8 @@ describe('runKtxPublicIngest', () => {
command: 'run',
projectDir: '/tmp/project',
connectionId: 'warehouse',
mode: 'enriched',
detectRelationships: true,
mode: 'structural',
detectRelationships: false,
dryRun: false,
},
expect.objectContaining({ capturedOutput: expect.any(Function) }),