Skip to content

Pin v0.42.3 fixtures against line-ending rewrite; cite the clean confirming CI run - #1080

Merged
fdaviddpt merged 2 commits into
mainfrom
fix/1070
Nov 1, 2026
Merged

fdaviddpt merged 2 commits into
mainfrom
fix/1070

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

Closes #1070.

Two carried self-review findings from the v0.42.3 release audit (#1002 round 3), curated into #1070.

1. Fixture byte-identity was not actually pinned. tests/fixtures/v0_42_3/{lib-detach.sh,lib-detach-pidwrap.sh,windows-hidden-run.vbs} must stay byte-for-byte identical to the v0.42.3 tag forever (see NOTE.md in that directory), but nothing pinned them against git's line-ending normalization on checkout. The three tests exercising them are xfail(strict=True), which only requires some failure to stay green, not the documented one -- so a future checkout-time corruption (e.g. a Windows checkout converting LF to CRLF) could silently satisfy the same xfail markers with a different failure, leaving CI green with no signal the invariant had broken.

Fixed with two independent guards:

  • .gitattributes pins the three paths -text, so git never normalizes their line endings on any checkout, on any platform.
  • tests/test_v0_42_3_fixture_integrity_1070.py adds a committed sha256 per fixture (checked on every platform, not just Windows) plus a git check-attr positive control confirming the .gitattributes mechanism is actually wired, independent of whether the bytes happen to be intact today.

Verified non-vacuous: git check-attr --source=4dd52ff against the pre-fix tree confirms the new pinning test would have failed without this fix, and a hand-corrupted LF->CRLF copy's hash differs from the pinned one.

2. The CI citation mixed a contaminated run with a clean one, uncited. docs/windows.md and three xfail reason= strings in tests/test_windows_real_wscript_v0_42_3_1002.py cited only CI run #38049234152 as OBSERVED evidence for the v0.42.3 traps. That run is accurate but also carried two unrelated test-isolation bugs (a TMPDIR cache leak, a repo-mutation-guard trip) fixed on a later commit of the same PR (#1010). A clean confirming run on the same PR head, #38051416393, existed and was not cited anywhere.

Fixed by adding the clean run's id alongside the existing citation in both docs/windows.md and all three reason= strings, so a future reader is not left cross-referencing the contaminated run's own unrelated failures against the genuine trap evidence. Both CI run numbers were independently verified against the real runs (supertool gh-run) before citing them.

Test plan

  • RED (before .gitattributes existed): python3 -m pytest tests/test_v0_42_3_fixture_integrity_1070.py -q -> 3 failed, 3 passed in 0.29s (the 3 check-attr assertions failed as expected; the 3 hash checks passed since bytes were already intact).
  • GREEN (after .gitattributes added): same command -> 6 passed in 0.13s.
  • Full targeted run after both changes: python3 -m pytest tests/test_v0_42_3_fixture_integrity_1070.py tests/test_windows_real_wscript_v0_42_3_1002.py -q --no-cov -> 6 passed, 4 skipped in 0.14s (the 4 skips are the real-Windows-only xfail tests, correctly skipped off-Windows).
  • Full repository suite not run locally, per CLAUDE.md (CI is the gate across 3 OSes and 4 interpreters); the change is confined to a new standalone test module plus reason= string edits in one sibling module, both green together with no regressions.

Self-review

Spawned Explore and oss:auditor concurrently against the committed diff. Explore found one dangling cross-reference (the new test module's docstring cited an already-deleted trap.d fragment) -- fixed in a follow-up commit. oss:auditor returned no findings across all four checklist classes, independently re-derived the sha256 pins against the actual v0.42.3 tag, and verified both cited CI run numbers against the real runs.

🤖 Generated with Claude Code

[AI-generated]

fdaviddpt and others added 2 commits November 1, 2026 00:11
… clean confirming CI run

Two carried self-review findings from the v0.42.3 release audit (#1002
round 3), still true as of HEAD.

1. tests/fixtures/v0_42_3/ (lib-detach.sh, lib-detach-pidwrap.sh,
   windows-hidden-run.vbs) must stay byte-for-byte identical to the tagged
   release forever, but nothing pinned that. The three tests against them
   are xfail(strict=True), which only needs *a* failure to stay green, not
   the *documented* one -- so a checkout silently rewriting their line
   endings could pass unnoticed. Add .gitattributes (-text) to pin the
   three paths against line-ending rewrite on any checkout, and a new
   tests/test_v0_42_3_fixture_integrity_1070.py with two independent
   checks: a committed sha256 of each fixture's bytes (catches corruption
   directly, on every platform), and a direct check that the
   .gitattributes pin is wired via `git check-attr` (catches the mechanism
   breaking even before the bytes do).

2. docs/windows.md and the three xfail reason= strings in
   tests/test_windows_real_wscript_v0_42_3_1002.py cited only CI run
   #38049234152 as OBSERVED evidence for the v0.42.3 traps -- a run that
   also carried two unrelated test-isolation bugs fixed on a later commit
   of the same PR (#1010). Both now also cite the clean confirming run on
   the same PR head, #38051416393 (verified via gh-run: 15/15 green,
   confirming the xfails fired as documented with neither bug present).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The Explore reviewer found that the new test module's docstring cited
trap.d/1002.round-3-self-review-gitattributes-and-citation.md, which was
already deleted by the curation commit that turned it into issue #1070
(0288a85, which landed before this lane's base commit). No functional
effect -- nothing opens that path -- but a dangling reference nonetheless.
Point at the issue instead.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@fdaviddpt
fdaviddpt merged commit 2e84d83 into main Nov 1, 2026
19 checks passed
@fdaviddpt
fdaviddpt deleted the fix/1070 branch November 1, 2026 07:56
fdaviddpt added a commit that referenced this pull request Nov 1, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
fdaviddpt added a commit that referenced this pull request Nov 1, 2026
* Rewrite changelog fragments in plain language for the next release

Every fragment in changelog.d/ now leads with what the user noticed, says
in one sentence what changed, and keeps each original limitation and credit
in plain words. Purely internal fragments (#999, #1067) say "Behind the
scenes". Fragment checker stays green.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* Plain-language changelog for #1070 (merged as #1080)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.42.3 release-audit self-review: missing .gitattributes pin for vendored fixtures, and a citation mixing a contaminated CI run with a clean one

1 participant