Skip to content

bug(environment): advertised package managers are missing from the Driver runtime #337

Description

@samzong

Summary

The Environment form advertises cargo, gem, and go as supported package managers, and the API accepts those values, but the Driver runtime image does not provide the corresponding toolchains.

This creates a false capability: users can save a valid-looking Environment that cannot reliably provision at runtime.

Current behavior

  • The Web package manager selector includes cargo, gem, and go.
  • The shared/API contract accepts all three values.
  • The API converts them directly into cargo install, gem install, and go install commands.
  • apps/driver/Dockerfile only explicitly installs Python/pip. It does not install or verify Rust/Cargo, Ruby/RubyGems, or Go.
  • The Cloudflare Sandbox default image documents Node.js/npm and Bun, but does not promise these three toolchains: https://developers.cloudflare.com/sandbox/configuration/dockerfile/

The failure is therefore delayed until Sandbox provisioning instead of being rejected when the Environment is created.

Root cause

The list of package managers accepted by the product is not derived from, or verified against, the capabilities guaranteed by the Driver image. The API blindly renders install commands for every enum value.

Relevant code:

  • apps/web/src/domains/environment/components/environment-form-model.ts
  • pkgs/contracts/src/environment/environment.contract.ts
  • apps/api/src/modules/environments/application/environment-config.ts
  • apps/driver/Dockerfile

Expected behavior

Every package manager offered by the Environment UI must have an end-to-end runtime contract.

For each of cargo, gem, and go, either:

  1. install, pin, and verify the required runtime/toolchain in the maintained Driver image and cover it with a real Sandbox smoke test; or
  2. remove it from create/update UI and reject new writes while preserving read compatibility for existing Environment data.

The product must not accept a package manager that the selected Driver runtime cannot execute.

Acceptance criteria

  • Create/update validation and the Web selector expose the same writable manager set.
  • Every exposed manager has a Docker build-time version check in the Driver image.
  • A real Sandbox test installs and executes one pinned package for every exposed manager.
  • Missing manager binaries fail during image/build verification, not during a user Run.
  • Existing stored values remain readable and produce an explicit actionable status if no longer writable.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions