Files
ThothII/docs/contracts/tht-dwh.md
Codex cffa60772e
Publish documentation / publish (push) Successful in 2m12s
feat: complete catalog-driven preprocessing
2026-09-06 17:49:35 +02:00

36 lines
1.6 KiB
Markdown

# Internal Catalog-bound DWH artifacts
`.tht-dwh`, `OWNER.json`, and the `ACTIVE` generation pointer are private preprocessing artifacts,
not an operator-facing generation or rollback contract. Complete preprocessing materializes the
physical schema from the immutable PostgreSQL Catalog Metadata Snapshot and samples only eligible
DWH values to build LSH. It never obtains schema metadata from workspace YAML or by introspecting the
DWH in the harness.
`OWNER.json` binds the artifact root to all of:
- workspace ID;
- Catalog database ID;
- Metadata Content Revision;
- effective configuration fingerprint;
- input fingerprint.
The complete binding must match before artifacts can be reused. This prevents an LSH built from one
database, workspace, Catalog revision, or effective configuration from being associated with
another. PostgreSQL separately owns readiness through `running | succeeded | failed`, the processed
revision, and the preprocessing input fingerprint.
The internal generation is overwritten by normal preprocessing and is not retained for rollback.
Recovery is always:
```sh
tht --installation <absolute>/thothii-installation.yaml \
workspace preprocess run --workspace <workspace-id>
```
The clear operation removes `.tht-dwh` together with the LSH, private Catalog snapshot, Evidence
corpus, and derived checkpoints. The next run recreates them from PostgreSQL and the pinned workspace
revision.
Workspace-global `memory` and Qdrant `solved_question` data are not preprocessing output and remain
preserved both when reference data is overwritten and when preprocessing is cleared.