Repository navigation
Conversation
… on every manager dial
Part A — callers of the runtime-manager now send x-lantern-service-token on
every RPC (scheduler GRPCDialer, control-plane managerClient + browser-skill
dial, workflow-engine ExecTool client, CLI `vm exec`). Manager dials use TLS
when LANTERN_RUNTIME_MANAGER_TLS_CA (+ optional _CERT/_KEY) is set, insecure
in dev; in prod (LANTERN_ENV prod/production/staging) missing CA or client
cert is fatal at startup in all three services.
Part B — Wave 2 sandbox lifecycle on the existing manager Snapshot / Spawn
(restore_snapshot_id) / Stop RPCs:
- proto (add-only): VM_STATE_PAUSED=7, RuntimeScheduler.Pause/Resume/Fork,
ListResponse.Item.snapshot_id/parent_vm_id; gen/go regenerated with
protoc v6.33.4 / protoc-gen-go v1.36.11 / protoc-gen-go-grpc v1.5.1.
- scheduler: Pause (snapshot → PAUSED → stop, releases one quota slot,
idempotent), Resume (same vm_id, atomic quota reserve, release on spawn
failure), Fork (1..10, all-or-nothing quota, per-child failure release);
per-VM lifecycle lock; PAUSED holds no node capacity; Terminate of a
paused VM skips Stop and never double-frees; sched_vms gains snapshot_id
and parent_vm_id.
- control-plane: POST /v1/runtime/vms/{id}/{pause,resume,fork}, GET
returns snapshotId/parentVmId, runtime_quotas gate (402) for resume/fork,
migration 0021, stub scheduler support.
- sdk-go PauseVM/ResumeVM/ForkVM; CLI `lantern vm pause|resume|fork`.
…race, orphaned-snapshot logging - Fork: the control-plane mints one agent identity per child via agentidentity.Issue (same path as scheduleAgentSpec) and passes them in the new add-only ForkRequest.identities (ForkChild.agent_instance_id echoes each). The scheduler requires len(identities) == count (fail closed), strips LANTERN_AGENT_INSTANCE_ID/TOKEN from the copied source env and injects the child's own. runtime_vms child rows get their own agent_instance_id, and the spec env id is rewritten. - Reconcile: a resumed VM records RespawnedAt on the PAUSED→running edge. Inventory confirmations from before that edge no longer count, so a stale heartbeat cannot terminate a just-resumed VM inside reconcileGrace. - Snapshots: the manager has no delete RPC. Terminate logs "snapshot orphaned" at info once the last VM that references a snapshot is gone. ADR 0025 gains a Follow-ups bullet for DeleteSnapshot.
…shot logging # Conflicts: # docs/adr/0025-sandbox-spawn-contract-and-manager-authz.md
🔎 Codex cross-audit (agent:audit)Blocking
High
No tests run; this was a targeted diff audit. |
🛡️ Vuln scan — ❌ vulnerable dependency found |
🔷 Gemini cross-audit (agent:audit-gemini)Audit Summary:
|
Part 9 of 10 of the GA next-gen stack (split from #254 so each AI review fits its budget). Base:
ga/08-vm-identity. Merge in order with a merge commit (not squash) so the stack stays intact.Full context, verification results and needs-human list: #254 and
docs/roadmap/2026-10-nextgen-sandbox-and-harness.md.Commits in this part: