Clear stale dfanalyzer indexes after switching library builds
Symptom#
After a library change, dfanalyzer e2e tests may report incorrect event counts if a .dftindex from an older dftracer-utils build remains in tests/data/extracted/. One trace counted exactly double: 251338 events instead of 125669, and seven e2e tests failed even though the same suites passed with the older build.
Cause#
The library code was not at fault. An old derived index remained and was not detected as stale because the dataframe-parity branch does not bump stored-format versions.
Fix#
Delete derived caches under tests/data/extracted/ (the .dftindex files and other generated files), keep the extracted traces, and rerun the tests. If e2e counts change right after switching library builds, clear the caches before debugging.
Evidence#
Observed in dfanalyzer: the ai trace counted 251338 events instead of 125669, and seven e2e tests failed after the library changed.
Also found by searching
- e2e event counts doubled after switching dftracer-utils builds
- old dftindex cache makes analyzer integration tests fail
- why do trace tests report twice as many events after a library update
- clear derived caches when tests change counts after switching libraries