Sfoglia il codice sorgente

docs: the deb can state its own commit now, which is the best answer to 'is that fix in this release'

Recorded because the instrument only started working in 0.16.0 and it
replaces a weaker one. Every release deb before this reported
commit: unknown while the local build reported the sha, so the artefact
could not answer the question at all and the only options were its mtime,
which is not evidence, or mapping against a bump commit you had to know
already.

The complete form is two commands and needs no trust: read the commit the
artefact reports, then git merge-base --is-ancestor <fix> <that commit>.
Worked today - the 0.16.0-1 server deb reports 2061c25 and 01967f8, the
PATCH exists() fix, is an ancestor of it. So the fix is provably in that
artefact rather than in my recollection of the tree at build time, which
is what I would otherwise have been asking to be believed on.

It also says what the artefact is MISSING: HEAD was two commits further
on and the diff was documentation only, which is how you know a rebuild
buys nothing rather than guessing.
fszontagh 1 mese fa
parent
commit
f8ba1f6a11
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      CLAUDE.md

+ 3 - 1
CLAUDE.md

@@ -87,7 +87,9 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
 - 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)`, `0.13.0-1` and `0.15.0-1` declare `>= 2.17.2`, and `0.16.0-1` declares `>= 2.20.0`, which is the artefact disagreeing with the note. **Note the floors are HAND-WRITTEN, so they are evidence of what we INTENDED rather than of what the binary needs** - `create-debs.sh` never runs `dpkg-shlibdeps` (see the Depends gotcha). That is exactly why a pin move has to move them in the same commit: left behind, the artefact would agree with a stale note and both would be wrong together.
+  **THE BEST INSTRUMENT NOW IS THE DEB ITSELF, AND IT ONLY STARTED WORKING IN 0.16.0.** `/api/v1/version` reports a `commit` field, and every release deb before 0.16.0 answered `unknown` there while the local build answered the sha - because `build.sh` computed the commit and passed `--build-arg BUILD_GIT_COMMIT`, `Dockerfile.build` never declared the ARG so Docker dropped it, and `.dockerignore` excludes `.git` so CMake's probe failed inside the container. Accepted and ignored, in the build system rather than on a route, and nobody noticed because the two paths disagreed silently.
+  **So the complete answer to "is that fix in this release" is two commands and needs no trust at all:** read the commit the artefact reports (`strings -a` the binary, or `/api/v1/version` from a running copy), then `git merge-base --is-ancestor <fix> <that commit>`. Worked 2026-10-22: the `0.16.0-1` server deb reports `2061c25`, and `01967f8` - the PATCH `exists()` fix - is an ancestor of it, so the fix is provably in that artefact rather than in somebody's recollection of what was in the tree at build time. **Note the deb's commit also tells you what the artefact is MISSING:** HEAD was two commits further on, and the diff was documentation only, which is how you know a rebuild buys nothing.
+  **Two further instruments, both 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)`, `0.13.0-1` and `0.15.0-1` declare `>= 2.17.2`, and `0.16.0-1` declares `>= 2.20.0`, which is the artefact disagreeing with the note. **Note the floors are HAND-WRITTEN, so they are evidence of what we INTENDED rather than of what the binary needs** - `create-debs.sh` never runs `dpkg-shlibdeps` (see the Depends gotcha). That is exactly why a pin move has to move them in the same commit: left behind, the artefact would agree with a stale note and both would be wrong together.
   **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.