reindex() docstring lists three namespaces but handles four (preference is undocumented) #29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observed on: 6.7.0
Problem
The
reindex()tool docstring says:It actually handles four namespaces. Calling
reindex()with no argument returned:preferencewas reindexed and 34 phantoms cleared, despite not being listed as a valid value or counted in "all three".Why it matters
The behaviour is right; the docs are wrong, and in the direction that causes work. Anyone reading the docstring would conclude preference indexes need a separate path and go hunting for one that doesn't exist. It also undercounts what the call does, which matters because this is a drop-and-recreate on a live index.
The description is also what an agent sees when deciding how to call the tool. An LLM reading "or 'knowledge'" as the enum won't try
namespace='preference', and won't know the unscoped call already covered it.Fix
Update the docstring to list all four namespaces and say "all four". Worth a grep for the same three-namespace assumption elsewhere in tool descriptions and docs —
healthreturns five indexes includingskill, so it's worth confirming whetherskillis deliberately excluded from reindex or just missed.Fixed in 6.7.1 (
f9e8f64onv6.7.x).reindex()now handles five namespaces and says so.skillis included: it is a real index thathealthalready reports on, and rebuilding it is as safe as any other because the SKILL.md body lives in the hash, not the index — so to answer your question, it was missed rather than deliberately excluded.The grep you asked for turned up the same three-namespace assumption twice more, and one of them was not just a doc bug:
recall()'s tool description listed'episodic', 'project', 'knowledge'and omittedpreference— exactly the failure mode you described, since that description is what an agent reads when deciding how to call the tool.memory_audit()built its unscoped prefix list by hand and skippedmem:preference:entirely, while still acceptingpreferenceas a filter value. So an unscoped audit silently under-reported the namespace — the same shape as this issue, but costing wrong numbers rather than wasted effort.Both now derive their prefixes from the accepted set instead of repeating it, so the list and the behaviour can't drift apart again.