fix: pass dispatch InlineConfig to GetAgent so volumes are applied#103
Conversation
When the hub dispatches an agent, it sends an InlineConfig containing volumes, env vars, image, and other settings from templates and harness configs. The broker correctly receives this in StartOptions.InlineConfig, but AgentManager.Start() only extracted HarnessAuth from the options, discarding the rest of the InlineConfig. This caused custom volume mounts (e.g. knowledge vaults, model caches, SSH agent forwarding) to be silently dropped for hub-dispatched agents. Only the 3 standard SCION mounts appeared. Fix: pass opts.InlineConfig as the startInlineConfig to GetAgent(), which already merges it via MergeScionConfig. HarnessAuth is overlaid on top. Fixes GoogleCloudPlatform#101
PR #103 Review: fix: pass dispatch InlineConfig to GetAgent so volumes are appliedReviewer: Scion Code Review Agent Executive SummaryRisk Level: Low. This is a focused 7-line fix that aligns Critical IssuesNone. Observations1. Aliasing vs. Copying
|
…oogleCloudPlatform#103) When the hub dispatches an agent, it sends an InlineConfig containing volumes, env vars, image, and other settings from templates and harness configs. The broker correctly receives this in StartOptions.InlineConfig, but AgentManager.Start() only extracted HarnessAuth from the options, discarding the rest of the InlineConfig. This caused custom volume mounts (e.g. knowledge vaults, model caches, SSH agent forwarding) to be silently dropped for hub-dispatched agents. Only the 3 standard SCION mounts appeared. Fix: pass opts.InlineConfig as the startInlineConfig to GetAgent(), which already merges it via MergeScionConfig. HarnessAuth is overlaid on top. Fixes GoogleCloudPlatform#101
Summary
Fixes #101 — Hub-dispatched agents do not apply harness config or template volumes.
Root cause: When
AgentManager.Start()builds thestartInlineConfigto pass toGetAgent(), it only extractsHarnessAuthfromopts, discardingopts.InlineConfigentirely. The InlineConfig carries volumes, env vars, image, and other settings from templates and harness configs that the hub sends via the dispatch request.The broker correctly receives the InlineConfig from the hub (via
buildStartContextinstart_context.go), andGetAgentalready merges it viaconfig.MergeScionConfig— but the connection between the two was missing.Fix: Use
opts.InlineConfigas the base forstartInlineConfig, then overlayHarnessAuthon top. This is a 7-line change inpkg/agent/run.go.Before
After
Test plan
go build ./pkg/agent/...— compiles cleanlygo vet ./pkg/agent/...— no warnings--no-hub) still works (InlineConfig is nil, no change in behavior)