You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A web fetch selection of only dots returns the whole document and still reports success #790
The character class matches neither . nor [ or ], so a selector built only from those characters yields an empty steps array. The for loop body never runs and pick returns current, which is still the whole parsed document.
shapeJson then computes missing = select.filter((s) => picked[s] === undefined). Nothing is missing, so the note reads selected 1 path from N characters and the not found: clause is suppressed.
Why it is wrong
The model asked to keep one narrow path, is told the selection worked, and instead receives the entire body — up to 40,000 characters of unrelated JSON plus (Selection truncated at 40,000 characters; select narrower paths.).
The not found: note is the only signal that would have told it to retry, and that is exactly the signal that gets suppressed. It costs a wasted turn on a 40 KB payload.
This is the "reports a selection that did not happen" class: the tool claims success while returning something else entirely.
Reproduction
constpypi={info: {name: "modal"},releases: Object.fromEntries(...)}// > 40 KBpick(pypi,".")// the entire pypi object, not undefinedpick(pypi,"..")// the entire pypi object, not undefinedpick(pypi,"[")// the entire pypi object, not undefinedconstshaped=shapeJson(JSON.stringify(pypi),["."])!shaped.note// "selected 1 path from 41,000 characters" — no "not found: ."
The existing pick reads dotted keys, indexes and the last element test covers dotted keys, [-1], a missing key, and an index on a non-array, but never a selector that matches no step at all.
Suggested fix
Return undefined when the selector names no step, so the existing not-found reporting handles it:
Activity