Skip to content

test(graph): golden-fixture accuracy harness for reference_count / trace / dead-code #277

Description

@Wolfvin

Mengapa

Fondasi CodeLens (call-graph akurat) berkali-kali retak tanpa tertangkap CI: reference_count/trace/dead-code salah lintas bahasa berbulan-bulan — deretan fix #210, #219, #222, #223, #231 SEMUANYA soal edge/caller hilang. Pola ini falsifiable: git log --oneline | grep -iE "ref.?count|caller|graph_edge|trace" menunjukkan tambalan berulang di area yang sama. Akar prosesnya: TIDAK ADA test yang mengunci output graph pada fixture dikenal, jadi tiap regresi lolos sampai ditemukan manual di workspace nyata.

Konteks

Setiap perbaikan graph sejauh ini diverifikasi ad-hoc di repo eksternal (KDS), lalu hilang — tidak jadi regression guard permanen. Pola yang terbukti di industri (tree-sitter test/corpus, snapshot testing) = fixture kecil deterministik + assert output persis; diff ditinjau saat sengaja berubah.

Tujuan

Harness golden-fixture: satu set fixture polyglot kecil (TS/JS/Python/Rust minimal) dengan pola yang HISTORIS bikin bug — module-level call (#219), object-literal arrow (#222), asyncHandler-wrapped (#231), same-file usage (#220), module-level caller di trace (#223). Scan fixture → assert reference_count, caller/callee set, dan dead-code status PERSIS. Regresi graph gagal CI seketika, bukan berbulan kemudian.

Constraint

Definition of Done

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug-fixRegression or broken behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions