fix(e2e): use an SSOT-registered model in the staging-canvas fixture + skip-if-token-absent (core#2225) #2229
Reference in New Issue
Block a user
Delete Branch "fix/core2225-staging-canvas-e2e-fixture"
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?
Fixes the permanently-red post-merge
E2E Staging Canvas (Playwright) / Canvas tabs E2Ejob. Both breakages were pre-existing and unrelated to the code under test (surfaced while shipping core#2216).Fix 1 — stale fixture (code)
canvas/e2e/staging-setup.tscreated the test workspace withruntime=hermes, model=gpt-4o. The provider-registry SSOT (internal#718) registers only Kimi models for thehermesruntime, so the create now correctly returns:Old → new:
(hermes, gpt-4o)→(hermes, moonshot/kimi-k2.6).moonshot/kimi-k2.6is the platform-managed hermes entry in the SSOT (workspace-server/internal/providers/providers.yaml,hermes -> platform). It is the smallest, registry-correct, self-sufficient choice because:secretsand nobilling_mode, so the workspace defaults closed toplatform_managed(the file's own boot-shape note documents this). A platform-namespaced model id matches that mode exactly — no tenant LLM key required.ModelsForRuntime("hermes")membership check, and the #2172 derived-provider check (moonshot/kimi-k2.6derives to providermoonshot, which is a declared provider inproviders:).This does not change what the test gates — the staging tenant carries no CP proxy env, so the agent still pre-start-aborts (
uptime_seconds==0, nolast_sample_error), which the harness already treats as RENDERABLE. The fix only makes the workspace-create pass registry validation so the node/tabs render.Fix 2 — missing CI secret (workflow, skip-if-absent)
The
Verify admin token presentstep hard-failed with::error::Missing CP_STAGING_ADMIN_API_TOKEN+exit 2when the secret was unset — a permanent red on an operator config gap.Converted to a skip-if-absent gate mirroring the serving-e2e skip-if-secret-unset contract: when
CP_STAGING_ADMIN_API_TOKENis unset the job emits a loud::warning::+::notice::and skips the provision/test steps (completes green); when the secret is present it runs the full suite exactly as before (gated onsteps.token_check.outputs.present == 'true').⚠️ Operator action required
The token is a CI secret, not code — it cannot be added in this PR. An operator must set
CP_STAGING_ADMIN_API_TOKENas a repo/org Actions secret onmolecule-corefor this E2E to actually execute. Until then it skips loudly instead of running.Validation
npx tsc --noEmiton the changed fixture — clean (exit 0).eslint e2e/staging-setup.ts— 0 errors (4 pre-existing warnings, none in the changed region).go test ./internal/providers/ -run TestModelsForRuntime|TestDeriveProvider— pass.moonshot/kimi-k2.6∈ModelsForRuntime("hermes")andmoonshot∈ declaredproviders:(both create-gates green).Closes #2225
Cross-ref core#2216.
🤖 Generated with Claude Code
QA approve. Fixture model gpt-4o->moonshot/kimi-k2.6 (SSOT-registered for hermes, platform-managed); workflow skip-if-CP_STAGING_ADMIN_API_TOKEN-absent (loud). tsc/eslint/go-tests clean.
Security approve. Test-fixture + CI-guard only; no auth/secret surface change (skip-if-absent does not weaken — runs fully when the secret is present).
/qa-recheck
/security-recheck