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
fix(e2e): satisfy MODEL_REQUIRED in peer-visibility staging gate (#2212)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 3s
CI / Python Lint & Test (pull_request) Successful in 2s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 2s
CI / Detect changes (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 4s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 3s
gate-check-v3 / gate-check (pull_request_target) Successful in 4s
qa-review / approved (pull_request_target) Failing after 4s
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 / review-refire (pull_request_target) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 4s
sop-checklist / all-items-acked (pull_request_target) Successful in 4s
CI / Platform (Go) (pull_request) Successful in 1s
CI / Canvas (Next.js) (pull_request) Successful in 1s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
sop-tier-check / tier-check (pull_request_target) Successful in 3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
E2E API Smoke Test / detect-changes (pull_request) Successful in 20s
E2E Chat / detect-changes (pull_request) Successful in 21s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 10s
E2E Chat / E2E Chat (pull_request) Successful in 1s
CI / all-required (pull_request) Successful in 4s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m0s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Successful in 1m8s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 50s
audit-force-merge / audit (pull_request_target) Successful in 24s
b55ee4705c
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