• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 25950947380
93%

Build:
DEFAULT BRANCH: main
Ran 16 May 2026 03:10AM UTC
Jobs 12
Files 1752
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 May 2026 02:53AM UTC coverage: 92.785% (-0.002%) from 92.787%
25950947380

push

github

web-flow
Fix: IntrinsicError when a non-directory PATH entry is used with `system_binary` (#23327)

Closes #21990

## Problem

Pants crashed with `IntrinsicError: Not a directory (os error 20)` when
a
`system_binary` target (or any binary lookup) included a non-directory
entry in
its search path. Two distinct shapes of the same underlying bug:

1. **`foo/bar` on PATH where `foo` is a file**. Calling
`path_metadata_request`
on `foo/bar` hits `ENOTDIR` in the OS. That error was not caught in the
Rust
   layer, so it surfaced as an uncaught `IntrinsicError`.

2. **A symlink-to-file on PATH** — the case from the issue report. The
first
`path_metadata_request` succeeds and returns
`PathMetadataKind::SYMLINK`,
but the Python code then tried to look up `symlink/binary_name`, which
also
   hits `ENOTDIR`.

## Fix

**`src/rust/fs/src/posixfs.rs`** — `path_metadata` now accepts a
`follow_symlinks`
flag. When `true`, it calls `tokio::fs::metadata` (which follows
symlinks) instead
of `tokio::fs::symlink_metadata`, so a symlink-to-directory appears as a
`Directory` rather than a `Symlink`. It also continues to treat
`ENOTDIR` as absent
(`Ok(None)`), fixing the file-component-on-PATH crash.

**`src/rust/fs/src/lib.rs`** — The `Vfs` trait's `path_metadata`
signature is
updated to accept `follow_symlinks: bool`. The in-memory `DigestTrie`
implementation
accepts but ignores the flag.

**`src/rust/engine/src/nodes/path_metadata.rs`** — `PathMetadataNode`
now carries
`follow_symlinks` and passes it through to the VFS call.

**`src/rust/engine/src/intrinsics/digests.rs`** — The
`path_metadata_request`
intrinsic reads `follow_symlinks` from the Python `PathMetadataRequest`
object and
passes it to `PathMetadataNode`.

**`src/python/pants/engine/fs.py`** — `PathMetadataRequest` gains a
`follow_symlinks: bool = False` field.

**`src/python/pants/core/util_rules/system_binaries.py`** — The initial
lookup of
each PATH entry uses `follow_symlinks=True`. A symlink-to-directory is
returne... (continued)

23 of 23 new or added lines in 3 files covered. (100.0%)

5 existing lines in 1 file now uncovered.

92962 of 100191 relevant lines covered (92.78%)

4.02 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
98.49
-0.75% src/python/pants/engine/fs_test.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_7/10 - 25950947380.1 16 May 2026 03:28AM UTC 1208
51.04
GitHub Action Run
2 test_python_linux_x86_64_6/10 - 25950947380.2 16 May 2026 03:20AM UTC 1198
49.31
GitHub Action Run
3 test_python_linux_x86_64_2/10 - 25950947380.3 16 May 2026 03:20AM UTC 1207
58.61
GitHub Action Run
4 test_python_linux_x86_64_3/10 - 25950947380.4 16 May 2026 03:24AM UTC 1203
53.62
GitHub Action Run
5 test_python_linux_x86_64_0/10 - 25950947380.5 16 May 2026 03:23AM UTC 1222
56.23
GitHub Action Run
6 test_python_linux_x86_64_9/10 - 25950947380.6 16 May 2026 03:21AM UTC 1213
53.64
GitHub Action Run
7 test_python_macos14_arm64 - 25950947380.7 16 May 2026 03:10AM UTC 1186
52.05
GitHub Action Run
8 test_python_linux_x86_64_4/10 - 25950947380.8 16 May 2026 03:28AM UTC 1237
59.08
GitHub Action Run
9 test_python_linux_x86_64_5/10 - 25950947380.9 16 May 2026 03:21AM UTC 1217
59.13
GitHub Action Run
10 test_python_linux_arm64 - 25950947380.10 16 May 2026 03:29AM UTC 1186
52.04
GitHub Action Run
11 test_python_linux_x86_64_8/10 - 25950947380.11 16 May 2026 03:25AM UTC 1205
53.07
GitHub Action Run
12 test_python_linux_x86_64_1/10 - 25950947380.12 16 May 2026 03:23AM UTC 1202
49.3
GitHub Action Run
Source Files on build 25950947380
  • Tree
  • List 1752
  • Changed 8
  • Source Changed 3
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25950947380
  • 5dd30b2f on github
  • Prev Build on main (#25932768139)
  • Next Build on main (#25981274787)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc