Skip to content

index: fingerprint the chunker/grammar in the manifest so incremental reuse invalidates on chunker changes #94

Description

@amondnet

Context

Follow-up from #84 / #91 (incremental reindexing, ADR-0005). The per-file manifest keys reuse on the file's content hash only. A tree-sitter grammar or chunker change (e.g. bumping DESIRED_CHUNK_LENGTH_CHARS is covered, but a grammar upgrade or a chunking-heuristic fix is not) leaves unchanged files with chunks produced by the old chunker until their bytes change.

Proposal

  • Add a chunkerFingerprint (hash of the chunker version + grammar set) to manifest.json.
  • manifest_compatible fails closed when it differs, forcing a full rebuild.
  • Bump INDEX_SCHEMA_VERSION only if the field cannot be defaulted for older manifests.

Acceptance

  • A grammar/chunker change invalidates the incremental seed (test in cache_orchestrator/tests.rs).
  • .please/docs/decisions/0005-per-file-hash-manifest-incremental-reindex.md documents the new key.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions