Skip to content

[BUG] Version string is accepted but never validated against installed manifest #8

Description

@ombagal777

Description

The version field in the execution request is required and validated by Zod as a non‑empty string, but the server never checks whether this version exists in the installed language manifest. A request can specify an arbitrary version (e.g., python3 @ 99.0), and the engine will still run whichever version is currently installed, while echoing the requested version back in the response.

Impact

  • Callers cannot rely on the version they requested actually being used.
  • Silent mismatch between requested version and executed runtime can cause subtle behavior differences, especially for languages with fast‑moving ecosystems (Python, Node, Rust).
  • Makes it hard to do reproducible, pinned builds or judge runs.

Expected Behavior

  • The server validates the requested version against the installed manifest for the given language.
  • If the version is not installed or not defined in the manifest, the request should fail with a clear error (e.g., HTTP 400 + structured error code).

Actual Behavior

  • The server accepts any non‑empty version string.
  • Execution uses whatever version is installed, and the response still echoes the user‑provided version.

Possible Solution

  • Load the language manifest / langMeta for the requested language.
  • Validate that payload.version matches one of the installed versions for that language.
  • If not found, return a validation error such as:
    • {"error": "VERSION_NOT_INSTALLED", "details": { "language": "python3", "version": "99.0" }}
  • Optionally, include a list of available versions in the error response to improve DX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions