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:
@@ -260,7 +260,10 @@ def main():
|
||||
}
|
||||
from k1link.simulation.ai_polygon.route_preparation import provider_identity
|
||||
|
||||
from infrastructure_preparer import capability, prepare_infrastructure, reconcile
|
||||
|
||||
hello = {
|
||||
"infrastructure_provider_sha256": capability(args.state),
|
||||
"route_provider_sha256": provider_identity(),
|
||||
"worker_id": "worker-006-ai-polygon",
|
||||
"instance_id": instance,
|
||||
@@ -346,8 +349,10 @@ def main():
|
||||
connect()
|
||||
editor_marker = args.state / "editor-active.json"
|
||||
route_marker = args.state / "route-active.json"
|
||||
infrastructure_marker = args.state / "infrastructure-active.json"
|
||||
while True:
|
||||
try:
|
||||
reconcile(client, infrastructure_marker, hello)
|
||||
# A prior coordinator's Windows Job killed all native descendants on exit.
|
||||
# Retain the marker until Core accepts that resource-release receipt.
|
||||
if route_marker.exists():
|
||||
@@ -361,6 +366,9 @@ def main():
|
||||
polled = client.request("/worker/poll", {"instance_id": instance})
|
||||
except Exception:
|
||||
connect()
|
||||
# A pending receipt may fail while registration succeeds. Bound
|
||||
# retries without discarding its marker or busy-looping on Core.
|
||||
time.sleep(3)
|
||||
continue
|
||||
if polled["action"] == "idle":
|
||||
time.sleep(0.5)
|
||||
@@ -386,6 +394,9 @@ def main():
|
||||
editor_job.close()
|
||||
# Receipt is sent at the top of the loop, after the Job is closed.
|
||||
continue
|
||||
if polled["action"] == "infrastructure-analysis":
|
||||
prepare_infrastructure(client, polled["analysis"], args.state, infrastructure_marker, hello)
|
||||
continue
|
||||
run = polled["run"]
|
||||
if run.get("clock") != "realtime":
|
||||
raise RuntimeError("A realtime worker cannot execute lockstep work")
|
||||
|
||||
Reference in New Issue
Block a user