llm.chunk.chunk_doc scanned the import-time pfs.families.FAMILIES (five hand families) at chunk time, while `stack llm restamp` refreshed from the DuckDB replica first — an indexed chunk's `families` metadata could disagree with what a restamp of the same text would compute. chunk_doc now takes an optional `code_index` (pfs.anchors.code_family_ index(families)) and threads it into every anchor_metadata call, on both the section-chunking and paragraph-chunking paths. llm.index. index_refs builds one such index per run — hand families plus pfs.families.refresh_from against the DuckDB replica when it exists, the same mechanism `stack llm restamp` already used — and passes it to every chunk_doc call for the run. Corrected pfs/anchors.py's docstring, which claimed the two paths already wrote identical values.
9.5 KiB
9.5 KiB