GrooveSeek

Semantic search over a Markdown knowledge base, served over MCP.

View the Project on GitHub alphabet-h/grooveseek

29. Re-read unchanged documents once per format, by a policy key per format

Context and problem

ADR-0028 lets an existing index catch up with a change to how .docx files are read, once, on an ordinary run: while a policy key in index_meta is not at its value, every unchanged .docx is re-read and each row is settled. The pass was .docx only: the key, the predicate that picks the rows to re-read (rereads_unchanged_docx), the awaiting-reparse mark and the final transaction all named "docx".

v1.19.0 changes how .pptx slides are read: each table row becomes one line, its cells tab-separated, and <a:br> a line break. An unchanged .pptx keeps the chunks the earlier version cut for as long as the index exists, the same problem ADR-0028 solved for .docx. This is ADR-0028’s revisit condition: “a later change needs the same catch-up for another format”. This ADR replaces ADR-0028’s sentence that names the per-row column (its option 1) as the general form.

Decision drivers

Options considered

  1. A column on each document row saying which rules wrote it (ADR-0028’s option 1). Exact and general, but a schema change with a migration, a column every write path has to fill, and the .docx tests pin the key values and that dropping a key reopens the pass. Rejected for those two reasons.
  2. Copy the .docx pass for .pptx. No change to the .docx path, but two implementations of the same question (“does this run re-read this row”), which AGENTS.md rules out.
  3. A policy key per format and one predicate over (extension, stale). Taken.

Decision

Consequences

References