Skip to content

chore(deps): pin tree-sitter packages and make environment-sensitive tests hermetic #670

Closed

Description

@dan-petty

Summary

Found in the release/v0.2.23 review (line numbers at 7fdaa9d).

  1. The tree-sitter packages are not pinned. The new tree-sitter core and 12 grammar packages use open >= ranges, while every other runtime dependency is pinned with == (pyproject.toml:43-55). uv.lock resolves them at the floor, but a wheel or uv tool install has no lock. It will pick up future py-tree-sitter releases and grammar ABI changes, which have broken APIs before.
  2. Three tests fail when a GitHub token is in the environment. They read the ambient GH_TOKEN or GITHUB_TOKEN, and all three pass once it is unset:
    • tests/test_devcontainer.py::test_plaintext_gh_tokens_are_moved_once_the_keyring_opens
    • tests/test_subprocess_env_boundary.py::test_run_subprocess_forwards_tokens_to_gh
    • tests/test_subprocess_env_boundary.py::test_run_subprocess_forwards_explicit_env_devops_token
  3. One test fails when run as root. tests/test_sandbox_logs.py::test_archive_incident_records_archive_error relies on a read-only directory refusing writes, which root ignores.

Remediation Plan

  1. Pin the tree-sitter packages with == to the locked versions.
  2. Clear the GitHub token variables with monkeypatch.delenv in the affected tests, or in a shared fixture.
  3. Make the archive-error test inject the failure directly instead of relying on file permissions.

Activity

  1. added this to the v0.2.23 milestone on Sep 28, 2026
  2. added
    type/chore
    scope/cli
    priority/p3-low
    on Sep 28, 2026
  3. added a commit that references this issue on Sep 28, 2026
    4804cd4
  4. dan-petty commented on Sep 28, 2026

    @dan-petty
    OwnerAuthor

    Closed by #674, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

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

    priority/p3-lowscope/clitype/chore

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions