Explorar o código

docs: the docs surface is admin-host only, and a host-gated 404 is about the HOST refs SV-49

fszontagh hai 5 días
pai
achega
09267f79c4
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      CLAUDE.md

+ 5 - 0
CLAUDE.md

@@ -222,6 +222,11 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
   **NOTHING PINNED ANY OF IT, WHICH IS WHY THE WRONG SENTENCE WAS UNFALSIFIABLE FROM INSIDE THE REPO.** No test reached the id branch, so the suite was equally consistent with both stories. `chosenInsertId()` is now a pure seam with tests falsified BOTH ways - implementing the documented-but-false behaviour turns the "honours" test red while the "ignores" test stays green, and honouring `_id` as a fallback does the reverse - so neither can be the vacuous one. The coverage boundary is written into the test file rather than implied: they pin the IDENTITY decision, not that the id reaches the database.
   **A side finding worth not re-deriving: the existence oracle SV-43 weighed as the price of a change is LIVE and always was.** A function holding only the `insert` grant can learn whether a row exists at a chosen id by reading `duplicate_id` off a failed insert. Narrow - tenant code, in its own project, needing a guessable id - and it matters exactly where ids are meaningful, which on a collection keyed by e-mail address means an insert-only function can test whether a given person is registered. **A risk analysis of a proposed feature is worthless if nobody checks whether the feature already ships**, and it reads as rigorous either way; both parties deliberated in the future tense about a present capability.
 
+- **THE DOCS SURFACE LIVES ON THE ADMIN HOST ONLY (`sb-prod-01.smartbotics.ai`), AND PROBING A TENANT HOSTNAME FOR IT MAKES THE WHOLE SURFACE LOOK ABSENT.** Measured 2026-11-21: `/llms.txt` is 200 and 147470 bytes there, while `novitax.kb.smartbotics.ai/llms.txt` and `nt.kb.smartbotics.ai/llms.txt` both 404. That is CORRECT - a project hostname serves `/api/*`, `/fn/*` and `/healthz` for that project and 404s every global route, and `llms.txt` and `openapi.json` are global, living where `/api/v1/keys` does. I probed two tenant names plus the retired `/rag/` mount (`qdrant-1` and `global-api-01`, both still resolving to the old box at 142.93.100.6, which answers 502) and reported the docs unreachable anywhere.
+  **THE DISCRIMINATOR WAS IN MY OWN OUTPUT AND I READ PAST IT, which is the half worth keeping: `/api/v1/version` answers `not_served_on_this_host` on a TENANT host and 401 on the ADMIN host.** Those two refusals carry different information - "this route is not here" against "it is here and wants a credential" - so the server was telling me in words that the host serves a SUBSET, and the next question was "which host serves the rest", not "then nobody does". **Probing unauthenticated makes a served-but-gated route look absent whenever you read only the status class**, and the general form is that a 404 from a host-gated service is a statement about the HOST, never about the service.
+  **What kept the wrong conclusion recoverable was stating the boundary.** The report said I could not rule out an admin hostname I did not know, and the answer lay exactly in the gap that sentence named - the consumer read it and supplied the host within minutes. A named boundary is the part of a wrong conclusion that survives contact with someone who knows more, so it is worth writing even when it feels like hedging. Note also what I did NOT do and should have: the cheapest instrument was asking the consumer who fetches that file daily, and I went to `ssh` and hit permission denied on `config.json` and the cert directory instead.
+  **And the tenant-side 404 is a real discoverability cost rather than only my mistake (SV-49):** a tenant who does not know the split concludes the service has no documentation. The consumer knew only because the split is written into their own repo's instructions. Behaviour should not change - a tenant hostname exposing nothing global is the entire point - but naming the docs host in the 404 body for the known global doc paths is one line, and the `not_served_on_this_host` precedent is the argument for it, since the server already knows the distinction it is declining to state.
+
 ## Mail surface (`ctx.mail`, IMAP + SMTP)
 
 - **Scope is IMAP read + SMTP send, deliberately.** No FTP, FTPS, POP3 or WebDAV/CalDAV. SFTP was dropped by the owner, which is what keeps vendoring to ONE upstream - SFTP needs libssh2, which is far less watched than curl while having had remotely reachable issues. **WebDAV is out because it is HTTP**, and curl's HTTP is compiled OUT: `ctx.fetch` is cpp-httplib with its own guard, its own pinning and its own outbound defaults, and two HTTP clients with two sets of defaults is exactly how the two drift. Re-enabling it also brings redirects back, which then need `CURLOPT_REDIR_PROTOCOLS_STR` set separately and `FOLLOWLOCATION` off.