fix(recovery): restore source removed by production documentation merge
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { TOOL_CANDIDATES, candidatesForRole } from '../../src/document-workbench/candidate-catalog';
|
||||
|
||||
describe('candidate catalog', () => {
|
||||
it('includes the selected and alternative tools without marking them ready', () => {
|
||||
const ids = TOOL_CANDIDATES.map((tool) => tool.id);
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
expect(ids).toEqual(
|
||||
expect.arrayContaining([
|
||||
'docling',
|
||||
'unstructured',
|
||||
'tika',
|
||||
'tesseract',
|
||||
'paddleocr',
|
||||
'duckdb',
|
||||
'polars',
|
||||
'frictionless',
|
||||
'pandera',
|
||||
'great-expectations',
|
||||
'valentine',
|
||||
'rapidfuzz',
|
||||
'splink',
|
||||
'assistant-ui',
|
||||
'temporal',
|
||||
'langgraph',
|
||||
'openmeter',
|
||||
'openrouter',
|
||||
]),
|
||||
);
|
||||
expect(TOOL_CANDIDATES.every((tool) => tool.status === 'qualification_required')).toBe(true);
|
||||
});
|
||||
it('finds alternatives by role and flags restricted services for extra review', () => {
|
||||
expect(candidatesForRole('ocr').map((tool) => tool.id)).toEqual(
|
||||
expect.arrayContaining(['tesseract', 'paddleocr', 'ocrmypdf']),
|
||||
);
|
||||
for (const id of ['pymupdf', 'marker', 'mineru', 'dify', 'n8n', 'open-webui', 'openrouter']) {
|
||||
expect(TOOL_CANDIDATES.find((tool) => tool.id === id)?.review).toBe(
|
||||
'additional_license_or_service_review',
|
||||
);
|
||||
}
|
||||
});
|
||||
it('records bounded-decision, agent and evaluation candidates without authorizing execution', () => {
|
||||
expect(candidatesForRole('decision').map((tool) => tool.id)).toContain('jev');
|
||||
expect(candidatesForRole('agent').map((tool) => tool.id)).toEqual(
|
||||
expect.arrayContaining(['langgraph', 'pydantic-ai', 'microsoft-agent-framework', 'crewai']),
|
||||
);
|
||||
expect(candidatesForRole('evaluation').map((tool) => tool.id)).toEqual(
|
||||
expect.arrayContaining(['promptfoo', 'deepeval', 'ragas', 'langfuse']),
|
||||
);
|
||||
expect(TOOL_CANDIDATES.every((tool) => tool.status === 'qualification_required')).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user