Web FreeCAD does not implement OpenSCAD. Drop the module end to end instead of keeping a blocked or placeholder shell: - delete the parity-matrix row and regenerate the module registry (31 modules, OpenSCAD absent) - remove the OpenSCAD-only frontend modules (worker, facades, slice, mesh backend, desktop/preferences tasks) and strip the OpenSCAD branches from the dispatchers, shells, storage and router - neutralise the two shared owners that outlived the module: openscad-desktop-view -> scene-viewport (SceneViewport) and openscad-desktop-adapter -> scene-document (SceneDocument), so Part, Mesh and the other consumers keep working - drop the FreeCADWebOpenSCADRuntimeProbe target and FREECAD_WEB_ENABLE_OPENSCAD option from the kernel CMake; BUILD_OPENSCAD stays in the forced-off list - delete web/openscad.html, its Vite input, the kernel artifacts and the 17 OpenSCAD tool entry points AGENTS.md records the removal rule. tsc --noEmit is clean and grep -ri openscad web/src is empty. Also carry the Boost pthread guard: under Emscripten a plain -lpthread implies -sUSE_PTHREADS=1 and therewith --shared-memory, which the non-atomics VTK archives cannot link against. Validation NOT_RUN / PARTIAL_FAILED, Acceptance NOT_CLAIMED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.6 KiB
Python
49 lines
2.6 KiB
Python
#!/usr/bin/env python3
|
|
"""Verify that every canonical Tier-2 pure API has terminal native evidence."""
|
|
from __future__ import annotations
|
|
|
|
import hashlib
|
|
import json
|
|
from collections import Counter
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
P6 = ROOT / "docs/p6"
|
|
MANIFEST = P6 / "python-api-manifest.json"
|
|
manifest_bytes = MANIFEST.read_bytes()
|
|
manifest = json.loads(manifest_bytes)
|
|
rows = [row for row in manifest["records"] if row.get("tier") == "tier-2-pure"]
|
|
terminal = {"exposed", "restricted", "nonportable", "not_implemented"}
|
|
missing = [row["id"] for row in rows if row.get("disposition") not in terminal or not row.get("dispositionEvidence")]
|
|
modules = sorted({row["module"] for row in rows})
|
|
artifact_index = {}
|
|
for module in modules:
|
|
candidates = sorted(P6.glob(f"{module.lower()}*tier2*pure*family-runtime.json"))
|
|
if not candidates:
|
|
missing.append(f"artifact:{module}")
|
|
continue
|
|
path = candidates[-1]
|
|
raw = path.read_bytes()
|
|
value = json.loads(raw)
|
|
artifact_index[module] = {"path": str(path.relative_to(ROOT)), "sha256": hashlib.sha256(raw).hexdigest(), "status": value.get("status")}
|
|
if value.get("status") not in {"pass", "pass_with_boundaries"}:
|
|
missing.append(f"artifact_status:{module}")
|
|
counts = Counter(row.get("disposition") for row in rows)
|
|
report = {
|
|
"schema": "freecad-web-p6-python-api-pure-aggregate-gate/v1",
|
|
"taskId": "FW-P6-FPA-F2",
|
|
"result": "pass_with_boundaries" if len(rows) == 6417 and not missing else "fail",
|
|
"source": {"manifest": "docs/p6/python-api-manifest.json", "manifestSha256": hashlib.sha256(manifest_bytes).hexdigest()},
|
|
"coverage": {"tier": "tier-2-pure", "records": len(rows), "counts": dict(sorted(counts.items())), "modules": modules, "missing": missing},
|
|
"evidence": artifact_index,
|
|
"boundaries": [
|
|
"Every Tier-2 record has a terminal disposition and a module-scoped native evidence reference.",
|
|
"Terminal not_implemented/restricted records remain capability denials; no JavaScript result is substituted.",
|
|
"Later Tier-3/stateful and exhaustive Chrome gates remain outside this aggregate implementation gate.",
|
|
],
|
|
}
|
|
(P6 / "python-api-pure-aggregate-gate.json").write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
|
(ROOT / "docs/freecad-p6-python-api-pure-aggregate-gate.log").write_text(json.dumps({"result": report["result"], "coverage": report["coverage"]}, ensure_ascii=False) + "\n", encoding="utf-8")
|
|
print(json.dumps({"result": report["result"], "coverage": report["coverage"]}, ensure_ascii=False))
|
|
raise SystemExit(0 if report["result"] != "fail" else 1)
|