Skip to content

fix(tests): four host-dependent tests fail on main #3594

Closed as not planned
Closed as not planned

Description

@dan-petty

Problem or Motivation

The pytest step of uv run devops ci fails with four test failures and one error. The same failures occur on the source of origin/main in a clean review checkout. They depend on the state of the host, not on the code under test:

  • tests/crypto/test_ssh.py::test_get_ssh_key_prefix_resolution expects the repository name my_plain_repo and gets devops_cli.
  • tests/telemetry/test_config_env_overrides.py::test_find_project_config_path_skips_directory finds a project configuration file that the test does not create.
  • tests/commands/test_devcontainer_install_tools_dry_run.py::test_mark_only_commands_under_global_dry_run expects a tool status line that the host does not give.
  • tests/ai/test_tool_executor_contract.py::test_the_direct_executor_refuses_a_network_profile_before_it_starts_the_tool[direct] reaches a tool path on the host without a fake, and its teardown raises one error.

The check does not pass on a machine that differs from the one where the tests were written. Found during the review of #3301.

Proposed Solution & Architectural Design

Make each test hermetic. Each test fakes the host edge it reaches, or it uses a temporary home and a temporary working directory. Each test then passes on a clean machine and in CI. Do not lower any check.

Target Subsystem

The test suite under tests/ and the pytest step of devops ci.

Activity

  1. added
    source/agent
    type/bug
    scope/tests
    status/new
    value/medium
    effort/medium
    on Nov 5, 2026
  2. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/tests. The (tests) scope of the title gives the scope.
    • Priority: P2-Medium. Failing tests block CI and waste developer time, but no production user is affected.
    • Value: Medium. Reliable CI unblocks merges and reduces wasted debug time for the team.
    • Effort: Medium. Four tests each need a different hermetic fix such as a fake or a temporary directory.
    • Possible duplicate: fix(tests): four tests fail on the devcontainer host #3590, which may ask for the same change. The model names Make the four host-dependent tests (test_get_ssh_key_prefix_resolution, test_find_project_config_path_skips_directory, test_mark_only_commands_under_global_dry_run, test_the_direct_executor_refuses_a_network_profile_before_it_starts_the_too as the change that both ask for. Both items ask for the same four tests to be made hermetic with the same acceptance criteria. A person closes one of the two if that is so.
  3. added
    priority/p2-medium
    on Nov 5, 2026
  4. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    Duplicate of #3585. This item lists the same four failing tests, and the fix design is in #3585. No pull request or branch exists for this item, so no work is lost. This item closes as not planned. If a point of this item is missing in #3585, add it there.

  5. removed
    status/new
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/testssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions