소스 검색

docs: _created_at is reset by delete-then-reinsert, and a control rate above the test rate

Two from novitax closing the orphan question: replacing a vector row is
delete-then-reinsert, so _created_at and _version describe the last rewrite
rather than the row's history, and any write-epoch instrument misreads such a
collection; and their orphan test (19/37) died to its own control (24/35),
which is the cleanest refutation shape there is. Also noted that the instrument
I recommended was weaker than reading their control flow, which settled the
question structurally.
fszontagh 1 개월 전
부모
커밋
a2909c44aa
1개의 변경된 파일과 4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      CLAUDE.md

+ 4 - 0
CLAUDE.md

@@ -564,6 +564,10 @@ docker run -d --name svapi-dev -p 8080:8080 -e SMARTBOTIC_VECTORAPI_KEY=dev svap
   **The hazard was real and sat one step later.** A delete is a WRITE, and pre-2.20.2 a write at a disk-only id answered not-found - which is exactly what the toloajto row did on DELETE as well as PUT and PATCH. So the enumeration succeeded and the removal did not. Measured on 2.20.2 against a disposable disk-only row of ours (a `mailtest` run-log row, never a tenant's): `remove` answers ok, the read back is not found, the control remove of a never-existing id still reports not-found, and a sibling ghost is untouched. **2.20.2 therefore REMOVES that exposure rather than introducing one**, which is the opposite of the consumer's reading, and their refusal to paper over it with 409 tolerance is right: with the delete working, a 409 there now means something genuinely wrong.
   **AND THE INFERENCE THEY DREW FROM THE CENSUS IS WEAKER THAN IT LOOKS, IN THE DIRECTION THAT MATTERS: "ALL 1964 ARE STILL GHOSTS, SO NO RE-CRAWL HAS TOUCHED THEM" RULES OUT A SUCCESSFUL WRITE AND NOT A FAILED DELETE.** A delete that 404'd performed no write at all, so it left the row exactly as disk-only as it found it. "Still a ghost" is therefore equally consistent with "never re-crawled" and with "re-crawled, and every delete silently failed" - and the second leaves the OLD-text chunk in place beside a new row under the new id, i.e. orphaned stale chunks still retrievable by search, which is the failure they were protecting against arriving through the other door. The discriminating check is a per-source chunk count against what the current text should produce; a census of ghost STATUS cannot answer it.
 
+- **`_created_at` IS NOT THE ROW'S FIRST-WRITE TIME ON A VECTOR COLLECTION, BECAUSE REPLACING A VECTOR ROW IS DELETE-THEN-REINSERT, AND ANY INSTRUMENT BUILT ON "WRITE EPOCHS" MISREADS SUCH A COLLECTION.** novitax 2026-10-22, having built exactly that instrument. A whole-document replace destroys the stored embedding (recorded above), so the only safe way to rewrite a vector row is to delete it and insert it again - and the row then returns at **version 1 with a fresh `_created_at`**. So a collection that has been bulk-rewritten once shows two apparent creation epochs that are really one population, and "this row is older than that one" is a statement about the last rewrite rather than about the data. Same family as the restored-backup row that looks brand new, and worth pairing with the `_created_by` provenance note: the whole metadata triple - creator, creation time, version - is reset by any delete-and-reinsert, which is a pattern a caller reaches for precisely when it must not lose the row's identity.
+- **A CONTROL RATE HIGHER THAN THE TEST RATE IS THE CLEANEST POSSIBLE REFUTATION, AND THIS IS THE SPECIMEN TO REMEMBER IT BY.** Chasing the orphan hypothesis I had handed them, novitax measured 37 `sourceId`s holding chunks from two write epochs and found an older chunk substantially overlapping a newer-epoch chunk (8-word shingles) in **19 of 37** - which reads as 19 orphaned sources and is exactly the number anyone would report. The control: older chunks overlapping OTHER OLDER chunks of the same source, **24 of 35**. **The control rate is HIGHER**, so the overlap is simply how transcript chunks sit against each other and the test carries no signal whatsoever. Their words: they nearly reported the 19 first. The general form is that a rate means nothing without the base rate, and the base rate is almost never the one you assume - it is measured by running the identical test on a population where the effect cannot be present.
+  **And my own contribution to that was the WEAKER instrument: I recommended a per-source count check, and the answer was in their control flow.** A 404 is not in their retryable set so the client throws, `deleteWhere` has no try/catch so it rejects, and the delete is awaited IN FULL before any insert runs - so a failed delete aborts the source before a single POST, and the orphan state I had described is **unreachable in that code rather than merely unobserved**. A structural argument settles an existence question that no amount of counting can close; counting was the right tool only for the hypothesis I could not read the code for. Ask for the control flow first.
+
 ## 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.