extraction-version.ts 1.3 KB

123456789101112131415161718192021222324
  1. /**
  2. * Extraction version
  3. *
  4. * A monotonically-increasing integer that identifies the *shape and depth* of
  5. * what the extractor writes into the graph. Unlike `CURRENT_SCHEMA_VERSION`
  6. * (which tracks the SQLite table layout and is migrated in place), this tracks
  7. * the EXTRACTED CONTENT — node kinds, edges, synthesizers, resolver coverage.
  8. *
  9. * When an index was built by an older engine whose `EXTRACTION_VERSION` is
  10. * below the running engine's, the data on disk is structurally fine but
  11. * *stale*: it's missing whatever a newer extractor would now produce. A schema
  12. * migration can't backfill that — only a re-index can. So this is the signal
  13. * `codegraph status` uses to recommend a re-index, and the reason `codegraph
  14. * upgrade` reminds users to refresh their projects.
  15. *
  16. * BUMP THIS when a release changes extraction output enough that existing
  17. * indexes should be rebuilt to benefit — e.g. a new language/framework
  18. * extractor, a new dynamic-dispatch synthesizer, a new node/edge kind, or a
  19. * resolver fix that materially changes which edges exist. Do NOT bump for
  20. * pure bug fixes, CLI/UX changes, or schema-only migrations. Over-bumping
  21. * turns the re-index hint into noise — keep it honest (see CLAUDE.md, "Honesty
  22. * in the product is load-bearing").
  23. */
  24. export const EXTRACTION_VERSION = 9;