Forráskód Böngészése

docs: quote a latency with the corpus that produced it

I told a consumer a vector search took 4.959 s without saying it was
novitax:kb_facts at 13,093 rows. They reasoned correctly from there and wrote
a five-second dead-air risk on live phone lines into their project guide.
Their collections are 121 and 66 rows, so their real cold cost is 0.025 s - a
factor of 200 out, in the alarming direction, with nothing wrong in the chain
except the number it started from.

The same correct mechanism spans 0.018 s to 1.949 s on one box, so the
mechanism being right says nothing about the magnitude. Their question is the
better statement of it: measured on what?

Their half was quoting an upstream latency without asking. Mine was
publishing one without its corpus, which is the half the person with the data
can fix. Also records tying such figures to row count rather than a date,
since 0.025 s expires only if the corpus grows a hundredfold and nothing
announces that.
fszontagh 3 hete
szülő
commit
d52439c8b4
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      CLAUDE.md

+ 5 - 0
CLAUDE.md

@@ -690,6 +690,11 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
   **THE CONTROL, not the warning: the install must carry a conffile policy, because the prompt is not a consequence of editing the template - it is a consequence of the file being a conffile that every box customises.** Reverting my template change does not fix it; the next template change of any kind would do the same thing. So a prod install of these packages runs `-o Dpkg::Options::=--force-confold` with `DEBIAN_FRONTEND=noninteractive`, and `--force-confdef` alongside it so a conffile the operator has NOT customised still takes the new default. Without that, any future template edit is an aborted transaction on every customised box.
   **And the template change itself was reverted, because it bought nothing it could not get elsewhere.** `database.timeout_ms` is documented in `src/config.hpp` and in `api/llms.txt`, and it defaults to the value that was previously hardcoded, so shipping it in a conffile only bought one prompt per box. **An OPTIONAL key with a correct default does not belong in a conffile**; a conffile should hold what a deployment must set, not a catalogue of what it may.
 
+- **QUOTE A LATENCY WITH THE CORPUS THAT PRODUCED IT, OR THE RIGHT MECHANISM WILL CARRY THE WRONG MAGNITUDE INTO SOMEBODY ELSE'S STANDING NOTES.** 2026-11-03. I told a consumer "the first vector search after the restart took 4.959 s" and did not say it was `novitax:kb_facts` at 13,093 rows and 205 MB of vectors. They reasoned correctly from there - page faults, linear in vector bytes, our 5 s `DbGateway` deadline, `embedTimeoutMs` bounding only the embedding phase and not the search - and wrote a **five-second dead-air risk on their live phone lines** into their project guide. Their actual collections are 121 and 66 rows, so their cold cost is **0.025 s**: a factor of 200 out, in the alarming direction, from a chain of reasoning in which nothing was wrong except the number it started from.
+  **The tell is that the same correct mechanism spans two orders of magnitude on the same box** - 0.018 s on 66 rows, 1.949 s on 13,014 - so "page faults, linear in vector bytes" is a complete explanation and tells you nothing at all about the size. They named the missing question better than I did: **"measured on what?"**, which is the latency sibling of the rule already written here that a green check is evidence only about what it exercised.
+  Two halves worth keeping separately, because only one of them was theirs. Theirs: quoting an upstream latency without asking which collection produced it. **MINE: publishing a measurement without its corpus**, which is the half that can be fixed by the person with the data, and is cheaper than any correction afterwards. State rows and vector bytes beside any cold-path figure.
+  **And tie such a figure to a QUANTITY rather than a date.** 0.025 s is a fact about 121 rows, not a property of their deployment; it expires if the corpus grows roughly a hundredfold, and nothing announces that. Same discipline as the snapshot-headroom measurement that silently went stale through ordinary growth.
+
 ## Deploy / publish
 
 **`VERSION` and `api/openapi.json`'s `info.version` must agree, and `packaging/build.sh` now refuses to build unless they do** (`scripts/check-version-sync.sh`, run at the top level so it covers the local, Docker and publish paths alike). They drifted once: 0.10.0 was published with the docs claiming 0.9.2, and since `openapi.json` ships in the server package and is served at `/openapi.json`, the stale value was live. **Correcting it cost a whole release**, because a published version number is never reused for different content - which is why 0.10.0 exists but must never be deployed. A release step that relies on remembering is a release step that gets skipped, so it is a check rather than a checklist line.