feat(simulation): integrate infrastructure jobs and semantic scene editing

Integrate infrastructure preparation and qualified map delivery with local scenes. Add semantic editing, object provenance, survey caching and operator scene tools.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:10:01 +03:00
parent 25dc0a1b44
commit f48411f8fe
116 changed files with 10690 additions and 263 deletions
+34
View File
@@ -0,0 +1,34 @@
"""Idle polls do no provider hashing; queued work still verifies current code."""
import pytest
from test_infrastructure_jobs import world
from k1link.simulation.ai_polygon import infrastructure_jobs as module
@pytest.mark.parametrize("status,released", [("running", False), ("ready", False),
("failed", True), ("ready", True)])
def test_pending_without_queue_does_not_read_source_tree(tmp_path, monkeypatch, status, released):
store = module.InfrastructureJobs(tmp_path)
monkeypatch.setattr(module, "provider_identity", lambda: "f" * 64)
row = store.request(world())
row.update(status=status, released=released)
module.write_json(store.path(row["key"]), row)
def forbidden():
raise AssertionError("idle poll hashed provider source")
monkeypatch.setattr(module, "provider_identity", forbidden)
result = store.pending()
assert result == (row if status == "running" or not released else None)
store.path(row["key"]).unlink()
assert store.pending() is None
def test_queued_work_rechecks_identity_and_rejects_source_change(tmp_path, monkeypatch):
store = module.InfrastructureJobs(tmp_path)
monkeypatch.setattr(module, "provider_identity", lambda: "f" * 64)
row = store.request(world())
assert store.pending()["key"] == row["key"]
monkeypatch.setattr(module, "provider_identity", lambda: "e" * 64)
assert store.pending() is None
assert store.get(row["key"])["status"] == "failed"