Explicit test data; no claim about the production repository.
(file = 'core.ts')
| 8 | |
| 9 | /** Explicit test data; no claim about the production repository. */ |
| 10 | function fixture(file = 'core.ts'): SelectionImpact { |
| 11 | const origin = { id: 1, name: 'core', qualified_name: 'fixture.core', file_path: file, line: 3 }; |
| 12 | const caller = { id: 2, name: 'caller', qualified_name: 'fixture.caller', file_path: 'caller.ts', line: 8 }; |
| 13 | return { |
| 14 | status: 'ready', project: 'fixture', file_path: file, scope: 'file', computed_at: 1700000000, cache_seconds: 30, |
| 15 | snapshot: { indexed_at: '2026-09-09T10:00:00Z', generation: 'legacy', index_revision: 'unknown', |
| 16 | freshness: 'Index equivalence to HEAD is unverified.', coverage_recording: 'unavailable', coverage: [] }, |
| 17 | structural: { available: true, basis: 'CALLS and IMPORTS', max_depth: 4, visit_cap: 600, result_cap: 60, |
| 18 | seed_count: 1, reachable: 1, direct: 1, test_candidates: 0, truncated: false, |
| 19 | findings: [{ ...caller, distance: 1, test_candidate: false, |
| 20 | path: [{ edge_id: 7, type: 'CALLS', from: caller, to: origin }] }] }, |
| 21 | history: { available: true, head: 'a'.repeat(40), shallow: false, worktree_status_known: true, |
| 22 | selection_uncommitted: true, truncated: false, commit_cap: 200, window_days: 548, |
| 23 | mass_change_threshold: 30, commits_scanned: 5, commits_considered: 3, selection_commits: 2, |
| 24 | merges_excluded: 1, mass_changes_excluded: 1, read_errors: 0, cochanges_omitted: 0, |
| 25 | commits: [{ hash: 'b'.repeat(40), subject: 'Explicit fixture commit', time: 1700000000, files: 2 }], |
| 26 | cochanges: [{ file_path: 'peer.ts', shared_commits: 2, commit_refs: ['b'.repeat(40)] }] }, |
| 27 | }; |
| 28 | } |
| 29 | |
| 30 | describe('selection impact evidence', () => { |
| 31 | it('does not turn missing graph, coverage and history into low risk', () => { |
no outgoing calls
no test coverage detected