Skip to content

Conversation

Copy link

Copilot AI commented Oct 28, 2025

Summary of Broken Tests in opencode Repository

After running the test suite, I've identified the following broken tests:

Test Failures:

  • Identify all broken tests
  • Document each broken test with details

Broken Tests Found:

  1. test/keybind.test.ts - 1 failure

    • Test: "should parse meta/alt modifier"
    • Issue: Expected meta: true but received meta: false
    • The Keybind.parse() function is not correctly parsing the "meta" modifier
  2. test/tool/bash.test.ts - 1 failure

    • Test: "cd ../ should fail outside of project root"
    • Issue: Expected promise to reject with error about paths outside project, but it resolved successfully
    • The bash tool is not properly validating/blocking navigation outside project root
  3. test/tool/patch.test.ts - Setup error

    • Issue: Macro exception when trying to fetch https://models.dev/api.json
    • Error: "Unable to connect. Is the computer able to access the url?" (ConnectionRefused)
    • All tests in this file fail to run due to macro initialization failure
  4. test/config/config.test.ts - Setup error

    • Same issue as patch.test.ts - models.dev API connection failure
  5. test/session/retry.test.ts - Setup error

    • Same issue - models.dev API connection failure
  6. test/session/session.test.ts - Setup error

    • Same issue - models.dev API connection failure
  7. test/snapshot/snapshot.test.ts - Setup error

    • Same issue - models.dev API connection failure

Root Cause Analysis:

Network Connection Issue (5 test files affected):

  • The src/provider/models.ts file uses a macro that attempts to fetch data from https://models.dev/api.json
  • This macro executes at compile/load time: import { data } from "./models-macro" with { type: "macro" }
  • The connection is refused, causing all test files that import this module (directly or indirectly) to fail

Code Logic Issues (2 test files with actual test failures):

  • Keybind parser doesn't recognize "meta" modifier
  • Bash tool doesn't validate paths outside project root
Original prompt

what tests are broken?


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants