docs: relax semantic doc assertions
This commit is contained in:
@@ -159,6 +159,26 @@ if [[ $project_state_status -eq 0 ]] || ! grep -Fq "contradictory active text" "
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_state_live_heading="$negative_root/project-state-live-heading.md"
|
||||
python3 - "$root/PROJECT_STATE.md" "$project_state_live_heading" <<'PY'
|
||||
import pathlib, sys
|
||||
source = pathlib.Path(sys.argv[1]).read_text()
|
||||
target = pathlib.Path(sys.argv[2])
|
||||
marker = source.index("## Historical snapshots")
|
||||
historical = source[marker:]
|
||||
historical = historical.replace("### Historical snapshot — Session summary redesign (2026-07-23)", "### Session summary redesign — LIVE 2026-07-23", 1)
|
||||
target.write_text(source[:marker] + historical)
|
||||
PY
|
||||
set +e
|
||||
verify_project_state_current_contract "$project_state_live_heading" historical-live-heading >"$project_state_output" 2>&1
|
||||
project_state_status=$?
|
||||
set -e
|
||||
if [[ $project_state_status -eq 0 ]] || ! grep -Fq "active/live heading markers" "$project_state_output"; then
|
||||
echo "historical LIVE-heading fixture was not rejected correctly" >&2
|
||||
cat "$project_state_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
workspace_fixture="$negative_root/workspace-invalid.yaml"
|
||||
python3 - "$root/deploy/workspaces/example.yaml" "$workspace_fixture" <<'PY'
|
||||
import pathlib, sys, yaml
|
||||
@@ -198,6 +218,87 @@ cat >"$project_state_positive" <<'EOF'
|
||||
EOF
|
||||
verify_project_state_current_contract "$project_state_positive" positive-project-state >/dev/null
|
||||
|
||||
local_manual_paraphrase="$negative_root/local-manual-paraphrase.md"
|
||||
cp "$root/docs/install/local-workspace-registry.md" "$local_manual_paraphrase"
|
||||
python3 - "$local_manual_paraphrase" <<'PY'
|
||||
import pathlib, sys
|
||||
path = pathlib.Path(sys.argv[1])
|
||||
text = path.read_text()
|
||||
text = text.replace(
|
||||
"One workspace owns one Qdrant collection; schema, Evidence, and Memory records share that collection and remain\nisolated by payload `kind`.",
|
||||
"Each workspace reserves a single Qdrant collection. Schema, Evidence, and Memory stay inside that same collection and are separated by payload `kind`.",
|
||||
)
|
||||
path.write_text(text)
|
||||
PY
|
||||
require_concept_tokens "$local_manual_paraphrase" "local manual paraphrase" "workspace" "qdrant" "collection" >/dev/null
|
||||
require_pattern "$local_manual_paraphrase" "local manual paraphrase" '(?is)(single|one|each).{0,120}(workspace|qdrant|collection).{0,120}(reserves|reserve|owns|single)' >/dev/null
|
||||
|
||||
local_manual_missing="$negative_root/local-manual-missing.md"
|
||||
cp "$root/docs/install/local-workspace-registry.md" "$local_manual_missing"
|
||||
python3 - "$local_manual_missing" <<'PY'
|
||||
import pathlib, sys
|
||||
path = pathlib.Path(sys.argv[1])
|
||||
text = path.read_text()
|
||||
text = text.replace(
|
||||
"Schema-v3 is the only operational descriptor format. Schema-v1/v2 descriptors remain\n`migration_required` until an explicit reviewed migration writes schema version 3. One workspace owns one Qdrant collection; schema, Evidence, and Memory records share that collection and remain\nisolated by payload `kind`.\n",
|
||||
"Schema-v3 is the only operational descriptor format. Schema-v1/v2 descriptors remain `migration_required` until an explicit reviewed migration writes schema version 3.\n",
|
||||
)
|
||||
path.write_text(text)
|
||||
PY
|
||||
set +e
|
||||
require_pattern "$local_manual_missing" "local manual missing ownership" '(?is)(single|one|each).{0,120}(workspace|qdrant|collection).{0,120}(reserves|reserve|owns|single)' >"$workspace_output" 2>&1
|
||||
workspace_status=$?
|
||||
set -e
|
||||
if [[ $workspace_status -eq 0 ]]; then
|
||||
echo "ownership omission fixture was not rejected correctly" >&2
|
||||
cat "$workspace_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
compact_paraphrase="$negative_root/compact-paraphrase.md"
|
||||
cp "$root/docs/installazione-docker-4-contesti.md" "$compact_paraphrase"
|
||||
python3 - "$compact_paraphrase" <<'PY'
|
||||
import pathlib, sys
|
||||
path = pathlib.Path(sys.argv[1])
|
||||
text = path.read_text()
|
||||
text = text.replace(
|
||||
"Qdrant e Ollama embedding sono servizi interni obbligatori del progetto Compose. Restano esterni solo DWH e LLM.",
|
||||
"Nel Compose di ThothII Qdrant e l'embedding Ollama fanno parte dei servizi interni obbligatori; DWH e LLM restano invece gli unici servizi esterni.",
|
||||
)
|
||||
path.write_text(text)
|
||||
PY
|
||||
for pattern in \
|
||||
'Qdrant' \
|
||||
'Ollama' \
|
||||
'(interni obbligatori|servizi interni obbligatori|interni al progetto Compose)' \
|
||||
'DWH' \
|
||||
'LLM' \
|
||||
'(esterni solo|solo esterni|restano esterni|unici servizi esterni|unici esterni)'; do
|
||||
require_pattern "$compact_paraphrase" "compact manual paraphrase" "$pattern" >/dev/null
|
||||
done
|
||||
|
||||
compact_inversion="$negative_root/compact-inversion.md"
|
||||
cp "$root/docs/installazione-docker-4-contesti.md" "$compact_inversion"
|
||||
python3 - "$compact_inversion" <<'PY'
|
||||
import pathlib, sys
|
||||
path = pathlib.Path(sys.argv[1])
|
||||
text = path.read_text()
|
||||
text = text.replace(
|
||||
"Qdrant e Ollama embedding sono servizi interni obbligatori del progetto Compose. Restano esterni solo DWH e LLM.",
|
||||
"Qdrant, Ollama, DWH e LLM restano tutti servizi esterni.",
|
||||
)
|
||||
path.write_text(text)
|
||||
PY
|
||||
set +e
|
||||
require_pattern "$compact_inversion" "compact inversion" '(interni obbligatori|servizi interni obbligatori|interni al progetto Compose)' >"$workspace_output" 2>&1
|
||||
workspace_status=$?
|
||||
set -e
|
||||
if [[ $workspace_status -eq 0 ]]; then
|
||||
echo "compact inversion fixture was not rejected correctly" >&2
|
||||
cat "$workspace_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
adapted_reorder="$negative_root/caddy-adapted-reorder.json"
|
||||
adapted_bypass="$negative_root/caddy-adapted-bypass.json"
|
||||
node - "$adapted_reorder" "$adapted_bypass" <<'NODE'
|
||||
|
||||
Reference in New Issue
Block a user