docs: record P6 implementation, contract, and automated acceptance PASS

This commit is contained in:
2026-08-13 12:44:19 +02:00
parent 124891bbfe
commit be0e68e77d
3 changed files with 82 additions and 12 deletions
+33 -1
View File
@@ -7,7 +7,7 @@
> ThothII per il repository (app + CLI `thothctl`), (3) come usare l'applicazione ThothII di base
> (sessioni, domande, gate). Il documento userà parole semplici ed esempi; i dettagli tecnici
> resteranno nei contratti esistenti. Esempio pratico completo: Policlinico San Donato.
Last updated: 2026-08-13 (P3+P4+P5 manual acceptance).
Last updated: 2026-08-13 (P3+P4+P5 manual acceptance; P6 automated PASS).
> Point a fresh session here ("read PROJECT_STATE.md") before substantial work.
### P3 effective configuration and `.tht-dwh` — implementation complete, automated PASS, manual PASS (2026-08-13)
@@ -101,6 +101,38 @@
- **Manual acceptance:** PASS (owner approval 2026-08-13) — walkthrough section P5 in
`docs/testing/p2-p6-manual-verification.md`.
### P6 commit-addressed Evidence materialization — implementation complete, automated PASS, manual PENDING (2026-08-13)
- **Scope:** P6 (PRD D6): filesystem Evidence `<id>/evidence` is materialized from the exact pinned
Git commit into the immutable revision content root `<registry>/snapshots/<commit>/<id>/evidence`
at activation, with a sibling bounded manifest `<id>/evidence.manifest.json` whose digest is chained
into `snapshot.json`.
- **Safety:** fixed Git plumbing (`ls-tree -r -z` + `cat-file blob`), no shell, no mobile checkout;
symlinks/gitlinks at any depth, traversal/absolute/duplicate/cross-namespace paths, and non-regular
modes are refused. Installation-local bounds (defaults): 4096 entries, 64 MiB total, 8 MiB per
file, 4096 path bytes, 1 MiB manifest; a size-sum preflight runs before writing and no partial root
is published. Re-activation reuses a valid root and fails closed on a tampered manifest.
- **Engine:** `evidencePolicy` no longer stops filesystem sources (`evidence_materialization_required`
retired); `preprocess evidence`/`preprocess run` operate on the materialized root. Evidence Qdrant
records remain revision-scoped; corpus ACTIVE is revision-qualified. HTTP/S3 Evidence is unchanged.
- **Retention:** materialized roots live inside the commit-addressed snapshot directory, so they are
retained while pinned and removed by the existing snapshot retention scan when unreferenced.
- **Key files:** `backend/src/workspaces/evidence-materialization.ts` (+test),
`backend/src/workspaces/git-repository.ts` (`evidenceTreeObjects`/`evidenceTreeId`/
`evidenceBlobBytes`/`gitObjectSize`), `backend/src/workspaces/registry.ts` (activation staging +
integrity chain), `backend/src/workspaces/preprocessing-service.ts` (stop removal),
`backend/src/workspaces/types.ts` + `config.ts` (limits), `docs/contracts/
workspace-preprocessing-cli.md`.
- **Gates:** backend **698/698** + tsc clean; Go build+test 9/9 (unchanged); harness focused suites
pass. Full-suite re-run and the clean-state process goal recorded at the acceptance gate.
- **Automated acceptance:** PASS 10/10 (run `p6-7a4c4d0ebb63399cfa9f674738b9e8fc`, report
`.artifacts/p6-integration/p6-7a4c4d0ebb63399cfa9f674738b9e8fc/` retained via `--keep`, bound to
clean source commit `124891bbfe8dc8270e8b58c4206150eb8bebeaa7`): preflight, clean_state, ownership,
activation_materialization, evidence_preprocess, revision_isolation, unsafe_tree_refused,
bound_refused, secret_scan, cleanup_confinement. Runner: `scripts/p6-acceptance.sh` /
`backend/scripts/p6-acceptance.mjs` (+unit test `scripts/test-p6-acceptance.sh`).
- **Manual acceptance:** PENDING — walkthrough section P6 in `docs/testing/p2-p6-manual-verification.md`.
### P2 host preprocessing CLI — implementation complete, automated PASS, manual PENDING (2026-08-11)
- **Scope:** P2 (PRD D2, based on the P1.1 registry contract): the installed native `thothctl`