Files
ThothII/docs/testing/evidence/evidence-restructuring-psd-acceptance-2026-08-25.md
T

7.3 KiB

PSD Evidence restructuring — real acceptance

Date and completion time: 2026-08-25T21:44:26Z (UTC)
Reviewer: Marco Pancotti
Human Git review: PASS
Scope: issues #47 and parent #35

The reviewer approved all 35 proposed Evidence and authorized resolution of all 60 review items. The accepted rules were: retain domain when fully qualified identifiers are absent; invent no schema, table, column, or value; mark incomplete lists as non-exhaustive; preserve caveats and ambiguities; consolidate examples into one unit per source; treat N=5 as a recommendation rather than a mandatory limit; and interpret "SEF seguito da ablazione" as a later event in time.

Source and recovery record

  • ThothII implementation candidate 66f9fa2821decf30bec4468a33a499d8ea459510 and Linux deployment repairs d49c644b611a7cc50f19fd40f30464ec0a12d2db and e51a6a22535de934c9245068994a3eaf3e855f96 and 12d257056fe8293d1f0e4e3e613feba41c5f76a7 and 287ce91e67ce736804656819401f9ba474406e63 and 73efeb7f3d3f3de487f2686a2074c0953c9d51e4 and 2b6bb058d8151a76919bf1bde94d304af646f8b4 and a3259ced99f981b4a18924b1149d27471f1a5e45 and 0df95e337ec4a492891ae3f523c3a28aa88e67cb (PR #48).
  • PSD authoring review: PR #2, head c93174841da253512ab81b32cf8c68304bc02e31, merged as 07ae6930a21299082685d2b3668912ac2d188079.
  • Canonical-root correction: PR #3, head 93c4b9a3189eb3113bb5d2d0b313332c064e1a1b, merged as a4b27c6fe1cf41aac8102933a4100da8fee345e6.
  • Atomic-unit retention: PR #4, head 384f76a11d1e705b41d9df785337f81bc7515e2d, merged as the published PSD revision 1c304efa02547a4c10826f557376a38e959b8bbf.
  • Pre-migration Qdrant snapshot: psd-clinical-6759909623621226-2026-08-25-18-43-21.snapshot, 28,121,600 bytes, SHA-256 da7fdf114fdd1a638eb6f828ac127126258451dc617e8d409b5895bfd15397a6. It is retained for collection-level rollback; no collection was deleted or renamed.

Command output and durable runtime records are in:

  • this report and docs/testing/evidence-restructuring-manual.md;
  • /data/sessions/psd-clinical/preprocessing/jobs/44bedc056f256d983ce88b9a565d9fd6.json (dry run) and /data/sessions/psd-clinical/preprocessing/jobs/c564d7fdb36436b3ae76dc0c2ce1e20d.json (publication);
  • /data/sessions/psd-clinical/corpus/ACTIVE and /data/sessions/psd-clinical/corpus/gen-f968808223bf462fa406c9a6df8f6a55/manifest.json;
  • /data/sessions/psd-clinical/sessions/20301df7-cb3c-421a-b14f-dec8cf8d9620/ for the real walkthrough artifacts.

No secret, patient identifier, payload, or vector is copied into this report.

Manual acceptance results

  1. Authoring and Git review — PASS. Exactly 35 source documents were migrated and validated into 35 curated units (34 domain, 1 glossary), with one unit per source, zero remaining review items, zero validation findings, stable evidence:<slug> IDs, and no automatic orphan deletion. psd-clinical/evidence/README.md remains present. PR #2 records the human-reviewed content; PRs #3 and #4 are path/policy corrections without semantic invention.

  2. Additive BM25 upgrade — PASS. The existing psd-clinical collection and unnamed 1,024-dimensional cosine dense vector were preserved. The only vector-schema addition is sparse vector bm25 with modifier idf. There was no rebuild, dense-vector rename, fallback engine, or collection replacement.

  3. Schema and Memory non-regression — PASS. Immediately before and after Evidence publication the protected counts remained 163 schema_table, 2,275 schema_column, 2 memory, and 1 solved_question; the saved representative IDs and repeated dense Schema/Memory neighbors were unchanged. The later real walkthrough intentionally promoted two approved memories and one solved question, so the final live counts are 4 and 2 while all baseline IDs remain present. The 35-unit migration itself did not modify those families.

  4. Inactive candidate, evaluation, activation — PASS. Dry run 44bedc056f256d983ce88b9a565d9fd6 completed without activation. Publication run c564d7fdb36436b3ae76dc0c2ce1e20d built child f968808223bf462fa406c9a6df8f6a55 as an inactive candidate, evaluated that exact generation, then activated gen:f968808223bf462fa406c9a6df8f6a55. It contains 35 documents and 35 chunks; the run reported 35 changed and 36 legacy removals from the active set. All 20 evaluation queries passed Hit@10. Representative diagnostic ranks were:

    Profile Query Dense BM25 Fused
    lexical lexical-chirone-meta 1 1 1
    semantic semantic-controllo-device 1 1 1
    mixed mixed-deduplica-codici 7 5 2

    The previous generation gen:f91ccc1ae1dc4ccab05e7d70a7675a97 is retained. The live collection has 78 Evidence points (43 retained older points plus the 35 active-generation points); generation filtering, rather than destructive deletion, determines publication.

  5. Hybrid and Formula retrieval — PASS. The contract suite proves dense and BM25 receive the identical NFC-normalized, newline-preserving, outer-trim-only query. The isolated acceptance fixture accepts a PostgreSQL expression, rejects a full query, and retrieves an approved formula through its typed Evidence path. No PSD formula was invented for this migration. The real session persisted concept_formulas: [] and evidence.json: [], so its proposals remain unpublished.

  6. Empty versus unavailable — PASS. The acceptance probe recorded an available empty retrieval that may continue and a controlled unavailable-Qdrant retrieval that blocks the stage. The unavailable path used neither stale generation nor purpose fallback.

  7. Complete real session — PASS. Session 20301df7-cb3c-421a-b14f-dec8cf8d9620, named Accettazione Evidence #47 — SEF seguito da ablazione, ran with zai/glm-5.3 through clarification, rewriting, schema linking, three executed CTEs, final SQL, and finalization. It used the approved interpretation of two distinct events in 2024 and the temporal predicate ablazione > SEF; all three CTE executions returned ok. The approved read-only SQL has SHA-256 b26d26c9c1e8579d7e3d5ccabe874e02b570bc15cfbe1b2ce822c28ae8b0e2ac, parsed without warnings, and returned 78 patients. Five independently persisted Evidence receipts cover clarification/disambiguation, rewriting, schema linking, CTE/SQL generation, and final SQL, all bound to gen:f968808223bf462fa406c9a6df8f6a55. Memory and synthesis did not invoke Evidence search. The authenticated UI showed the finalized session to Local Admin. The abandoned provider preflight session was archived without deletion.

Automated verification

  • bash scripts/evidence-restructuring-acceptance.sh: Evidence acceptance contracts PASS.
  • Backend Vitest: 78 files passed, 1 skipped; 1,119 tests passed, 40 skipped; TypeScript PASS.
  • Frontend Vitest and TypeScript PASS.
  • Harness: 1,103 tests passed, 4 deselected; Ruff PASS.
  • Go: 19 packages, zero failures.
  • Task 13 runtime fixtures: local PASS; server PASS; shell syntax PASS. The server regression proves both the root-owned canonical store and the UID/GID 10001:10001 runtime projection are created with mode 0700 before OIDC configuration.

manual acceptance: PASS