docs: make schema v3 the only workspace contract
This commit is contained in:
@@ -137,57 +137,32 @@ sed '/^case "\$mode" in/,$d' "$root/scripts/verify-workspace-install-docs.sh" >"
|
||||
# shellcheck source=/dev/null
|
||||
source "$verifier_functions"
|
||||
|
||||
project_state_fixture="$negative_root/project-state.md"
|
||||
python3 - "$root/PROJECT_STATE.md" "$project_state_fixture" <<'PY'
|
||||
python3 "$root/scripts/test_workspace_descriptor_doc_contract.py"
|
||||
|
||||
project_topology_fixture="$negative_root/project-topology-contradiction.md"
|
||||
python3 - "$root/PROJECT_STATE.md" "$project_topology_fixture" <<'PY'
|
||||
import pathlib, sys
|
||||
source = pathlib.Path(sys.argv[1]).read_text()
|
||||
target = pathlib.Path(sys.argv[2])
|
||||
marker = source.index("## Historical snapshots")
|
||||
contradiction = """
|
||||
## Contradictory release note — LIVE 2026-08-08
|
||||
|
||||
- Schema-v2 descriptors are operational again.
|
||||
- The supported Compose stack is exactly `frontend` plus `core`.
|
||||
- DWH, vector DB, embedding, LLM, and reverse-proxy services are external configurable endpoints.
|
||||
|
||||
"""
|
||||
target.write_text(source[:marker] + contradiction + source[marker:])
|
||||
marker = source.index("# Historical archive")
|
||||
contradiction = (
|
||||
"The supported Compose stack is exactly `frontend` plus `core`.\n"
|
||||
"DWH, vector DB, embedding, LLM, and reverse-proxy services are external endpoints.\n\n"
|
||||
)
|
||||
pathlib.Path(sys.argv[2]).write_text(source[:marker] + contradiction + source[marker:])
|
||||
PY
|
||||
project_state_output="$negative_root/project-state-output"
|
||||
project_topology_output="$negative_root/project-topology-output"
|
||||
set +e
|
||||
verify_project_state_current_contract "$project_state_fixture" contradictory-project-state >"$project_state_output" 2>&1
|
||||
project_state_status=$?
|
||||
verify_project_state_current_contract "$project_topology_fixture" contradictory-project-topology \
|
||||
>"$project_topology_output" 2>&1
|
||||
project_topology_status=$?
|
||||
set -e
|
||||
if [[ $project_state_status -eq 0 ]] || ! grep -Fq "contradictory active text" "$project_state_output"; then
|
||||
echo "contradictory current-state fixture was not rejected correctly" >&2
|
||||
cat "$project_state_output" >&2
|
||||
if [[ $project_topology_status -eq 0 ]] || \
|
||||
! grep -Fq "contradictory active text" "$project_topology_output"; then
|
||||
echo "contradictory current PROJECT_STATE topology was not rejected" >&2
|
||||
cat "$project_topology_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for level in 1 2 3 4 5 6; do
|
||||
project_state_live_heading="$negative_root/project-state-live-heading-h$level.md"
|
||||
python3 - "$root/PROJECT_STATE.md" "$project_state_live_heading" "$level" <<'PY'
|
||||
import pathlib, sys
|
||||
source = pathlib.Path(sys.argv[1]).read_text()
|
||||
target = pathlib.Path(sys.argv[2])
|
||||
level = int(sys.argv[3])
|
||||
marker = source.index("## Historical snapshots")
|
||||
historical = source[marker:]
|
||||
replacement = "#" * level + " Session summary redesign — LIVE 2026-07-23"
|
||||
historical = historical.replace("### Historical snapshot — Session summary redesign (2026-07-23)", replacement, 1)
|
||||
target.write_text(source[:marker] + historical)
|
||||
PY
|
||||
set +e
|
||||
verify_project_state_current_contract "$project_state_live_heading" "historical-live-heading-h$level" >"$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 for heading level $level" >&2
|
||||
cat "$project_state_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
workspace_fixture="$negative_root/workspace-invalid.yaml"
|
||||
python3 - "$root/deploy/workspaces/example.yaml" "$workspace_fixture" <<'PY'
|
||||
import pathlib, sys, yaml
|
||||
@@ -206,27 +181,6 @@ if [[ $workspace_status -eq 0 ]] || ! grep -Fq "embedding dimensions must be 102
|
||||
exit 1
|
||||
fi
|
||||
|
||||
project_state_positive="$negative_root/project-state-positive.md"
|
||||
cat >"$project_state_positive" <<'EOF'
|
||||
# ThothII — Project State
|
||||
|
||||
> Starting-point snapshot.
|
||||
|
||||
## Internal Qdrant + Ollama semantic infrastructure — LIVE 2026-08-08
|
||||
|
||||
- Schema-v3 descriptors are operational and v1/v2 remain `migration_required`.
|
||||
- One workspace owns one Qdrant collection.
|
||||
- Only DWH and LLM remain external runtime application endpoints.
|
||||
- The internal stack includes `qdrant`, `embedding`, and `embedding-model-init`.
|
||||
|
||||
## Historical snapshots — superseded context
|
||||
|
||||
### Historical snapshot — previous deployment
|
||||
|
||||
- Older notes intentionally live only here.
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user