Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
import { describe, it, expect, beforeAll } from 'vitest';
|
|
import path from 'path';
|
|
import { FIXTURES, getRelationships, runPipelineFromRepo, type PipelineResult } from './helpers.js';
|
|
|
|
describe('FastAPI Depends() CALLS edge extraction', () => {
|
|
let result: PipelineResult;
|
|
|
|
beforeAll(async () => {
|
|
result = await runPipelineFromRepo(path.join(FIXTURES, 'fastapi-depends'), () => {});
|
|
}, 60000);
|
|
|
|
it('emits CALLS edges from route handlers to get_current_user_record via Depends()', () => {
|
|
const edges = getRelationships(result, 'CALLS');
|
|
const dependsEdges = edges.filter((e) => e.target === 'get_current_user_record');
|
|
expect(dependsEdges.length).toBe(2);
|
|
const sources = dependsEdges.map((e) => e.source).sort();
|
|
expect(sources).toContain('list_calls');
|
|
expect(sources).toContain('get_user');
|
|
});
|
|
|
|
it('emits CALLS edges from route handlers to get_db via Depends()', () => {
|
|
const edges = getRelationships(result, 'CALLS');
|
|
const dependsEdges = edges.filter((e) => e.target === 'get_db');
|
|
expect(dependsEdges.length).toBe(2);
|
|
const sources = dependsEdges.map((e) => e.source).sort();
|
|
expect(sources).toContain('list_calls');
|
|
expect(sources).toContain('create_user');
|
|
});
|
|
|
|
it('traces typed default parameter: user: User = Depends(get_current_user_record)', () => {
|
|
const edges = getRelationships(result, 'CALLS');
|
|
const edge = edges.find(
|
|
(e) => e.target === 'get_current_user_record' && e.sourceFilePath.includes('calls.py'),
|
|
);
|
|
expect(edge).toBeDefined();
|
|
});
|
|
|
|
it('traces untyped default parameter: db=Depends(get_db)', () => {
|
|
const edges = getRelationships(result, 'CALLS');
|
|
const edge = edges.find((e) => e.target === 'get_db' && e.sourceFilePath.includes('users.py'));
|
|
expect(edge).toBeDefined();
|
|
});
|
|
});
|