Skip to content

Fix Windows-only scala_cli liveness test failure in nightly - #2035

Open
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
ci-janitor/scala-cli-windows-verbatim
Open

Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
ci-janitor/scala-cli-windows-verbatim

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The nightly CI run on main has failed every night for 10+ days. The newest failure (run 42343856927, 2026-11-07) is a single test on test (windows-latest, 1):

vendor::jvm::scala_cli::tests::liveness_needs_the_committed_tree_and_no_shadowing_repository ... FAILED
panicked at crates\socket-patch-core\src\vendor\jvm\scala_cli.rs:647:57:
called `Result::unwrap_err()` on an `Ok` value: true
test result: FAILED. 6821 passed; 1 failed

The test came in with #2030 (merged 01:50 UTC today). PR and merge-queue CI run the unit tests on Linux only, so the first Windows run was tonight's nightly. It doesn't block merging, but it keeps main's nightly red and hides other regressions there.

Root cause

The Bloop-evidence half of the test builds its fixture paths from root.canonicalize(). On Windows that returns a \\?\C:\... verbatim path. Real Bloop never writes that form, and scala_evidence::is_stale removes it from the root before matching (strip_verbatim). So none of the fixture's listed sources fell under the root, project.scala looked unlisted, the evidence counted as stale and was ignored, and liveness came back Ok(true) where the test expects the scala_cli_repository_shadowed reason. This is a fixture bug, not a product bug: hosted/sbt_reads.rs tests already strip the prefix the same way.

Fix

Strip the verbatim prefix from the fixture's workspace path (crate::crawlers::sbt_evidence::strip_verbatim) so the evidence looks like what Bloop actually writes. Test-only change: 1 line changed and 2 comment lines added. No assertion is weakened.

Proof

  • cargo test -p socket-patch-core --lib scala_cli passes on Linux (14/14). On Linux the change does nothing, because strip_verbatim leaves non-verbatim paths alone.
  • cargo clippy --locked -p socket-patch-core --all-features -- -D warnings (the CI gate) is clean.
  • Windows proof: the workflow_dispatch -f os=windows run 42348791677 passed. The test is ok and test (windows-latest, 1) reported 6822 passed, 0 failed.

Tests removed or moved

None.

Other nightly reds (not addressed here)

  • e2e-extended (ubuntu, e2e_redirect_gem_build e2e_vendor_gem_build, 3.1, 2.1.4 / 1.17.3) failed on Nov 3, 5 and 6.
  • e2e (ubuntu, e2e_vex_build, poetry/pdm/hatch/pipenv) failed on Nov 6. Let the pdm e2e bootstrap install pdm 2.29.4+ #2034 may cover the pdm part.

Generated by Claude Code


Note

Low Risk
Single test fixture change with no production code paths affected.

Overview
Fixes a Windows-only failure in liveness_needs_the_committed_tree_and_no_shadowing_repository by normalizing the synthetic Bloop workspace path before building source paths in the test fixture.

The test used root.canonicalize(), which on Windows yields \\?\-prefixed paths. Production evidence handling already strips that form (scala_evidence::is_stale via strip_verbatim), so the fake evidence no longer matched listed files under the repo root, stale evidence was dropped, and liveness incorrectly returned success. The fixture now calls crawlers::sbt_evidence::strip_verbatim on the canonical workspace so paths align with what real Bloop writes—test-only; behavior on Linux is unchanged.

Reviewed by Cursor Bugbot for commit bca8248. Configure here.


Generated by Claude Code

liveness_needs_the_committed_tree_and_no_shadowing_repository (added
in #2030) has failed the nightly Windows test leg since it landed. It
builds Bloop evidence from root.canonicalize(), which on Windows
returns a \\?\ verbatim path. Real Bloop never writes that form, and
scala_evidence::is_stale strips it from the root before matching, so
none of the listed sources sat under the root, project.scala read as
unlisted, the evidence counted as stale and liveness stayed Ok(true)
where the test wants scala_cli_repository_shadowed.

Strip the verbatim prefix in the test, as hosted/sbt_reads.rs does,
so the fixture matches what Bloop writes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011f9aeQCvWWdzt7JSfNCfxa
@mikolalysenko Mikola Lysenko (mikolalysenko) added the ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf) label Nov 7, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

bugbot run


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit bca8248. Configure here.

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Windows proof: the workflow_dispatch -f os=windows CI run on this head (42348791677) passed. In test (windows-latest, 1), vendor::jvm::scala_cli::tests::liveness_needs_the_committed_tree_and_no_shadowing_repository ... ok, and the suite reported 6822 passed, 0 failed. Last night the same leg reported 1 failed. PR CI is green too.


Generated by Claude Code

@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Nov 7, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Ready for review at head bca82482.

  • CI: 98/98 checks green (55 success, 43 skipped). The Windows workflow_dispatch run 42348791677 also passed.
  • Bugbot: reviewed bca82482, no findings.
  • Reviewer note: this is a one-line, test-only fixture change in crates/socket-patch-core/src/vendor/jvm/scala_cli.rs that strips \\?\ from the canonicalized workspace path. No production code changes.

Generated by Claude Code

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Final review brief

What it does. Fixes the Windows-only nightly failure of scala_cli::tests::liveness_needs_the_committed_tree_and_no_shadowing_repository (from #2030). The test built its fake Bloop evidence from root.canonicalize(), which on Windows is a \\?\ verbatim path that real Bloop never writes, so the evidence looked stale. The fixture now strips that prefix the same way production code (scala_evidence.rs) and hosted/sbt_reads.rs tests do.

Risk: low. Test-only, 1 line of code plus 2 comment lines. No production code and no assertion changes. On Linux/macOS strip_verbatim returns the path unchanged.

Look here

  • scala_cli.rs:689: the only code change
  • sbt_evidence.rs:260: strip_verbatim (handles \\?\ and \\?\UNC\)
  • scala_evidence.rs:309: production side strips the root the same way, so the fixture now matches real input

Verified

  • Read the full diff and the test body. Every Bloop path (workspaceDir, directory, sources, the evidence file, the cached jar) derives from the same ws, so nothing is left in verbatim form.
  • CI green on bca8248 (ci-ok, clippy). The Windows workflow_dispatch run 42348791677 passed this test (6822 passed, 0 failed).
  • Bugbot: reviewed bca8248, no findings. No unresolved threads. CHANGELOG.md untouched.

Changes I made: none.

Auto-merge is armed, so approving sends this straight to the merge queue.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf) Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants