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

pantsbuild / pants / 32191341339
93%

Build:
DEFAULT BRANCH: main
Ran 18 Aug 2026 10:19PM UTC
Jobs 11
Files 1781
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

18 Aug 2026 10:09PM UTC coverage: 92.895% (+0.008%) from 92.887%
32191341339

push

github

web-flow
write sidecar lockfile metadata files with a trailing newline (#23631)

## Problem

Sidecar `*.lock.metadata` files (written when
`[python].separate_lockfile_metadata_file` is enabled) have no final
newline.

Both write sites encode `LockfileMetadata.to_json()` directly:

```python
FileContent(
    PythonLockfileMetadata.metadata_location_for_lockfile(req.lockfile_dest),
    metadata.to_json(with_description=descr).encode(),
)
```

and `to_json` is a bare `json.dumps(metadata_dict, ensure_ascii=True,
indent=2)`, which does not emit a trailing newline. The embedded-header
path never hit this because `add_header_to_lockfile` splices the
metadata into the lockfile with its own newlines.

The result is that `git diff` reports `\ No newline at end of file` on
every regenerated metadata file, and any repo-wide end-of-file fixer
(pre-commit's `end-of-file-fixer`, `editorconfig`, prettier) rewrites
them — so they churn back and forth between `generate-lockfiles` runs
and commits.

39 of the 53 `*.lock.metadata` files checked into this repo are
currently missing the newline.

## Fix

- Append the newline at both write sites (`generate_pex_lockfile` and
`generate_uv_lockfile`).
- Update the 39 bundled `*.lock.metadata` files so they match what
regeneration now produces.
- Assert the trailing newline in the existing sidecar tests.

The read path is unaffected — it goes through `json.loads`, which
tolerates trailing whitespace.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01MNsGW5gQyiVuFAD64LEWVs

---------

Co-authored-by: Jason Barnett <jason.barnett@altana.ai>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

6 of 6 new or added lines in 1 file covered. (100.0%)

95648 of 102964 relevant lines covered (92.89%)

3.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_9/10 - 32191341339.1 18 Aug 2026 10:30PM UTC 1225
54.05
GitHub Action Run
2 test_python_linux_x86_64_7/10 - 32191341339.2 18 Aug 2026 10:30PM UTC 1219
50.62
GitHub Action Run
3 test_python_linux_x86_64_4/10 - 32191341339.3 18 Aug 2026 10:30PM UTC 1245
58.86
GitHub Action Run
4 test_python_linux_x86_64_1/10 - 32191341339.4 18 Aug 2026 10:26PM UTC 1215
48.97
GitHub Action Run
5 test_python_linux_x86_64_2/10 - 32191341339.5 18 Aug 2026 10:22PM UTC 1215
58.69
GitHub Action Run
6 test_python_linux_x86_64_0/10 - 32191341339.6 18 Aug 2026 10:27PM UTC 1236
57.56
GitHub Action Run
7 test_python_linux_arm64 - 32191341339.7 18 Aug 2026 10:19PM UTC 1196
52.75
GitHub Action Run
8 test_python_linux_x86_64_8/10 - 32191341339.8 18 Aug 2026 10:29PM UTC 1214
52.79
GitHub Action Run
9 test_python_linux_x86_64_3/10 - 32191341339.9 18 Aug 2026 10:27PM UTC 1213
52.45
GitHub Action Run
10 test_python_linux_x86_64_5/10 - 32191341339.10 18 Aug 2026 10:22PM UTC 1230
60.27
GitHub Action Run
11 test_python_linux_x86_64_6/10 - 32191341339.11 18 Aug 2026 10:24PM UTC 1211
50.05
GitHub Action Run
Source Files on build 32191341339
  • Tree
  • List 1781
  • Changed 6
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32191341339
  • e6d5d3b6 on github
  • Prev Build on main (#32152824682)
  • Next Build on main (#32217438924)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc