/** * Progress reporting for the callback-edge synthesis tail. * * Synthesis runs AFTER the resolution bar reaches 100%, so before this it had * no progress surface at all — on synthesizer-heavy repos (e.g. large C * codebases hitting the fn-pointer pass) the CLI sat frozen at * "Resolving refs 100%" long enough that users concluded the index hung and * killed it. These tests pin (a) that indexing emits the dedicated 'linking' * phase with monotonic per-pass progress, and (b) that the advertised step * total stays in sync with the synthesizer's actual pass list. */ import { describe, it, expect } from 'vitest'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import { CodeGraph, IndexProgress } from '../src/index'; import { SYNTH_PROGRESS_STEPS } from '../src/resolution/callback-synthesizer'; describe('synthesis progress ("Linking dynamic dispatch" phase)', () => { it('SYNTH_PROGRESS_STEPS matches the synthesizer’s actual __mark() step count', () => { // The constant is cosmetic (progress denominator), but drift makes the bar // end early or jump to 100% — adding a pass must bump it. Every step site // calls __mark('