Selaa lähdekoodia

docs: two new shapes - a premise held in a consumer's roadmap, and over-extending their correction

The /fn exposure is tolerable today only because the tenant's request-taking
function is test-phase: its own first line says "stores only, sends nothing",
it writes one row to a single hardcoded collection and returns, and no human
actions those rows because the production path does not exist. All true, all
verifiable, and none of it a fact about our service.

So this is the expired-premise failure with NO available trigger: there is no
quantity of ours to watch, because the premise lives in their roadmap and
expires when they point a tool at it. They volunteered that their voice launch
is likelier near than far, while our gate sits behind a window with no date.
The remedy is therefore not a re-measurement trigger but a precondition they
hold - do not point a tool at it until the gate exists - which also survives
the function being re-enabled later by someone who does not know why it was
off.

Second shape, and it is new here: accepting a consumer's correction can carry
you past what the correction supports, and it feels like diligence because you
just deferred to them. They re-ranked the risk correctly and I had it the wrong
way round. I then escalated to "staff ringing a stranger", which needs the
human-actioning end to exist. Their statement was about what the function is
FOR; I read it as what it currently DOES. The tell is tense.

Cost: I told my own owner the decision could not wait a weekend. The decision
is time-sensitive for the roadmap reason; the present harm was a storage
nuisance. Overstating urgency spends the credibility needed next time
something genuinely cannot wait.
fszontagh 1 kuukausi sitten
vanhempi
sitoutus
712e929232
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      CLAUDE.md

+ 5 - 0
CLAUDE.md

@@ -456,6 +456,11 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
 
 - **`Client::get` returns nullopt for BOTH "absent" and "transport failed"** - it throws only for PERMISSION_DENIED - so a registry lookup cannot tell them apart from the return value. Unhandled, that reaches a caller as 404 "no such collection" for a collection that exists, and a 404 is unretryable BY DESIGN for a careful client, because adding it to a retry set would retry every genuine absence. A consumer lost a 6-minute ingest of an 8 GB mailbox to exactly this. `CollectionRegistry::get` therefore **retries once** (a transient failure usually succeeds, and logs a warning saying so) and then asks `healthCheck()` before reporting absence, throwing **503** when the database is unreachable. Reported upstream too: the client should distinguish, the way it already does for a permission denial.
 - **A REPRODUCIBLE vector-search baseline needs an explicit `query_vector`. Pinning `query_text` is NOT enough.** `query_text` is embedded server-side through the external provider on *every* call - there is no query-embedding cache (`emb.embed(cfg.model, text)` in `handlers/vectors.cpp`), so the same text can yield a different vector on a different day and every score and row count moves with it. Measured by a consumer across one deploy over a byte-identical collection (12447 rows unchanged): an unfiltered top score went 0.7221 to 0.7175 and a filtered count 424 to 426, while five consecutive calls agreed to six decimals - so it is drift in text→vector, not per-call noise. The isolating test: a fixed explicit `query_vector` returned bit-identical results three times, which proves the RANKING is deterministic given a vector. **So nothing in a release has to change for such a baseline to move, and it is therefore not evidence about the release either way.** Corollary worth stating because it bit us: `scan_capped` is query-dependent too and so is also a measurement, not a property of the collection - it is set only when the walk hit the cap *while still short of `top_k`*, so a query that fills `top_k` reports false where a query that falls short reports true. Read all three of the useful assertions (`scan_capped`/`scanned`/the nested error envelope) as "this query, this filter", never as facts about the data.
+- **A PREMISE THAT MAKES AN EXPOSURE SAFE CAN LIVE ENTIRELY IN A CONSUMER'S ROADMAP, WHERE NOTHING IN OUR SYSTEM CAN OBSERVE IT EXPIRING. THAT IS THE EXPIRED-PREMISE FAILURE WITH NO AVAILABLE TRIGGER AT ALL.** 2026-10-22, on the unauthenticated `/fn` gap (SV-19). The reason a tenant's request-taking function was tolerable unauthenticated is that it is **test-phase**: its own first line reads "stores only, sends nothing", its body writes one row to a single hardcoded collection and returns, and **no human actions those rows because the production path does not exist yet**. All true, all verifiable, and **none of it is a fact about our service.** It stops being true the moment they point a tool at it, which is a decision on their side that nothing on ours would see - and they volunteered that their voice launch is "likelier to be near than far" while our own gate sits behind a database window with no date.
+  **So the remedy is not a measurement with a re-check trigger, which is what this file normally prescribes - there is no quantity of ours to watch.** The remedy is to convert the race into a **precondition the consumer holds**: do not point a tool at it until the gate exists. That survives the function being re-enabled later by someone who does not know why it was disabled, which a state change does not. **When the thing keeping you safe is someone else's plan, ask them to make it a prerequisite rather than trying to monitor it.**
+- **ACCEPTING A CONSUMER'S CORRECTION CAN CARRY YOU PAST WHAT THE CORRECTION SUPPORTS, AND IT FEELS LIKE DILIGENCE BECAUSE YOU JUST DEFERRED TO THEM.** Same day, same thread, and it is a new shape for this file: not an uncited claim, but a cited one over-extended. The consumer re-ranked the `/fn` risk for me, correctly - a function writing an arbitrary phone number into a collection a human actions is categorically worse than a free search burning budget, and I had those the wrong way round. I took the ranking and then **escalated it to "staff ringing a stranger", which requires the human-actioning end to exist, and it did not.** Their statement was about what the function is FOR; I read it as what the function currently DOES.
+  **The tell is tense.** "Writes a callback request a human actions" describes a design; "today an anonymous caller can append a row to a test collection" describes the system. I had the right destination and the wrong tense, and because the correction came from the consumer I did not re-examine it the way I would have re-examined my own hypothesis. **A correction is evidence for exactly what it says, and deferring to its author is not a reason to extend it** - which is this file's "thanks are a signal to re-read, not to proceed" with the roles reversed.
+  Worth pairing with what it cost: I told my own owner the decision could not wait a weekend. The decision IS time-sensitive, for the roadmap reason above, and the present harm was roughly a storage nuisance. **Overstating urgency spends the credibility you need the next time something genuinely cannot wait.**
 - **A CONSUMER'S TIMEOUT CAN SIT EXACTLY ON THE BOUNDARY OF OUR COLD EMBED PATH, AND THEN THE FIRST CALL OF A QUIET PERIOD IS A COIN FLIP THAT LOOKS LIKE AN INTERMITTENT FAULT IN OUR SERVICE.** Measured by novitax 2026-10-22 on their live voice agent: their first embed attempt has a **6000 ms** budget and our cold path costs **about six seconds**, so two samples they had already collected sat at **6.037 s (succeeded) and 6.547 s (failed, 0 candidates)** - the same query, minutes apart, decided by a few hundred milliseconds. Their own words are the lesson: both observations looked identical, and the thing to be suspicious of was that identity rather than to explain it.
   **It corroborates the long tail recorded above from the other side.** A cold `query_text` is 0.5-1.0 s at the median and the tail reaches at least 8.17 s, so a 6 s client timeout is not generously set - it is set INSIDE our distribution, and nothing on either side of the call says so. **This is the split-latency-budget trap again** (their timeout is their number, our tail is ours, and neither side can see the other), with the sharper form that **two different faults produced one symptom**: the hourly snapshot stall and this boundary, plus a third explanation they had written up that morning. When a consumer reports an intermittent degradation, the question is not which cause it is but **how many causes it has**.
   The fix is the one already recommended here on independent grounds - embed ONCE and pass an explicit `query_vector` to every collection - which halves the draws from the tail, moves the cold call off the boundary, and is separately the only reproducible baseline.