瀏覽代碼

docs: a filter value is parsed as JSON, so double-quote strings

NOT IN THE PUBLISHED 0.12.0; ships with Wednesday's release.

A consumer measured four filter behaviours on prod and asked which were
intended. Three are, one is a documentation defect, and the documentation
defect is ours: quoting a filter value was mentioned NOWHERE in llms.txt -
zero occurrences - in the file consumers copy from. The same shape as the
wrong sentence about `search` that propagated into two consumers' notes.

The mechanism is one rule, and it is cleaner than the "shape inference" the
consumer inferred: parseFilter runs nlohmann::json::parse on the value and
falls back to a literal string when that throws. Everything follows:
approved:eq:True is the string "True" and matches no boolean; year:eq:"2026"
is a string and matches no integer; productVersion:eq:2026.1 is the NUMBER
2026.1 and matches no string, while 2026.1.3 is a string only because three
dots is not valid JSON; and 'single quotes' become part of the value because
JSON has no single-quoted strings.

So the trap they identified is real and now written down: a version-like
value is a number or a string depending on how many dots it has, so a client
tested against 2026.1.3 ships and silently returns nothing when the value
becomes 2027.1. The remedy is documentation rather than behaviour - changing
the inference would break every caller relying on bare year:eq:2026.

Also recorded, from their measurement: a null or absent field MATCHES lte and
lt, because null orders below any value, so a one-sided lower bound
over-matches. That is the database's ordering rather than ours, but the
consequence lands on the caller, and over-matching in a gate is the same
failure direction as a dropped filter. The remedy is a pair of bounds or
field:exists:true. Whether that ordering is intended is referred upstream
rather than asserted here.
fszontagh 1 月之前
父節點
當前提交
c6497a9676
共有 1 個文件被更改,包括 8 次插入 和 0 次删除
  1. 8 0
      api/llms.txt

File diff suppressed because it is too large
+ 8 - 0
api/llms.txt


Some files were not shown because too many files changed in this diff