Просмотр исходного кода

docs: committed, released and deployed are three different things

Three entries were wrong in that gap: the vector/_vector guard's shipping
vehicle, 2.17.2's release status, and the client pin. Records the two cheap
instruments - merge-base the fix against the deployed version's bump, and
read the deb's Depends rather than a prose claim.

The part worth keeping: two of the three were wrong HERE first and
propagated to a consumer's file, so neither copy could catch them by being
read against itself - the error and its corroboration shared a source.

Also records a consumer's stronger exactness control for distinct_values
(13092 against a 13092 document count on a unique business key, i.e.
agreement at 13k rather than below the 1000 cap), that the route needs an
index to exist at all, and that a correction can invite the error it
fixes - index-values refusing offset reads as 'we refuse params now',
which the export still ignoring ?filter= disproves.
fszontagh 1 месяц назад
Родитель
Сommit
f6decdd382
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      CLAUDE.md

+ 6 - 0
CLAUDE.md

@@ -86,6 +86,12 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
 - **clangd, clang-format and clang-tidy are configured** (`.clangd`, `.clang-format`) and read `build-host/compile_commands.json`, so they cover `src/`, `tests/` and `runner/` including `runner/src/main.cpp`. The tidy set is narrow on purpose (`bugprone`/`cert`/`clang-analyzer`/`misc`/`performance`): the broad `modernize`/`readability` families bury real findings under thousands of style notes. `.clang-format` **describes the style the code already uses** rather than imposing one, so it is close to a no-op; `LambdaBodyIndentation: OuterScope` is the setting that matters, since every route handler is a lambda whose body is indented from the statement. Even so the codebase is hand-laid-out and not formatter-clean, so format **new or changed code only** (`git clang-format`), never whole files.
 - TS: no `any`, no TS `enum`, no constructor parameter-property shorthand (tsconfig `erasableSyntaxOnly`). Iterating parsed JSON: bind to a named var first (range-for over `nlohmann::json::parse(...)[...]` dangles).
 - Commits: conventional prefixes (`feat`/`fix`/`build`/`docs`/`test`). Branch for feature work; `main` is pushed to `ssh://git.smartbotics.ai:10022/fszontagh/smartbotic-vectorapi.git`.
+- **"COMMITTED", "RELEASED" AND "DEPLOYED" ARE THREE DIFFERENT THINGS, AND THIS FILE SAID "FIXED IN X" FOR ALL THREE. THREE SEPARATE ENTRIES WERE WRONG IN EXACTLY THAT GAP.** Found 2026-10-22 when a consumer audited their own recorded gotchas against prod and asked ten questions. The three: the `vector`/`_vector` guard was recorded as waiting on the curl 8.23.0 release when it had actually shipped in 0.13.0 and was live; "2.17.2 is NOT released and is not in apt" survived ten days past 2.17.2 becoming prod's server; and `DB_CLIENT_VERSION` was described as 2.14.0 in several places when it moved to 2.17.2 **in the 0.13.0 bump commit itself**.
+  **Two instruments settle it, and both are cheaper than the prose they replace.** Map the fix's commit against the DEPLOYED version's bump commit - `git merge-base --is-ancestor <fix> <bump>` answers "is this live" without trusting any release plan. And read the package's own `Depends` rather than a sentence about a pin: `0.12.0-1` declares `libsmartbotic-db-client (>= 2.14.0)` while `0.13.0-1` and `0.15.0-1` declare `>= 2.17.2`, which is the artefact disagreeing with the note.
+  **THE PART NEITHER SIDE CAN FIX ALONE, AND IT IS THE REASON TO WELCOME THIS KIND OF AUDIT: TWO OF THE THREE WERE WRONG HERE FIRST, AND THAT IS HOW THEY REACHED THE CONSUMER'S FILE.** Their copy was downstream of ours, so reading either file against itself could never have caught them - the error and its corroboration had the same source, which is the trap this file already records as "if the upstream source of an error is also the source of its correction, the correction needs its own evidence". **A stale entry is not free: it teaches a workaround for something that no longer exists**, and it propagates to places that never read the code. The consumer's own discipline is worth copying - five entries changed and none deleted, because **a retired warning keeps its text: the failure SHAPE usually outlives the bug**, which is this file's keep-and-label rule arrived at independently.
+  **And a correction can invite the very error it fixes, so write the warning beside it.** They had measured index-values refusing `offset` and returning `truncated`, whose obvious reading is "vectorapi refuses unhonoured params now". That generalisation is FALSE on 0.13.0: it is one bespoke check on one route, and the export still ignoring `?filter=` is the disproof sitting right beside it. Correcting the first entry without that caveat would have replaced one wrong note with another.
+  **A STRONGER CONTROL FOR `distinct_values`, FROM THE SAME CONSUMER, AND IT BEATS THE ONE I USED.** `GET .../collections/{c}/indexes` reports `distinct_values` per indexed field from the index's own metadata with NO 1000 cap (the values route caps and sets `truncated`). I verified exactness with `departmentKey` at 10 against exactly 10 enumerated - agreement BELOW the cap, which is the weak form. Theirs: `kb_fact_answers.intent` reports **13092 against a document count of 13092**, where `intent` is a unique business key, so one-per-row is what it MUST report and the agreement is at 13k rather than under the cap. Neither proves exactness for an arbitrary field, and that limit is worth stating when quoting the number. **Note the route needs an index to exist** - a collection with none answers `{"composite_unique":[],"indexes":[]}`, which is why a caller can reasonably conclude no route can total a high-cardinality field.
+  **That exact count then found a real data defect one layer out, which is the argument for exposing counts at all:** comparing their two fact collections gave 13093 against 13092, and the one-row gap is a fact with a question vector and no answer vector - live and retrievable by its question, invisible to any search over answers. Invisible until there was an exact count to compare.
 - **MAINTAINING THIS FILE: REWRITE when a claim was WRONG; KEEP AND LABEL when a claim was RIGHT and the world moved.** The two look similar and the failure modes are opposite. An appended correction under a wrong claim leaves both sentences reading as true and invites the reader to pick - the stale-comment failure with a timestamp attached, and this file is read under pressure by someone who will take the first assertion that fits. So a measured refutation REPLACES the claim, says it was wrong, and says what the measurement was: the note that history bytes dominate the at-rest migration was mine, it was false, and it reads as false now rather than as a dated opinion beside a newer one. Conversely the superseded filtered-scan cap stays, LABELLED superseded, because the claim was accurate and only the mechanism retired - and the failure shape it describes is still worth recognising. The rule came from a consumer drawing the distinction after watching me do both in one afternoon without naming it.
 - **ESTABLISH WHO OWNS A LAYER BEFORE REPORTING A FINDING TO IT.** `encryption-verify`, the CLI, the migration, encryption at rest and storage are the DATABASE's; this repo owns the HTTP surface, the function runtime, the export and its digest. A consumer sent us a sound suggestion about the verify tool's verdict wording and told us it was our call - it was not, and had we received it politely they would have waited on a change we cannot make. **A finding filed one layer too high is sympathetically received by someone who cannot act on it**, which is worse than a rejection because it looks like progress. Route it, and say plainly that you are routing it.