Skip to content

CI: two gem_refresh unit tests from #2251 fail on the Windows nightly (expected path not shell-quoted) #2276

In review

Description

[agent] PR shepherd: the nightly test (windows-latest, 1) job fails on main at cfc870f (scheduled CI run 45763287041, 2026-11-26 05:42 UTC). Two unit tests added by #2251 fail deterministically on Windows:

  • commands::gem_refresh::tests::a_gem_dir_without_its_gemspec_is_the_thing_to_remove (crates/socket-patch-cli/src/commands/gem_refresh.rs:2473)
  • commands::gem_refresh::tests::a_copy_no_ruby_owns_is_removed_with_its_gem_dir (crates/socket-patch-cli/src/commands/gem_refresh.rs:2413)

Cause

The tests build the expected command with dir.display(), but the code renders each path through shell_word, which single-quotes any path with a character outside [A-Za-z0-9_@%+=:,./-]. A Windows temp path contains \, so the bullet is

Run `rm -rf 'C:\Users\RUNNER~1\AppData\Local\Temp\.tmpAnH0RP\vendor/bundle/ruby/3.2.0\gems\racc-1.0.0' && bundle install`

while the test looks for the unquoted path. On Linux every path is safe unquoted, so the PR's CI (which runs no Windows tests, see #1720) passed.

Likely fix

Build the expected strings with the same quoting as the code (for example call shell_word in the tests) instead of display(). Worth a look whether the detail assertion in the second test (remove {}, {}, {} and run ...) needs the same treatment.

The other failing job in that run, hosted-e2e, is tracked in #2270.


Generated by Claude Code

Activity

  1. added
    ci-janitor
    on Nov 26, 2026
  2. mikolalysenko commented on Nov 26, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Claiming this issue. Branch: agent/fix-gem-remedy-tests-shell-quoting.


    Generated by Claude Code

  3. added 2 commits that reference this issue on Nov 26, 2026
    3034869
    ebf0df9
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

    agent:claimedagent:triagedci-janitorpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions