|
|
@@ -102,6 +102,10 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
|
|
|
**The fix is not to repeat the cause but to log the CONSEQUENCE, which is also the part the other function cannot know.** "Could not read the registry" never says the thing an operator needs: that a function deployed since the last good refresh is NOT BEING WATCHED. And because the old plan keeps working, every event for every existing function still arrives, so nothing else looks wrong - the failure is invisible in exactly the way the `.catch(() => [])` into in-code defaults was. It now counts consecutive failures and says what they cost.
|
|
|
**So the generalisable rule, which is the one to apply next time rather than the grep: a tolerated failure needs the same thing a dated measurement needs - not a note saying it is fine, but a statement of WHAT MAKES IT FINE and WHAT WOULD END THAT.** Where the premise lives in another function, either enforce it or stop depending on it. And note this file's own candidate list for that audit had an expired entry of its own: it named "the registry's retry-then-health-check" as a path to check, and that code was DELETED when client 2.13.0 made the distinction honest. The list of things to audit rots exactly like the things on it.
|
|
|
|
|
|
+- **THE DEVSTACK CONTAINER IS HOW YOU MEASURE A BEHAVIOUR PROD'S SERVER CANNOT YET PRODUCE, AND 0.16.0 IS THE FIRST TIME THAT WAS USED FOR IT.** `packaging/devstack` installs the real `.deb`s plus any database version from the deb repo, so pointing it at `smartbotic-database 2.20.1` let the `invalid_pattern` mapping be measured END TO END while prod still ran 2.17.2 and therefore could not emit the reason at all. Measured through the shipped deb: `?filter=note:regex:(?<=a)b` answered **422 `invalid_pattern`** with `details.field` and a message naming RE2, carried **no `Retry-After`** (the verdict is permanent), and the CONTROL - a valid RE2 pattern on the same route - answered **200** with the right row. A unit test on the mapping could not have told a selective refusal from a blanket one.
|
|
|
+ **The same container also gave the `Retry-After` pairing a LIVE form, which is stronger than the unit pairing because both arms come out of one binary:** `no_runner` answered 503 with NO header (an operator must act) while `db_unavailable`, produced by killing the database, answered 503 with `Retry-After: 5`. Same status, same service, same release, and the header appears only where waiting is the remedy.
|
|
|
+ **Three of my own checks in that session could not discriminate, and all three LOOKED like measurements - which is the part worth keeping, because the container is slim and that is what makes it a trap.** `pkill` is NOT INSTALLED in the devstack image, so `docker exec ... pkill -f smartbotic-data` failed with 127; I had redirected stderr to `/dev/null`, so a command that never ran looked like one that worked, and the subsequent **200 read as a result** when the database had never died. `kill` is not installed either. The database was still at pid 14 throughout. And the check I reached for to confirm the port was down - `curl` against **9004** - returns `000` whether the server is alive or dead, because that port speaks gRPC and not HTTP, so it reported "confirmed down" about a process that was running. **The only check that discriminated was `[ -d /proc/<pid> ]`**, and the shell BUILTIN `sh -c 'kill -9 14'` was the only way to send the signal. Verify the CONDITION before interpreting the response, never redirect the error away from a command whose success you are about to assume, and do not probe a non-HTTP port with an HTTP client.
|
|
|
+
|
|
|
- **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.
|
|
|
|