fix(e2e): satisfy MODEL_REQUIRED in peer-visibility staging gate (#2212) #2214

Merged
claude-ceo-assistant merged 1 commits from fix/peer-visibility-test-model-required-2212 into main 2026-06-04 06:19:20 +00:00
Member

What

Deterministic fix for the main-red E2E Peer Visibility (literal MCP list_peers) gate (RCA in #2212).

Root cause

tests/e2e/test_peer_visibility_mcp_staging.sh created the PARENT workspace (and each per-runtime sibling) with runtime + secrets but no model field. Staging now enforces the workspace-create contract — there is no platform-side default model for a runtime (feedback_workspace_model_required_no_platform_default, the MODEL_REQUIRED gate). So the create was rejected with MODEL_REQUIRED before the peer-visibility assertion could run.

Fix

Supply the required model on every workspace-create via a small pv_platform_model_for_runtime helper returning a platform-managed id (Molecule owns billing — no tenant key required; this gate only needs the workspace to boot + list peers, not heavy LLM work). Ids validated against the controlplane providers SSOT (internal/providers/providers.yamlruntimes.<rt>.providers[platform].models):

create runtime model SSOT entry
parent claude-code anthropic/claude-sonnet-4-6 runtimes.claude-code.providers[platform]
sibling claude-code anthropic/claude-sonnet-4-6 same
sibling hermes moonshot/kimi-k2.6 runtimes.hermes.providers[platform]
sibling openclaw moonshot/kimi-k2.6 runtimes.openclaw.providers[platform]

E2E_MODEL_SLUG still overrides for operator-dispatched runs, mirroring lib/model_slug.sh. Contract enforcement is not removed — the required field is supplied.

Verification

  • bash -n clean
  • shellcheck -S warning clean (only pre-existing SC1091/SC2329 info notices, out of the pilot's .gitea/scripts scope)
  • lint-curl-status-capture.py clean
  • Each chosen model id is a member of the corresponding [platform] provider model list in the providers SSOT → create now passes MODEL_REQUIRED.

Refs #2212.

🤖 Generated with Claude Code

## What Deterministic fix for the main-red `E2E Peer Visibility (literal MCP list_peers)` gate (RCA in #2212). ## Root cause `tests/e2e/test_peer_visibility_mcp_staging.sh` created the PARENT workspace (and each per-runtime sibling) with `runtime` + `secrets` but **no `model`** field. Staging now enforces the workspace-create contract — there is no platform-side default model for a runtime (`feedback_workspace_model_required_no_platform_default`, the MODEL_REQUIRED gate). So the create was rejected with `MODEL_REQUIRED` *before* the peer-visibility assertion could run. ## Fix Supply the required `model` on every workspace-create via a small `pv_platform_model_for_runtime` helper returning a **platform-managed** id (Molecule owns billing — no tenant key required; this gate only needs the workspace to boot + list peers, not heavy LLM work). Ids validated against the controlplane providers SSOT (`internal/providers/providers.yaml` → `runtimes.<rt>.providers[platform].models`): | create | runtime | model | SSOT entry | |---|---|---|---| | parent | `claude-code` | `anthropic/claude-sonnet-4-6` | `runtimes.claude-code.providers[platform]` | | sibling | `claude-code` | `anthropic/claude-sonnet-4-6` | same | | sibling | `hermes` | `moonshot/kimi-k2.6` | `runtimes.hermes.providers[platform]` | | sibling | `openclaw` | `moonshot/kimi-k2.6` | `runtimes.openclaw.providers[platform]` | `E2E_MODEL_SLUG` still overrides for operator-dispatched runs, mirroring `lib/model_slug.sh`. Contract enforcement is **not** removed — the required field is supplied. ## Verification - `bash -n` clean - `shellcheck -S warning` clean (only pre-existing SC1091/SC2329 info notices, out of the pilot's `.gitea/scripts` scope) - `lint-curl-status-capture.py` clean - Each chosen model id is a member of the corresponding `[platform]` provider model list in the providers SSOT → create now passes MODEL_REQUIRED. Refs #2212. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
core-devops added 1 commit 2026-06-04 05:47:11 +00:00
The `E2E Peer Visibility (literal MCP list_peers)` gate has been red on
main because tests/e2e/test_peer_visibility_mcp_staging.sh created both
the parent and the per-runtime sibling workspaces with a runtime + secrets
but NO `model` field. Staging now enforces the workspace-create contract:
there is no platform-side default model for a runtime
(feedback_workspace_model_required_no_platform_default — the MODEL_REQUIRED
gate). The create was therefore rejected with MODEL_REQUIRED before the
peer-visibility assertion could run.

Fix: supply the required `model` on every create via a small
pv_platform_model_for_runtime helper that returns a PLATFORM-MANAGED id
(Molecule owns billing — no tenant key needed; this gate only needs the
workspace to boot + list peers). Ids are validated against the controlplane
providers SSOT (internal/providers/providers.yaml runtimes.<rt>.providers
[platform].models):
  - claude-code (parent + claude-code sibling) → anthropic/claude-sonnet-4-6
  - hermes / openclaw siblings                 → moonshot/kimi-k2.6
E2E_MODEL_SLUG still overrides for operator-dispatched runs, mirroring
lib/model_slug.sh. Contract enforcement is preserved; we supply the field
rather than removing the gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
claude-ceo-assistant merged commit 274f5be98d into main 2026-06-04 06:19:20 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2214