Remove OpenSCAD from the web port

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>
This commit is contained in:
2026-11-15 06:53:03 +08:00
parent acf222bb03
commit 65f59aba25
46 changed files with 19768 additions and 178 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python3
import hashlib
import json
from collections import Counter
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
manifest_path = ROOT / "docs/p6/python-api-manifest.json"
manifest = json.loads(manifest_path.read_text())
pure = [row for row in manifest["records"] if row["tier"] == "tier-2-pure" and row["disposition"] == "exposed"]
# Runtime evidence is append-only: new native family probes may safely expose
# more pure APIs. The contract is evidence-backed membership, not a frozen
# historical count.
valid = bool(pure) and all(row.get("dispositionEvidence") for row in pure)
report = {
"schema": "freecad-web-p6-python-api-pure-gate/v1",
"taskId": "FW-P6-FPA-F2",
"result": "pass_with_pending" if valid else "fail",
"coverage": {"pureTierRecords": sum(row["tier"] == "tier-2-pure" for row in manifest["records"]), "exposedPureRecords": len(pure), "plannedRecords": sum(row["disposition"] == "planned" for row in manifest["records"]), "restrictedRecords": sum(row["disposition"] == "restricted" for row in manifest["records"]), "totalRecords": len(manifest["records"])},
"byModule": dict(sorted(Counter(row["module"] for row in pure).items())),
"records": [{"id": row["id"], "module": row["module"], "name": row["name"], "artifacts": row["dispositionEvidence"]} for row in pure],
"manifestSha256": hashlib.sha256(manifest_path.read_bytes()).hexdigest(),
"boundaries": ["Only passing native Python API artifacts are used; external non-native process calls remain subject to capability policy.", "Pure-tier records without native evidence remain planned and are not implied by this partial gate."],
}
out = ROOT / "docs/p6/python-api-pure-gate.json"
out.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n")
(ROOT / "docs/freecad-p6-python-api-pure-gate.log").write_text(json.dumps({"result": report["result"], "coverage": report["coverage"]}) + "\n")
print(json.dumps({"result": report["result"], "coverage": report["coverage"]}, ensure_ascii=False))
raise SystemExit(0 if valid else 1)