docs(evidence): narrow owner gate baseline

This commit is contained in:
2026-08-25 02:43:01 +02:00
parent 8542124f27
commit d4818c8cc3
3 changed files with 63 additions and 20 deletions
+6 -4
View File
@@ -7,10 +7,12 @@
known pytest deprecation warning**. The probe used only a `mktemp` workspace, confirmed the known pytest deprecation warning**. The probe used only a `mktemp` workspace, confirmed the
ThothII worktree status was unchanged, and did not read or write an external PSD authoring path. ThothII worktree status was unchanged, and did not read or write an external PSD authoring path.
- **Read-only owner-gate package:** authorized inspection of the clean PSD repository at - **Read-only owner-gate package:** authorized inspection of the clean PSD repository at
`47516f85b4db4a67cfa8a86cea4cb2e7b98c5813` recorded the exact 36-source inventory and the `47516f85b4db4a67cfa8a86cea4cb2e7b98c5813` recorded 35 moveable source documents plus the
legacy `psd-clinical` Qdrant baseline (163 schema tables, 2,275 schema columns, 2 memory, 1 retained `evidence/README.md` (36 current evidence files total), and the legacy `psd-clinical`
solved question) in `docs/testing/evidence-restructuring-manual.md`. The before/after Git Qdrant baseline (163 schema tables, 2,275 schema columns, 2 memory, 1 solved question) in
status remained clean; no secret was read and no external repository mutation occurred. `docs/testing/evidence-restructuring-manual.md`. The counts and representative IDs now come
only from exact filtered counts and three-ID, no-payload/no-vector scrolls. The before/after
Git status remained clean; no secret was read and no external repository mutation occurred.
- **Scope boundary:** the real Pi call, PSD migration, Git review, authoritative pre/post vector - **Scope boundary:** the real Pi call, PSD migration, Git review, authoritative pre/post vector
inspection, activation, and human walkthrough remain **PENDING in issue #47** until the owner inspection, activation, and human walkthrough remain **PENDING in issue #47** until the owner
authorizes the migration window and exact target branch. No PSD migration is represented by authorizes the migration window and exact target branch. No PSD migration is represented by
+40 -16
View File
@@ -34,14 +34,17 @@ Read-only snapshot collected 2026-08-25:
`47516f85b4db4a67cfa8a86cea4cb2e7b98c5813`. `47516f85b4db4a67cfa8a86cea4cb2e7b98c5813`.
- proposed PSD branch name: `codex/evidence-restructuring-psd` (proposal only; no - proposed PSD branch name: `codex/evidence-restructuring-psd` (proposal only; no
external branch has been created); external branch has been created);
- rollback command for the owner to use only if the later authorized migration must be - rollback command for the owner to use only if a later authorized migration must be
undone: undone. It restores the PSD worktree to this pre-migration commit and was not run by
this task:
```bash ```bash
git -C /Users/mp/projects/tht-workspace-psd reset --hard 47516f85b4db4a67cfa8a86cea4cb2e7b98c5813 git -C /Users/mp/projects/tht-workspace-psd reset --hard 47516f85b4db4a67cfa8a86cea4cb2e7b98c5813
``` ```
- exact source inventory (36 files; `evidence/README.md` is not a source): - exact migration inventory: **35 moveable source documents** listed below, plus the
retained `psd-clinical/evidence/README.md` (36 current evidence files total). The
README is not a source document and must remain at `psd-clinical/evidence/README.md`:
```text ```text
psd-clinical/evidence/00-glossario/coorti-universi-pazienti.md psd-clinical/evidence/00-glossario/coorti-universi-pazienti.md
@@ -81,9 +84,12 @@ Read-only snapshot collected 2026-08-25:
psd-clinical/evidence/50-metadati-normalizzazione/normalizzazione-device-cied.md psd-clinical/evidence/50-metadati-normalizzazione/normalizzazione-device-cied.md
``` ```
The read-only Qdrant observation for the `psd-clinical` collection on the legacy PSD The earlier full-payload scroll is out-of-scope and is not evidence for this package;
bind `127.0.0.1:6333` was 163 `schema_table`, 2,275 `schema_column`, 2 `memory`, and it must not be repeated. The replacement read-only baseline for the `psd-clinical`
1 `solved_question` point. Representative IDs are: collection on the legacy PSD bind `127.0.0.1:6333` used exact filtered counts and
three-ID filtered scrolls only, with `with_payload:false` and `with_vector:false`.
It observed 163 `schema_table`, 2,275 `schema_column`, 2 `memory`, and 1
`solved_question` point. Representative IDs are:
| Kind | Sample IDs | | Kind | Sample IDs |
| --- | --- | | --- | --- |
@@ -94,20 +100,36 @@ bind `127.0.0.1:6333` was 163 `schema_table`, 2,275 `schema_column`, 2 `memory`,
`tht ... workspace vector inspect --json` was attempted read-only but was blocked by `tht ... workspace vector inspect --json` was attempted read-only but was blocked by
the local maintenance image's missing production `auth.yaml` / `AUTH_MODE=upstream`. the local maintenance image's missing production `auth.yaml` / `AUTH_MODE=upstream`.
The counts above therefore come from the Qdrant read-only scroll endpoint and must be The narrow Qdrant baseline is a provisional owner-gate observation and must be
repeated through the successful `vector inspect` command immediately before the future repeated through the successful `vector inspect` command immediately before the future
authorized preprocessing action. No secret was read to bypass that guard. authorized preprocessing action. No secret was read to bypass that guard.
### Reproducible no-write record ### Reproducible no-write record
The inspection used only these read operations; `git status --porcelain` was empty both The replacement inspection used only these read operations; `git status --porcelain`
before and after, and `git diff --quiet` succeeded after: was empty both before and after, and `git diff --quiet` succeeded after. Each Qdrant
count request carries only the `record_kind` filter and `exact:true`; each scroll
request returns at most three point IDs, never payloads or vectors:
```bash ```bash
git -C /Users/mp/projects/tht-workspace-psd rev-parse HEAD git -C /Users/mp/projects/tht-workspace-psd rev-parse HEAD
git -C /Users/mp/projects/tht-workspace-psd status --porcelain git -C /Users/mp/projects/tht-workspace-psd status --porcelain
git -C /Users/mp/projects/tht-workspace-psd ls-tree -r --name-only HEAD -- psd-clinical/evidence git -C /Users/mp/projects/tht-workspace-psd ls-tree -r --name-only HEAD -- psd-clinical/evidence
node -e 'fetch("http://127.0.0.1:6333/collections/psd-clinical/points/scroll", {method:"POST", headers:{"content-type":"application/json"}, body:JSON.stringify({limit:4096,with_payload:true,with_vector:false})}).then(r => r.json()).then(x => console.log(x.result.points.length))' node <<'NODE'
const endpoint = "http://127.0.0.1:6333/collections/psd-clinical/points";
const kinds = ["schema_table", "schema_column", "memory", "solved_question"];
const post = (path, body) => fetch(endpoint + path, {
method: "POST", headers: {"content-type": "application/json"}, body: JSON.stringify(body),
}).then((response) => response.json());
for (const kind of kinds) {
const filter = {must: [{key: "record_kind", match: {value: kind}}]};
const count = await post("/count", {filter, exact: true});
const sample = await post("/scroll", {
filter, limit: 3, with_payload: false, with_vector: false,
});
console.log(kind, count.result.count, sample.result.points.map((point) => point.id));
}
NODE
git -C /Users/mp/projects/tht-workspace-psd diff --quiet git -C /Users/mp/projects/tht-workspace-psd diff --quiet
``` ```
@@ -120,12 +142,14 @@ external mutations and manual acceptance.
Record a separate PASS/FAIL and evidence for each item; never substitute an automated Record a separate PASS/FAIL and evidence for each item; never substitute an automated
test for a human Git review. test for a human Git review.
1. **Authoring and Git review.** In the authorized PSD clone, move only the approved 1. **Authoring and Git review.** In the authorized PSD clone, move exactly those 35
36 source paths to `evidence/source/`, run `tht evidence prepare`, verify exactly listed source documents to `evidence/source/`; retain
one no-tool/no-session Pi call per changed source, inspect the Git diff, correct `psd-clinical/evidence/README.md` at its current path. Run `tht evidence prepare`,
every `review_item`, run `tht evidence validate`, and obtain the normal human Git verify exactly one no-tool/no-session Pi call per changed source, inspect the Git
review. Confirm source renames/reclassifications retain IDs, semantic splits receive diff, correct every `review_item`, run `tht evidence validate`, and obtain the
new IDs, IDs use `evidence:<slug>`, and no orphan is deleted automatically. normal human Git review. Confirm source renames/reclassifications retain IDs,
semantic splits receive new IDs, IDs use `evidence:<slug>`, and no orphan is deleted
automatically.
2. **Additive BM25 schema upgrade.** Before preprocessing, run vector inspect and save 2. **Additive BM25 schema upgrade.** Before preprocessing, run vector inspect and save
configuration, counts, and IDs. Run `workspace preprocess evidence`; verify the configuration, counts, and IDs. Run `workspace preprocess evidence`; verify the
unnamed dense vector remains and only `bm25` with IDF is added. Do not accept a unnamed dense vector remains and only `bm25` with IDF is added. Do not accept a
@@ -21,3 +21,20 @@ def test_acceptance_runner_includes_the_integrated_candidate_publication_gate():
runner = Path(__file__).parents[2] / "scripts" / "evidence-restructuring-acceptance.sh" runner = Path(__file__).parents[2] / "scripts" / "evidence-restructuring-acceptance.sh"
assert "test_evidence_candidate_publication.py" in runner.read_text(encoding="utf-8") assert "test_evidence_candidate_publication.py" in runner.read_text(encoding="utf-8")
def test_owner_gate_manual_records_the_narrow_inventory_and_qdrant_baseline_protocol():
manual = Path(__file__).parents[2] / "docs" / "testing" / "evidence-restructuring-manual.md"
text = manual.read_text(encoding="utf-8")
normalized = " ".join(text.split())
assert "35 moveable source documents" in text
assert "retained `psd-clinical/evidence/README.md`" in text
inventory = text.split("README is not a source document and must remain", 1)[1]
inventory = inventory.split("```text", 1)[1].split("```", 1)[0]
assert sum(line.strip().endswith(".md") for line in inventory.splitlines()) == 35
assert "move exactly those 35 listed source documents" in normalized
assert "with_payload:false" in text
assert "with_payload:true" not in text
assert "must be repeated through the successful `vector inspect` command" in normalized