feat: P3 effective configuration, memory root, and revision-scoped records

This commit is contained in:
2026-08-12 16:01:25 +02:00
parent beaba548c1
commit e23e526966
21 changed files with 1108 additions and 44 deletions
+20 -13
View File
@@ -56,25 +56,32 @@ Checks:
Decision: **PENDING** (independent manual gate; automation never records PASS).
## P3 — Effective config and `.tht-dwh`
## P3 — Effective configuration and `.tht-dwh`
**Status:** instructions to be finalized by P3 implementation; not yet runnable.
**Status:** P3 implementation complete; automated integration PASS; manual acceptance PENDING.
Manual goal: compare operator and session effective DWH identities, inspect `OWNER.json` and
`ACTIVE` without exposing secrets, prove safe reuse after a content-only revision, and prove
fail-closed behavior after a DWH-affecting change.
Manual goal: prove that the operator CLI and application sessions derive the same effective
configuration, that a content-only revision reuses the prepared DWH generation (fast, `unchanged`),
that a DWH-affecting change fails closed and regenerates, that the workspace memory migration is
safe, and that search records are revision-scoped. See `docs/contracts/tht-dwh.md`.
Checks to fill during P3:
Checks:
1. canonical fingerprint comparison;
2. stable logical config-source identity;
3. schema-v1 ownership compatibility/migration;
4. DWH cache reuse across equivalent revisions;
5. revision-scoped schema/Evidence state;
6. mismatch rejection and recovery.
1. run `thothctl ... workspace preprocess dwh` twice with only an Evidence/content change between
them: the second run reports `unchanged` and does not re-introspect;
2. change a DWH-affecting field (host/port/database/schema/user/collection) in the descriptor,
push, pull: the next run refuses the old generation and regenerates, with a clear
`effective_config_mismatch`-style outcome and no mixed artifacts;
3. inspect `.tht-dwh` generations: immutable directories, `OWNER.json` with the canonical
fingerprints, `ACTIVE` pointer; old generations still present;
4. memory: after the guarded migration the workspace uses
`<dataRoot>/sessions/<workspace-id>/memory/`; the JSONL registry and Qdrant projection are
rebuilt and consistent; a conflicting legacy registry fails closed;
5. search records: schema/Evidence points carry the pinned `workspace_revision`; memory/solved
records remain workspace-wide;
6. documentation: `docs/contracts/tht-dwh.md` matches the observed behavior.
Decision: **PENDING**.
## P4 — Qdrant bootstrap and guarded rebuild
**Status:** instructions to be finalized by P4 implementation; not yet runnable.