Integrate Cesium Gaussian lifecycle and source-based cleanup rebuilds

This commit is contained in:
DCCONSTRUCTIONS
2026-11-16 22:16:12 +03:00
parent 7c0dbd4e06
commit 0a29522f2f
13 changed files with 123 additions and 46 deletions
+6 -6
View File
@@ -10,7 +10,7 @@
"hasInstallScript": true,
"dependencies": {
"@noble/hashes": "^2.2.0",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.2.47.tgz",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.2.57.tgz",
"@nodedc/map-cesium-react": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/map-cesium-react",
"@nodedc/page-patterns": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/page-patterns",
"@nodedc/tokens": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/tokens",
@@ -71,7 +71,7 @@
},
"../../../NODEDC_DESIGN_GUIDELINE/packages/ui-react": {
"name": "@nodedc/ui-react",
"version": "0.7.1",
"version": "0.7.2",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
@@ -884,12 +884,12 @@
}
},
"node_modules/@nodedc/bim-viewer": {
"version": "0.2.47",
"resolved": "file:../../vendor/bim/nodedc-bim-viewer-0.2.47.tgz",
"integrity": "sha512-oBD5I3q1Rpi46LAASM2XtjpDlmE86b94rVEh4kboDHjhKHkxccNsxqgJGcjc1TU9LbNFbQYKq5OiEM/9aIsONQ==",
"version": "0.2.57",
"resolved": "file:../../vendor/bim/nodedc-bim-viewer-0.2.57.tgz",
"integrity": "sha512-jUieO9mRP44dMSvNpG4VMoxNeHOMNpeEaR/rVisnD3cDaRN0R7u0fzZENMW26DFluB4noNv2H/QFU2zHgSy/WQ==",
"peerDependencies": {
"@nodedc/map-cesium-react": ">=0.1.1 <0.2",
"@nodedc/ui-react": "0.7.1",
"@nodedc/ui-react": ">=0.7.2 <0.8",
"react": ">=19 <20",
"react-dom": ">=19 <20"
}
+1 -1
View File
@@ -15,7 +15,7 @@
},
"dependencies": {
"@noble/hashes": "^2.2.0",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.2.47.tgz",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.2.57.tgz",
"@nodedc/map-cesium-react": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/map-cesium-react",
"@nodedc/page-patterns": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/page-patterns",
"@nodedc/tokens": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/tokens",
+29 -2
View File
@@ -1,6 +1,33 @@
# Portable BIM module in Mission Core
## Current delivery · Cesium project map · 16 November 2026
## Current delivery · Cesium Gaussian cleanup · 16 November 2026
Portable client **0.2.57**, host **0.2.18**; the separate BIM conversion Worker
remains **0.2.12**. Gaussian Pipeline Worker is **6afbf43**, deployed into the
existing container with the existing native GPU executor. Cesium stays 1.147.0;
provider routes and Synology tile caches are unchanged.
Project settings now expose Gaussian processing settings: curved trajectory
corridor (15 m per side), optional vertical limits, conservative floater cleanup
and **Пересчитать**. Originals and prepared source remain shared by SHA-256 with
LAB. A durable replacement intent survives closing the form. Only verified ready
artifacts replace the current scene, preserving the exact geographic pose and
placement origin; then Worker acknowledges old-owner deletion and Core retires
its old ready copy. First drop/import uses the same settings form.
Live Novinskiy result: **16,901,217 splats**, 7.17% fewer; corridor removed
1,275,353 and the floater filter another 29,436. Core has 1,386,147,270 bytes of
Cesium artifacts plus its 397,648-byte manifest. Old result absent on both hosts,
work/staging empty; LAB still owns the same physical archive. Settings close /
reopen, ready rendering and exact pose preservation passed. See
`outputs/cesium-cleanup-20261116/RESULT.md` for private execution evidence and
module `docs/cesium-gaussians.md` for lifecycle and qualification limits.
Validation: 90 Pipeline, 182 client, 175 module server and 29 Core simulation/adapter tests;
client types and integrated production build passed. Real LCC2, fused trajectory
frames, native fullscreen and physical power-loss acceptance remain unqualified.
## Earlier delivery · Cesium project map · 16 November 2026
Portable client **0.2.47**, host **0.2.15**, Worker unchanged **0.2.12**.
Exact source identities and artifact hashes are in `vendor/bim/*release.json`.
@@ -463,7 +490,7 @@ The trash action is full version retirement after explicit confirmation, separat
Worker remains one container on the same named volume, with the same CPU/RAM/PID/network boundary. All 22 unrelated containers present at deployment kept their identities. The six pre-existing source/product records were inventoried before replacement and verified afterward, including manifests, file lengths and SHA-256. The destructive qualification removed only its separately approved additional public fixture. No raw source is stored in Core.
Deletion-phase validation: 77 module Python tests, 14 browser contracts, 2 Core adapter tests, 1,596 Core frontend tests, typography/typecheck and production build. The deletion tests include a real forced process exit followed by queue/journal/scratch recovery, active-process cancellation, lost acknowledgement and partial unlink. Detailed current UI/Worker evidence is in the module's entry qualification; initial IFC facts above remain dated evidence.
Deletion-phase validation: 77 module Python tests, 14 browser contracts, 29 Core simulation/adapter tests, 1,596 Core frontend tests, typography/typecheck and production build. The deletion tests include a real forced process exit followed by queue/journal/scratch recovery, active-process cancellation, lost acknowledgement and partial unlink. Detailed current UI/Worker evidence is in the module's entry qualification; initial IFC facts above remain dated evidence.
Live UI fault qualification: with Worker stopped, confirmation enqueued the temporary version deletion and the row retained its central progress/status. Core restarted while Worker remained offline; the durable task and row returned. Starting the same Worker completed deletion automatically, then the row disappeared. Worker acknowledgement, removal of temporary source/product paths and local copy, empty scratch and preservation of all six previous materials were verified. Browser 0.1.7 also restores viewer admission after Core restart (three regressions plus live open-model restart); it does not readmit retired products. Final 1280/700 px layout and individual Glass V4 controls with transparent rails were checked. Design Guideline source `3d4c4aaa082d75de8e1a3a63abfa19b863f674c9`. See the module entry qualification and compact deletion evidence for scope.
+2 -2
View File
@@ -18,7 +18,7 @@ dependencies = [
"httpx>=0.28,<1",
"lz4>=4.4,<5",
"missioncore-plugin-sdk",
"nodedc-bim-module==0.2.15",
"nodedc-bim-module==0.2.18",
"paho-mqtt>=2.1,<3",
"pillow>=12,<13",
"pyyaml>=6.0,<7",
@@ -29,7 +29,7 @@ dependencies = [
]
[tool.uv.sources]
nodedc-bim-module = { path = "vendor/bim/nodedc_bim_module-0.2.15-py3-none-any.whl" }
nodedc-bim-module = { path = "vendor/bim/nodedc_bim_module-0.2.18-py3-none-any.whl" }
missioncore-plugin-sdk = { path = "packages/plugin-sdk", editable = true }
[project.optional-dependencies]
@@ -237,7 +237,7 @@ class GaussianPipelineGateway:
members=members,
)
def upload_source_archive(self, archive_path: Path) -> GaussianArchiveUpload:
def upload_source_archive(self, archive_path: Path, *, owner_id: str | None = None) -> GaussianArchiveUpload:
source_candidate = archive_path.expanduser().absolute()
if source_candidate.is_symlink() or not source_candidate.is_file():
raise GaussianPipelineIntegrityError(
@@ -266,6 +266,24 @@ class GaussianPipelineGateway:
raise GaussianPipelineIntegrityError(
"Gaussian source archive exceeds provider byte admission"
)
if owner_id is not None:
self.require_shared_source_retention(capabilities)
claimed = self._json("POST", "/v1/sources/claim", document={
"owner_id": owner_id,
"archive": {"archive_name": archive_name, "format": archive_format,
"sha256": digest, "byte_length": byte_length},
}, timeout_seconds=self.ingest_timeout_seconds).get("receipt")
if claimed is not None:
from k1link.simulation.source_retention import validate_receipt
validate_receipt(claimed)
original = claimed["input"]
if (claimed.get("owner_id") != owner_id or original["kind"] != "archive"
or {k: v for k, v in original["archive"].items() if k != "upload_id"} != {
"archive_name": archive_name, "format": archive_format,
"sha256": digest, "byte_length": byte_length,
}):
raise GaussianPipelineIntegrityError("Worker claimed different source bytes or owner")
return GaussianArchiveUpload(**original["archive"])
upload_id = self._upload_file(
source,
{"archive_name": archive_name, "sha256": digest},
@@ -304,11 +322,32 @@ class GaussianPipelineGateway:
"Worker не поддерживает постоянное хранение исходников. Обновите Gaussian Pipeline."
)
def retain_source(self, original: dict[str, Any]) -> dict[str, Any]:
@staticmethod
def require_shared_source_retention(capabilities: dict[str, Any]) -> None:
if capabilities.get("source_deduplication") != "owned-archive-sha256/v1":
raise GaussianPipelineGatewayError(
"Worker не поддерживает общий дедуп исходников. Обновите Gaussian Pipeline."
)
def retain_source(self, original: dict[str, Any], *, owner_id: str | None = None) -> dict[str, Any]:
from k1link.simulation.source_retention import validate_receipt
receipt = self._json("POST", "/v1/sources", document=original,
timeout_seconds=self.ingest_timeout_seconds)
validate_receipt(receipt, expected=original)
if owner_id is None:
receipt = self._json("POST", "/v1/sources", document=original,
timeout_seconds=self.ingest_timeout_seconds)
validate_receipt(receipt, expected=original)
return receipt
self.require_shared_source_retention(self.capabilities())
receipt = self._json("POST", "/v1/sources/retain",
document={"owner_id": owner_id, "input": original},
timeout_seconds=self.ingest_timeout_seconds).get("receipt")
validate_receipt(receipt)
expected = original
if original["kind"] == "archive" and receipt["input"]["kind"] == "archive":
expected = {"kind": "archive", "archive": {**original["archive"],
"upload_id": receipt["input"]["archive"]["upload_id"]}}
validate_receipt(receipt, expected=expected)
if receipt.get("owner_id") != owner_id:
raise GaussianPipelineIntegrityError("Worker retained source for a different owner")
return receipt
def retained_source(self, receipt: dict[str, Any], *, verify: bool = False) -> dict[str, Any]:
+4 -3
View File
@@ -196,7 +196,7 @@ def prepare_source(
root = store.source_root(project_id)
if project["source"]["kind"] == "archive":
item = project["source"]["files"][0]
archive = provider.upload_source_archive(root / item["logical_path"])
archive = provider.upload_source_archive(root / item["logical_path"], owner_id=f"simulation/{project_id}/original")
original = {"kind": "archive", "archive": archive.to_dict()}
else:
entrypoint, source_format = discover_gaussian_source_bundle(root)
@@ -207,7 +207,7 @@ def prepare_source(
additional_paths=[f["logical_path"] for f in project["source"]["files"]],
)
original = {"kind": "folder", "source": bundle.to_dict()}
receipt = provider.retain_source(original)
receipt = provider.retain_source(original, owner_id=f"simulation/{project_id}/original")
confirm_storage(store, project_id, provider, receipt)
retire_local_source(store, project_id, provider)
original = receipt["input"]
@@ -217,7 +217,8 @@ def prepare_source(
if prepared:
return _source_bundle_upload(provider.retained_source(prepared)["input"]["source"])
bundle = provider.normalize_archive(GaussianArchiveUpload(**original["archive"]))
prepared = provider.retain_source({"kind": "folder", "source": bundle.to_dict()})
prepared = provider.retain_source({"kind": "folder", "source": bundle.to_dict()},
owner_id=f"simulation/{project_id}/prepared")
store.update_source_storage(project_id, prepared_receipt=prepared)
return bundle
+6 -1
View File
@@ -82,8 +82,13 @@ class BimModuleSurface:
)
services = None
try:
from k1link.simulation.gaussian_pipeline_gateway import configured_gaussian_pipeline_gateway
gaussian = configured_gaussian_pipeline_gateway()
services = HostServices(
ProjectStore(root / "documents"), copies, BoundWorker(binding)
ProjectStore(root / "documents"), copies, BoundWorker(binding),
gaussian_endpoint=gaussian.endpoint if gaussian else None,
gaussian_token_file=gaussian.token_file if gaussian else None,
)
application = create_host_app(services, authorize_operator)
except BaseException:
+3 -3
View File
@@ -165,7 +165,7 @@ class _ReadyProvider:
def require_source_retention(self):
pass
def retain_source(self, original):
def retain_source(self, original, *, owner_id=None):
return {"schema_version": "gaussian-pipeline.source-receipt/v1",
"source_id": "src-" + "a" * 64, "retention": "independent-of-jobs",
"verified_at_utc": "2026-11-07T00:00:00Z", "input": copy.deepcopy(original)}
@@ -972,7 +972,7 @@ def test_wrong_or_incomplete_worker_receipt_never_removes_local_files(tmp_path):
from k1link.simulation.source_retention import prepare_source
store, project_id, provider = _retention_fixture(tmp_path)
original = provider.retain_source
def wrong_receipt(value):
def wrong_receipt(value, *, owner_id=None):
receipt = original(value)
receipt["input"]["source"]["members"][0]["sha256"] = "0" * 64
return receipt
@@ -1033,7 +1033,7 @@ def test_archive_is_retained_before_normalization_failure(tmp_path):
offset=0, payload=b"test")
store.begin_build(project["project_id"])
provider = _ReadyProvider()
provider.upload_source_archive = lambda path: GaussianArchiveUpload(
provider.upload_source_archive = lambda path, **kwargs: GaussianArchiveUpload(
"archive-id", "scene.zip", "zip", hashlib.sha256(b"test").hexdigest(), 4)
def failed(_archive):
assert not (store.source_root(project["project_id"]) / "scene.zip").exists()
Generated
+4 -4
View File
@@ -479,8 +479,8 @@ wheels = [
[[package]]
name = "nodedc-bim-module"
version = "0.2.15"
source = { path = "vendor/bim/nodedc_bim_module-0.2.15-py3-none-any.whl" }
version = "0.2.18"
source = { path = "vendor/bim/nodedc_bim_module-0.2.18-py3-none-any.whl" }
dependencies = [
{ name = "fastapi" },
{ name = "httpx" },
@@ -488,7 +488,7 @@ dependencies = [
{ name = "uvicorn" },
]
wheels = [
{ filename = "nodedc_bim_module-0.2.15-py3-none-any.whl", hash = "sha256:d650c84ed3d7d8a29f53b6dbdbd0d9d84aaa4bf1e181d67ca73a80007ced3457" },
{ filename = "nodedc_bim_module-0.2.18-py3-none-any.whl", hash = "sha256:ce8ac68f63130a4344436761c0920e96deef940a5343cd99ca0f6b78dacecfc9" },
]
[package.metadata]
@@ -561,7 +561,7 @@ requires-dist = [
{ name = "httpx", specifier = ">=0.28,<1" },
{ name = "lz4", specifier = ">=4.4,<5" },
{ name = "missioncore-plugin-sdk", editable = "packages/plugin-sdk" },
{ name = "nodedc-bim-module", path = "vendor/bim/nodedc_bim_module-0.2.15-py3-none-any.whl" },
{ name = "nodedc-bim-module", path = "vendor/bim/nodedc_bim_module-0.2.18-py3-none-any.whl" },
{ name = "paho-mqtt", specifier = ">=2.1,<3" },
{ name = "pillow", specifier = ">=12,<13" },
{ name = "pyyaml", specifier = ">=6.0,<7" },
+13 -12
View File
@@ -1,18 +1,18 @@
{
"schema_version": "missioncore.bim-client-release/v1",
"repository": "https://git.dcserve.ru/dctouch/NODEDC_BIM_MOD",
"source_commit": "581666957ed3855906be34081f5ebdfe04307b1a",
"package": "nodedc-bim-viewer-0.2.47.tgz",
"sha256": "d02aa0731f0a341ef9141c3a47bcf87c724e208949e29ef416c334847c0dfe26",
"source_commit": "4d26fc79073d784226c11b90f60ff57b02f1bc3f",
"package": "nodedc-bim-viewer-0.2.57.tgz",
"sha256": "382aae2524663dcbabbed62af00b32fd3bb9c688b102266ab58c1d0d3648e6c8",
"types": "pass",
"contract_tests": 172,
"visual_acceptance": "KU layer notes list/tiles/gallery and exact per-project view roundtrip passed; project deletion confirmation open/cancel only; 219074194-point LAS rendered and reopened after full page reload; IAB held W and mouse drag changed heading and displayed flight speed, then Fit restored cloud overview; 2026-11-16: individual IFC translation/rotation/scale, group translation and Ctrl/Command undo checked; compact inspector has nine editable fields and no caption/section plates; window and toolbar read «Инспектор»; single shared tooltip verified in viewer and main navigation: radius 14px, blur 18px, border/outline 0, 12px text.; 0.2.46: background click cleared whole cloud and BIM group selected through tree in navigate mode; inspector and selected rows removed. Compact axis headings align on one line (verified equal top coordinate), units hidden in headings. Regression covers geometry/modifier clicks and orbit returning to its starting point.; 0.2.47: existing Cesium runtime rendered prepared BUH geometry; terrain click, marker drag and center placement changed draft coordinates, Cancel preserved project. Libre/Cesium switching and saved Cesium camera survived reload.",
"evidence": "docs/BIM_MODULE.md",
"contract_tests": 182,
"visual_acceptance": "Novinskiy UI rebuild with 15 m corridor/no vertical limit/floater cleanup; settings closed/reopened during processing; new ready scan rendered and chosen settings reopened. Exact pose/visibility retained. Prior product retired on Worker and Core.",
"evidence": "outputs/cesium-cleanup-20261116/RESULT.md",
"qualification_date": "2026-11-16",
"design_guideline_commit": "f4e7369eeccc9745c30ddf6476810ddc1efd523d",
"core_frontend_tests": 1608,
"core_frontend_failures": 0,
"validation_context": "172 module client tests; 1608 Core frontend tests; 8 shared Cesium adapter tests; architecture, typography, typecheck and production build passed.",
"validation_context": "182 client tests, types and integrated Core production build passed. Prior full-Core test counts below are historical, not rerun for this increment.",
"visual_limits": [
"Native RMB drag not independently automated; actual OrbitControls pan regression passed",
"Native OS layout switch not exercised; physical code fixtures cover Cyrillic/IME labels",
@@ -30,10 +30,11 @@
],
"source_base_commit": "2be6e9e8773cc0426a7a9aaf00935ce97e03130c",
"source_state": "committed",
"design_guideline_version": "0.7.1",
"design_guideline_source_state": "committed",
"design_guideline_version": "0.7.2",
"design_guideline_source_state": "local Window fullscreen change; exact ui-react package vendored in BIM source",
"inspector_evidence": "inspector-compact-axes.jpg (operator Codex workspace)",
"map_cesium_adapter_version": "0.1.1",
"cesium_version": "1.143.0",
"map_evidence": "docs/project-map.md in NODEDC_BIM_MOD; cesium-project-map.png and cesium-bim-placement.png in operator task workspace"
"map_cesium_adapter_version": "0.1.2",
"cesium_version": "1.147.0",
"map_evidence": "docs/project-map.md in NODEDC_BIM_MOD; cesium-project-map.png and cesium-bim-placement.png in operator task workspace",
"earlier_visual_acceptance": "KU layer notes list/tiles/gallery and exact per-project view roundtrip passed; project deletion confirmation open/cancel only; 219074194-point LAS rendered and reopened after full page reload; IAB held W and mouse drag changed heading and displayed flight speed, then Fit restored cloud overview; 2026-11-16: individual IFC translation/rotation/scale, group translation and Ctrl/Command undo checked; compact inspector has nine editable fields and no caption/section plates; window and toolbar read «Инспектор»; single shared tooltip verified in viewer and main navigation: radius 14px, blur 18px, border/outline 0, 12px text.; 0.2.46: background click cleared whole cloud and BIM group selected through tree in navigate mode; inspector and selected rows removed. Compact axis headings align on one line (verified equal top coordinate), units hidden in headings. Regression covers geometry/modifier clicks and orbit returning to its starting point.; 0.2.47: existing Cesium runtime rendered prepared BUH geometry; terrain click, marker drag and center placement changed draft coordinates, Cancel preserved project. Libre/Cesium switching and saved Cesium camera survived reload."
}
Binary file not shown.
Binary file not shown.
+11 -7
View File
@@ -1,20 +1,24 @@
{
"schema_version": "missioncore.bim-release/v1",
"repository": "https://git.dcserve.ru/dctouch/NODEDC_BIM_MOD",
"source_commit": "581666957ed3855906be34081f5ebdfe04307b1a",
"package": "nodedc_bim_module-0.2.15-py3-none-any.whl",
"sha256": "d650c84ed3d7d8a29f53b6dbdbd0d9d84aaa4bf1e181d67ca73a80007ced3457",
"python_tests": 168,
"source_commit": "4d26fc79073d784226c11b90f60ff57b02f1bc3f",
"package": "nodedc_bim_module-0.2.18-py3-none-any.whl",
"sha256": "ce8ac68f63130a4344436761c0920e96deef940a5343cd99ca0f6b78dacecfc9",
"python_tests": 175,
"node_reader_tests": 1,
"scope": "Host workspace preferences add provider-specific Cesium camera/layers; existing project and Worker contracts preserved.",
"scope": "Durable Cesium Gaussian import, source reuse, ready replacement and trajectory cleanup with pose preservation.",
"qualification_date": "2026-11-16",
"worker_source_commit": "dd201554220a10d3825b04a146f0f044f47355c5",
"worker_image": "sha256:dd987e8201391ec92cc8a6f9e10f9d4b9e50ada45fb6a68f31d2f5775925af32",
"core_adapter_tests": 2,
"notes_regression_tests": 13,
"validation_context": "168 server tests passed; Core host installed 0.2.15. Worker remains 0.2.12. Fifteen focused Core BIM/Map API checks passed.",
"validation_context": "175 module server and 29 Core simulation/adapter tests passed. Live Novinskiy replacement and retirement verified; BIM conversion Worker remains 0.2.12.",
"worker_package_version": "0.2.12",
"worker_cloud_regression_tests": 19,
"source_base_commit": "2be6e9e8773cc0426a7a9aaf00935ce97e03130c",
"source_state": "committed"
"source_state": "committed",
"core_simulation_adapter_tests": 29,
"gaussian_pipeline_runtime_commit": "6afbf43bfe77f92060e8df2b92c475cfb56ad55c",
"gaussian_pipeline_image": "sha256:e2a2ba3095f05f0f37cda115ec1d15948fb9275332e59eb9bc465c29031bb78d",
"evidence": "outputs/cesium-cleanup-20261116/RESULT.md"
}