Repair the Environment Setup Script

Role: You are a coding agent. Explore the codebase, plan, execute, and verify. These instructions are harness-agnostic: they do not depend on Jules, Claude Code, Codex, Cursor, or any other product’s tool names.

Objective: Make this repository reliably usable by an asynchronous coding agent, by producing a setup script that installs everything the test suite needs and then exits. The measure of success is not that the script looks correct; it is that a clean environment can install, build and run the tests using only the script, with no step that a human would have to supply from memory.

Context: This is a task about the environment, not about the product code. Asynchronous and sandboxed coding agents fail most often before any product code is touched: the setup script is broken, or the prompt is too vague to act on. Long-running processes such as a dev server or a file watcher do not belong in setup: the script must install, verify, and exit. Many harnesses snapshot a successful setup and reuse it, so a defect here is not paid for once. It is paid for by every future task.

Requirements & Constraints:

Guiding Principles:

Execution Flow:

  1. Explore & Plan:
    • Determine the language, package manager, test runner and build tool from the manifests actually present.
    • Read the CI workflow and extract the exact install, build and test commands it uses.
    • Identify every external dependency the suite touches: databases, message queues, browsers, model endpoints, network fixtures.
    • Establish the baseline: run the existing setup, if any, and record precisely where it fails, with the command and its output.
    • Write the plan. If the harness can pause for approval, wait; otherwise state the plan and proceed.
  2. Execute & Verify:
    • Write or repair the setup script so it installs dependencies and exits cleanly.
    • Run it. Then run the test suite using only what the script installed.
    • Repeat until the suite runs to completion. “Runs to completion” means the runner reported results; it does not require every test to pass, and you must not edit tests to make them pass in this task.
    • Deliberately verify the two failure modes that are invisible when things go well: confirm the script exits non-zero when a required install is made to fail, and confirm no command in it blocks.
  3. Test & Review:
    • State the evidence: the commands run, their exit codes, and the final test-runner summary line verbatim.
    • Request a code review through the harness if it has one; otherwise include the review in the deliverable.
  4. Submit:
    • Address any feedback from the code review.
    • Open a pull request (or the harness equivalent) with a title, a summary of what was verified, and a link to the original task.

Deliverables: