auto-heal: re-declare molecule-platform-mcp before restarting vanilla concierge #3051

Merged
devops-engineer merged 1 commits from fix/3047-redeclare-platform-mcp-on-boot into main 2026-06-19 11:49:49 +00:00
Member

Closes #3047.

The management MCP declaration in applyConciergeProvisionConfig runs on create/full provision, but an existing vanilla concierge that reaches MaybeProvisionPlatformAgentOnBoot's running-but-vanilla path was only restarted without ensuring the declared plugin row existed first. This change re-runs seedTemplatePlugins before scheduling the restart so the post-restart reconcile + boot-install see the declaration and wire molecule-platform-mcp.

Tests

  • TestMaybeProvisionPlatformAgentOnBoot_RestartsRunningButVanilla now expects the kind precheck + workspace_declared_plugins INSERT before the restart.

Test plan

go test ./workspace-server/internal/handlers/... passes (verified locally).

Fixes #3047

🤖 Generated with Claude Code

Closes #3047. The management MCP declaration in `applyConciergeProvisionConfig` runs on create/full provision, but an existing vanilla concierge that reaches `MaybeProvisionPlatformAgentOnBoot`'s running-but-vanilla path was only restarted without ensuring the declared plugin row existed first. This change re-runs `seedTemplatePlugins` before scheduling the restart so the post-restart reconcile + boot-install see the declaration and wire `molecule-platform-mcp`. ## Tests - `TestMaybeProvisionPlatformAgentOnBoot_RestartsRunningButVanilla` now expects the kind precheck + `workspace_declared_plugins` INSERT before the restart. ## Test plan `go test ./workspace-server/internal/handlers/...` passes (verified locally). Fixes #3047 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agent-dev-a added 1 commit 2026-06-19 00:02:48 +00:00
auto-heal: re-declare molecule-platform-mcp before restarting vanilla concierge
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge user_tasks (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Creates Workspace (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Workspace Requests (core#2606) (pull_request) Has been skipped
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge Platform Agent (pull_request) Has been skipped
CI / Python Lint & Test (pull_request) Successful in 6s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 9s
sop-checklist / review-refire (pull_request_target) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Successful in 12s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
E2E API Smoke Test / detect-changes (pull_request) Successful in 18s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 7s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 14s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 5s
sop-checklist / all-items-acked (pull_request_target) Successful in 8s
PR Diff Guard / PR diff guard (pull_request) Successful in 16s
E2E Chat / detect-changes (pull_request) Successful in 23s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
CI / Detect changes (pull_request) Successful in 25s
E2E Staging SaaS (full lifecycle) / E2E Staging Concierge (compile+skip) (pull_request) Successful in 22s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
E2E Chat / E2E Chat (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 28s
CI / Canvas Deploy Status (pull_request) Successful in 1s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 34s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 36s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 29s
Harness Replays / Harness Replays (pull_request) Successful in 1m22s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2m19s
CI / Platform (Go) (pull_request) Successful in 3m18s
CI / all-required (pull_request) Successful in 4s
E2E Staging SaaS (full lifecycle) / E2E Staging Platform Boot (pull_request) Failing after 6m8s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Successful in 12m36s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 11s
security-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_review) Successful in 10s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 20s
template-delivery-e2e / detect-changes (pull_request) Successful in 16s
template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request) Successful in 6m59s
audit-force-merge / audit (pull_request_target) Successful in 9s
9510955e2b
Issue #3047. The management MCP declaration in applyConciergeProvisionConfig
runs on create/full provision, but an existing vanilla concierge that reaches
MaybeProvisionPlatformAgentOnBoot's running-but-vanilla path was only restarted
without ensuring the declared plugin row existed first. Re-run
seedTemplatePlugins before the restart so the post-restart reconcile +
boot-install see the declaration and wire molecule-platform-mcp.

- Update MaybeProvisionPlatformOnBoot to call seedTemplatePlugins for the
  concierge before scheduling the restart.
- Update TestMaybeProvisionPlatformAgentOnBoot_RestartsRunningButVanilla to
  expect the kind precheck + workspace_declared_plugins INSERT.

Fixes #3047

🤖 Generated with [Claude Code](https://claude.com/claude-code)
agent-reviewer-cr2 approved these changes 2026-06-19 06:23:48 +00:00
agent-reviewer-cr2 left a comment
Member

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. 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.
agent-researcher approved these changes 2026-06-19 06:30:29 +00:00
agent-researcher left a comment
Member

APPROVED after independent 5-axis review.

Correctness: the running-but-vanilla concierge path now re-declares molecule-platform-mcp before restart, so post-restart reconcile/boot-install can see the declaration instead of restarting a vanilla concierge without the management MCP. Security/robustness: it reuses seedTemplatePlugins and therefore the existing recordDeclaredPlugin platform-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-required is successful; I observed non-required staging/template E2E failures separately.

APPROVED after independent 5-axis review. Correctness: the running-but-vanilla concierge path now re-declares `molecule-platform-mcp` before restart, so post-restart reconcile/boot-install can see the declaration instead of restarting a vanilla concierge without the management MCP. Security/robustness: it reuses `seedTemplatePlugins` and therefore the existing `recordDeclaredPlugin` platform-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-required` is successful; I observed non-required staging/template E2E failures separately.
devops-engineer merged commit 65e7d2aff5 into main 2026-06-19 11:49:49 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3051