Repository navigation
feat(vm): update Go slot services without VM rebuild - #600
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 5 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
| digest.update(name).update(data) | ||
| pushed.push(name) | ||
| } | ||
| return { pushed, digest: digest.digest('hex') } |
There was a problem hiding this comment.
Cluster binary digest is out of scope
High Severity
pushSlotBinaries updates a digest hasher that is created only inside pushSlotFiles, so the first digest.update throws ReferenceError. Cluster start, reload, and the new telemetry fleet action all call this path, so Go payloads never publish and those flows fail immediately.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
| const pushed = [] | ||
| for (const name of SLOT_BINARIES) { | ||
| const local = | ||
| process.env[name === 'kin-worker' ? 'KIN_WORKER_BIN' : 'KIN_EGRESS_BIN'] || path.join(projectRoot, 'bin', name) |
There was a problem hiding this comment.
ARM64 cluster live bins use host arch
High Severity
Live slot-bin publish reads KIN_WORKER_BIN / KIN_EGRESS_BIN (or bin/), not KIN_CLUSTER_WORKER_BIN / KIN_CLUSTER_EGRESS_BIN. On an ARM64 control plane those host binaries are not the amd64 payloads nodes already require for image builds, so published kin-worker / kin-egress fail with exec format errors.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
| const started = await ensureProxyEgress(projectRoot, vm.proxy) | ||
| if (!started?.ok) return { ok: false, action: 'egress_start_failed', error: started?.error || 'kin-egress failed' } | ||
| } | ||
| return { ...telemetry, egress: 'restarted' } |
There was a problem hiding this comment.
Local egress restart reuses the old process
High Severity
The local telemetry action SIGTERMs kin-egress and then calls ensureProxyEgress without waiting for that PID to exit. startEgressProcess still sees a live helper with an unchanged config and returns reused: true, so the new binary never execs even though the report says egress: 'restarted'.
Triggered by learned rule: kin-egress reload waits for old process exit
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
| action: telemetryEnabled === true ? 'restarted' : 'stopped', | ||
| remote_dir: remoteDir, | ||
| binary_digest: binaries.digest || null, | ||
| } |
There was a problem hiding this comment.
Cluster service update skips live egress spec
High Severity
restartRemoteServices writes slot-bin then only docker restarts the existing egress helper and execs telemetry from /opt/kin-live (KVM: /opt/kin-payload/opt/kin-live). It never runs ensureRemoteEgress, so pre-layout-3 helpers keep the image Cmd and have no slot-bin bind. pkill still stops the old sidecar, and startRemoteTelemetry swallows exec failures, so telemetry can stay down while the action reports success.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
| settings_json: written.settings || null, | ||
| claude_setting: written.claude_setting || '', | ||
| kin_seed: written.kin_seed || null, | ||
| service, |
There was a problem hiding this comment.
Seed save toasts success after service failure
Medium Severity
PUT /seed-settings still returns HTTP 200 ok when the nested telemetry fleet update fails, and the seed card always toasts 已播种. Operators can believe the sidecar restarted after toggling telemetry even though service.ok is false.
Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.
Co-authored-by: ted <kuhlmangarry24@gmail.com>
1cc09a3 to
848c774
Compare


Changes
slot-binmounts for Docker and KVM cluster slots; publishkin-workerandkin-egressinto them without rebuilding the VM.claude.settingdefault and telemetry operations documentation.Verification
npm run build:workerandnpm run build:egressnode --test test/unit/cluster-placement.test.mjs test/unit/remote-slot-restart-loop.test.mjs test/unit/telemetry-status.test.mjs test/unit/seed-policy.test.mjs test/unit/slot-seed.test.mjsnpx biome check ...and shell/Node syntax checksNo remote deployment was performed.
Note
Medium Risk
Touches slot mount layout (may recreate cluster containers), upgrade/install failure modes, and per-slot service restarts across local and remote nodes; VM kernels and credentials are intentionally untouched but mis-pushed binaries could break telemetry/egress per slot.
Overview
Adds persistent per-slot
slot-binmounts (layout v3) sokin-workerandkin-egresscan be republished from the control-plane image at/opt/kin-livewithout rebuilding VM containers or bouncing the Rust kernel. Cluster Docker/KVM slots and remotekin-egresspick up new binaries viapushSlotBinaries; egress container identity now includes the binary digest.Introduces a
telemetryfleet action (POST /vms/fleet-update,scripts/fleet-services.mjs) that copies refreshed Go payloads, syncs run/seed files, stops/restarts only the telemetry child andkin-egress. Install/upgrade (refresh_slot_services,panel-upgrade.sh) run this after a healthy control-plane restart. Seed-settings PUT toggling telemetry (or explicit restart) uses the same path instead of a full slot reload.Adds an editable
claude.settingseed field (defaultCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1), written besidesettings.json, exposed on panel seed-settings GET/PUT and the seed-policy UI, plusdocs/TELEMETRY.mdand API notes.Reviewed by Cursor Bugbot for commit a7c3dfb. Configure here.