auto-heal: re-declare molecule-platform-mcp before restarting vanilla concierge #3051
Reference in New Issue
Block a user
Delete Branch "fix/3047-redeclare-platform-mcp-on-boot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #3047.
The management MCP declaration in
applyConciergeProvisionConfigruns on create/full provision, but an existing vanilla concierge that reachesMaybeProvisionPlatformAgentOnBoot's running-but-vanilla path was only restarted without ensuring the declared plugin row existed first. This change re-runsseedTemplatePluginsbefore scheduling the restart so the post-restart reconcile + boot-install see the declaration and wiremolecule-platform-mcp.Tests
TestMaybeProvisionPlatformAgentOnBoot_RestartsRunningButVanillanow expects the kind precheck +workspace_declared_pluginsINSERT before the restart.Test plan
go test ./workspace-server/internal/handlers/...passes (verified locally).Fixes #3047
🤖 Generated with Claude Code
APPROVED. 5-axis review on head
9510955e.Correctness: in the running-but-vanilla concierge path, the code now calls seedTemplatePlugins for the management MCP before scheduling the restart. That addresses the stated gap: an existing vanilla concierge gets the declared plugin row before reconcile/boot-install runs after restart. The existing identity-present path still returns without restart, and non-running/full provision behavior is unchanged.
Robustness: seedTemplatePlugins already validates platform kind and is idempotent via the declared-plugin insert path; partial skip is logged clearly without blocking the restart, which matches the previous best-effort auto-heal style. Test coverage updates the running-but-vanilla case to require the kind precheck and INSERT before restart.
Security/performance/readability: no new auth surface; only declares the existing entitled platform MCP for a platform workspace. Extra DB work occurs only in the auto-heal restart path. Comments/logs accurately describe the ordering. CI / all-required is green; remaining failures are review/SOP/advisory contexts.
APPROVED after independent 5-axis review.
Correctness: the running-but-vanilla concierge path now re-declares
molecule-platform-mcpbefore restart, so post-restart reconcile/boot-install can see the declaration instead of restarting a vanilla concierge without the management MCP. Security/robustness: it reusesseedTemplatePluginsand therefore the existingrecordDeclaredPluginplatform-only entitlement gate. Performance: one upsert only on the missing-identity restart path. Readability/tests: clear intent and the boot test pins the pre-restart declaration.CI / all-requiredis successful; I observed non-required staging/template E2E failures separately.