71 lines
2.9 KiB
Markdown
71 lines
2.9 KiB
Markdown
# KB Source Recompile Coverage
|
|
|
|
Generated UTC: `2026-07-13T08:51:50.309130+00:00`
|
|
|
|
Status: **partial**
|
|
|
|
This audit ran inside a repeatable-read, read-only transaction against a fresh
|
|
restored canonical database. It emitted aggregate counts only: no claim bodies,
|
|
source excerpts, credentials, or database writes. The disposable container was
|
|
removed and a later Docker inspection confirmed it was absent.
|
|
|
|
## What Can Be Rebuilt From Retained Import State
|
|
|
|
| Surface | Covered | Canonical | Coverage |
|
|
|---|---:|---:|---:|
|
|
| Claims with canonical mappings | 1,807 | 1,837 | 98.37% |
|
|
| Sources with canonical mappings | 4,145 | 4,145 | 100.00% |
|
|
| Eligible mapped claim field projection | 1,807 | 1,807 | 100.00% |
|
|
| Eligible staged source field projection | 3,861 | 3,861 | 100.00% |
|
|
| Evidence links from staged claim-source rows | 4,254 | 4,670 | 91.09% |
|
|
| Edge rows accounted for by resolved staged relations | 4,878 | 4,916 | 99.23% |
|
|
| Applied proposals with replayable apply payload | 1 | 2 | 50.00% |
|
|
|
|
The claim projection compares type, title-to-text, status, confidence, tags,
|
|
creator, and applicable legacy creation time. The source projection compares
|
|
type, URL, storage path, excerpt, hash, capture time, and creator. Relation
|
|
coverage does not by itself reconstruct row IDs, timestamps, creators, or
|
|
historical duplicate multiplicity.
|
|
|
|
## Retained Import State
|
|
|
|
- Import runs: `2`
|
|
- Inventory items: `11,624` (`5,812` per run)
|
|
- Staged claims: `2,277`
|
|
- Staged sources: `4,715`
|
|
- Staged claim-source rows: `5,195`
|
|
- Staged claim-edge rows: `6,593`
|
|
- Canonical mappings: `5,952`
|
|
|
|
Both imports point to the same retained 5,812-file Forgejo-era workspace
|
|
inventory. The second run reflects the corrected classifier mapping.
|
|
|
|
## Exact Remaining Gaps
|
|
|
|
- `30` canonical claims have no canonical mapping.
|
|
- `284` source mappings do not resolve to a staged source in their recorded
|
|
first import run.
|
|
- `66` distinct staged claim keys and `85` staged source keys have no canonical
|
|
mapping.
|
|
- `155` staged claim-source rows cannot resolve both mapped endpoints.
|
|
- `416` canonical evidence links have no exact staged relation projection.
|
|
- `700` staged edges are not resolved; another `152` resolved staged edges
|
|
cannot resolve both mapped endpoints.
|
|
- `38` canonical edge rows have no matching resolved staged relation.
|
|
- `1` applied proposal has no non-empty replayable `apply_payload`.
|
|
|
|
## Command
|
|
|
|
```bash
|
|
.venv/bin/python ops/audit_kb_rebuild_coverage.py \
|
|
--container <restored-local-postgres-container> \
|
|
--database teleo
|
|
```
|
|
|
|
## Interpretation
|
|
|
|
Fast exact snapshot recovery is complete and separately proven. Source-derived
|
|
recompilation is close for the original mapped claim/source graph, but it is not
|
|
yet a complete blank-database rebuild. The practical next step is to preserve
|
|
the current snapshot as genesis, backfill the listed gaps, and require every
|
|
future accepted change to carry a replayable apply payload and row receipt.
|