Repository navigation
fix(tests): pin LF line endings in cached Codex source-pin fixture - #3561
Merged
Daniel Meppiel (danielmeppiel) merged 2 commits intoNov 11, 2026
Merged
Conversation
On Windows, Path.write_text translates "\n" to "\r\n", so the fixture package hashed to sha256:b6500037... instead of the pinned sha256:4680f02c... and every parametrization of test_frozen_global_install_from_warm_cache_uses_locked_source_pin failed on the windows-latest Build & Test job on main. Write the fixture files with newline="\n" so the bytes and the content hash are platform independent. Refs #3560 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 11, 2026 14:34
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
All five regression cases are excluded from the pull-request Windows gate because the module lacks the windows_compat marker, and the release workflow provides no pre-merge coverage.
1 open issue
What changed in this PR
This test-only PR addresses #3560 by making the cached Codex source-pin fixture’s bytes consistent across platforms, preventing Windows line-ending conversion from breaking its pinned hash assertion.
Changes:
- Explicitly writes LF line endings for the skill, plugin metadata, and cache-pin fixture files.
- Preserves the expected package hash and leaves production code unchanged.
| File | Description |
|---|---|
tests/unit/install/test_cached_codex_source_pin.py |
Pins fixture writes to LF for platform-independent content hashing. |
Review effort: Balanced
| ) | ||
| (package / "SKILL.md").write_text(_SKILL_MD, encoding="utf-8") | ||
| # newline="\n" keeps the bytes (and the pinned content hash) identical on Windows. | ||
| (package / "SKILL.md").write_text(_SKILL_MD, encoding="utf-8", newline="\n") |
The CRLF hash regression only surfaced post-merge because the PR-time Windows gate selects tests by the windows_compat marker. Mark this module so the LF-pinned fixture is exercised on windows-latest before merge. Refs #3560 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-fix-main-ci-1111
branch
November 11, 2026 18:01
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes the deterministic Windows failure that keeps
CI/CD Pipelinered onmain.tests/unit/install/test_cached_codex_source_pin.py(from #3407) writesits fixture package with
Path.write_text(); on Windows\nbecomes\r\n,so
compute_package_hash()returnssha256:b6500037...instead of the pinnedsha256:4680f02c...and the fixture assertion fails for all 5 parametrizations.The fixture files are now written with
newline="\n", making the bytes and thehash platform independent. The module is also marked
windows_compatso the PR-time WindowsCompatibility Gate exercises it (the gate selects by marker, which is why the
regression only surfaced post-merge). Test-only change; no product code touched.
Failing
mainruns (WindowsBuild & Testjob only): 43024070124,43024578103, 43032218648, 43032236928, 43036634830, 43036737902.
Issue and approved scope
Issue: Fixes #3560
Human scope-approval comment: scope approved by Daniel Meppiel (@danielmeppiel)'s explicit
session mandate ("loop until the CI pipelines in main are fixed, and that the
release pipeline is passing on a dry run"), recorded in #3560. Review contact:
Daniel Meppiel (@danielmeppiel).
Does this PR complete the issue, or what remains? Completes it.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
.venv/bin/pytest tests/unit/install/test_cached_codex_source_pin.py -q-> 5 passed (macOS).Root-cause repro: writing the same fixture with
newline="\r\n"and hashingwith
compute_package_hashyieldssha256:b65000370e9f..., exactly theWindows CI value;
newline="\n"yields the pinnedsha256:4680f02c21d1....ruff check/ruff format --checkon the CI-mirror paths -> clean..venv/bin/pytest -m windows_compat tests/unit/install/test_cached_codex_source_pin.py -q-> 5 passed.Windows coverage: this PR's
Windows Compatibility Gatejob now selects the test.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.