feat: SSOT compute metadata endpoint + canvas consumption (#2489) #2510

Closed
agent-dev-a wants to merge 0 commits from feat/2489-ssot-compute-metadata into main
Member

Closes #2489

Backend:

  • Adds GET /compute/metadata public endpoint that returns cloud-provider + instance-type allowlists and defaults (workspace-server SSOT).
  • Registers route in router.go (public, no auth).
  • Adds handler tests + router contract tests.

Frontend (pending MiniMax):

  • Canvas ContainerConfigTab.tsx will fetch from this endpoint instead of hardcoding INSTANCE_TYPES_BY_PROVIDER, DEFAULT_INSTANCE_BY_PROVIDER, and CLOUD_PROVIDER_OPTIONS.

Test plan:

  • go test ./workspace-server/internal/handlers -run TestComputeMetadata
  • go test ./workspace-server/internal/router -run TestComputeMetadata
  • Canvas build + manual verify provider/instance dropdowns still populate correctly.
Closes #2489 **Backend:** - Adds `GET /compute/metadata` public endpoint that returns cloud-provider + instance-type allowlists and defaults (workspace-server SSOT). - Registers route in `router.go` (public, no auth). - Adds handler tests + router contract tests. **Frontend (pending MiniMax):** - Canvas `ContainerConfigTab.tsx` will fetch from this endpoint instead of hardcoding `INSTANCE_TYPES_BY_PROVIDER`, `DEFAULT_INSTANCE_BY_PROVIDER`, and `CLOUD_PROVIDER_OPTIONS`. **Test plan:** - `go test ./workspace-server/internal/handlers -run TestComputeMetadata` - `go test ./workspace-server/internal/router -run TestComputeMetadata` - Canvas build + manual verify provider/instance dropdowns still populate correctly.
agent-dev-a added 2 commits 2026-06-10 05:36:12 +00:00
Exposes cloud-provider + instance-type allowlists and defaults via a
public, unauthenticated endpoint so the canvas ContainerConfigTab (and
any future client) can render selectors from the same source the PATCH
validator uses. Eliminates the drift risk where the UI offers an
instance the backend rejects.

- Adds ComputeMetadata handler in workspace_compute.go
- Registers /compute/metadata in router.go (public, no auth)
- Adds TestComputeMetadata_ReturnsProviderAllowlist

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
test(router): add compute_metadata route tests (#2489)
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 4s
Harness Replays / detect-changes (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
E2E Chat / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 2s
E2E API Smoke Test / detect-changes (pull_request) Successful in 14s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 3s
sop-checklist / review-refire (pull_request_target) Has been skipped
gate-check-v3 / gate-check (pull_request_target) Successful in 7s
security-review / approved (pull_request_target) Failing after 6s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
CI / Canvas (Next.js) (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
qa-review / approved (pull_request_target) Failing after 9s
CI / Canvas Deploy Status (pull_request) Successful in 1s
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)
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 19s
sop-checklist / all-items-acked (pull_request_target) Successful in 43s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 55s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 1m2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 2m8s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 1m41s
CI / Platform (Go) (pull_request) Successful in 4m52s
CI / all-required (pull_request) Successful in 2s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 6m15s
audit-force-merge / audit (pull_request_target) Has been skipped
485887bd0a
Pins the public /compute/metadata contract:
- reachable without auth
- returns expected provider shape + instance counts
- cross-checks against in-tree allowlist

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
agent-dev-a closed this pull request 2026-06-10 05:50:17 +00:00
Some checks are pending
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
CI / Python Lint & Test (pull_request) Successful in 4s
Harness Replays / detect-changes (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 7s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
E2E Chat / detect-changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 2s
E2E API Smoke Test / detect-changes (pull_request) Successful in 14s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 10s
CI / Detect changes (pull_request) Successful in 15s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
E2E Chat / E2E Chat (pull_request) Successful in 3s
sop-checklist / review-refire (pull_request_target) Has been skipped
gate-check-v3 / gate-check (pull_request_target) Successful in 7s
security-review / approved (pull_request_target) Failing after 6s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
CI / Canvas (Next.js) (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
qa-review / approved (pull_request_target) Failing after 9s
CI / Canvas Deploy Status (pull_request) Successful in 1s
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)
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 19s
sop-checklist / all-items-acked (pull_request_target) Successful in 43s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 55s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 1m2s
Required
Details
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 2m8s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 1m41s
CI / Platform (Go) (pull_request) Successful in 4m52s
CI / all-required (pull_request) Successful in 2s
Required
Details
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 6m15s
Required
Details
audit-force-merge / audit (pull_request_target) Has been skipped
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request)
Required

Pull request closed

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#2510