Skip to content

Name utf-8 on the offload test's two source reads - #10041

Closed
lonexreb wants to merge 2 commits into
unslothai:mainfrom
lonexreb:fix/offload-test-read-encoding
Closed

lonexreb wants to merge 2 commits into
unslothai:mainfrom
lonexreb:fix/offload-test-read-encoding

Conversation

@lonexreb

Copy link
Copy Markdown
Contributor

What

Main's Repo tests (CPU) leg went red at 97c7ef6 / 3d531a8: the new tests/test_offload_frozen_module_device.py (#10034) reads unsloth/models/llama.py twice with the platform default encoding, and the drift test test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding pins every checked-in file read to name encoding = "utf-8" — so source inspection cannot silently break on Windows the day the inspected file gains a non-ASCII byte.

AssertionError: 2 file reads in the test trees touch a checked-in file with the platform
default encoding ... ['tests/test_offload_frozen_module_device.py:40: read_text()',
 'tests/test_offload_frozen_module_device.py:254: read_text()']

How

Adds encoding = "utf-8" to both read_text() calls — the two lines the pin names, nothing else.

Verification

tests/test_offload_frozen_module_device.py (unslothai#10034) reads llama.py with
the platform default encoding, and the drift test
test_source_read_encoding.py pins every checked-in file read to name
encoding = "utf-8" so source inspection cannot break on Windows the day
the file gains a non-ASCII byte. Backend CI's Repo tests (CPU) leg went
red on main with exactly that pin (97c7ef6 and 3d531a8).
@lonexreb

Copy link
Copy Markdown
Contributor Author

Superseded on main: #10039 (da3c85c) landed the identical two-line fix minutes ahead of this one. For the record, this PR's own Repo tests (CPU) leg came back green with the change, confirming the diagnosis. Closing.

@lonexreb lonexreb closed this Aug 31, 2026
lonexreb added a commit to lonexreb/unsloth that referenced this pull request Sep 16, 2026
…f-closing issue

Main has no PR gate for the team, so Backend CI going red on a direct
push is routine -- and the cost is never the fix, it is the noticing. A
red main sits until someone happens to look, every branch cut meanwhile
inherits the failure families into its own PR runs, and the eventual
fixer starts by re-deriving which push since the last green broke it.
Aug 29-31 ran that cycle three times, once with the same two-line fix
built twice in parallel (unslothai#10039/unslothai#10041) because nothing said the break
was known.

When a Backend CI run on main completes red, look up the last green main
run, list the commits between the two heads -- the complete suspect set,
usually one or two pushes -- and open ONE labeled issue carrying the
range, the failing jobs, and the run link. Repeat reds update the same
issue; the first green closes it, so the issue's lifetime IS main's red
window.

Ships inert per ci-capacity.yml's convention: writes are gated on the
MAIN_RED_GUARD_ENABLED repository variable, and until it is set the
workflow prints the issue it would have filed to the job summary on
every real red, so its output can be judged before it is allowed to
speak.
lonexreb added a commit to lonexreb/unsloth that referenced this pull request Sep 16, 2026
…f-closing issue

Main has no PR gate for the team, so Backend CI going red on a direct
push is routine -- and the cost is never the fix, it is the noticing. A
red main sits until someone happens to look, every branch cut meanwhile
inherits the failure families into its own PR runs, and the eventual
fixer starts by re-deriving which push since the last green broke it.
Aug 29-31 ran that cycle three times, once with the same two-line fix
built twice in parallel (unslothai#10039/unslothai#10041) because nothing said the break
was known.

When a Backend CI run on main completes red, look up the last green main
run, list the commits between the two heads -- the complete suspect set,
usually one or two pushes -- and open ONE labeled issue carrying the
range, the failing jobs, and the run link. Repeat reds update the same
issue; the first green closes it, so the issue's lifetime IS main's red
window.

Ships inert per ci-capacity.yml's convention: writes are gated on the
MAIN_RED_GUARD_ENABLED repository variable, and until it is set the
workflow prints the issue it would have filed to the job summary on
every real red, so its output can be judged before it is allowed to
speak.
lonexreb added a commit to lonexreb/unsloth that referenced this pull request Sep 16, 2026
…f-closing issue

Main has no PR gate for the team, so Backend CI going red on a direct
push is routine -- and the cost is never the fix, it is the noticing. A
red main sits until someone happens to look, every branch cut meanwhile
inherits the failure families into its own PR runs, and the eventual
fixer starts by re-deriving which push since the last green broke it.
Aug 29-31 ran that cycle three times, once with the same two-line fix
built twice in parallel (unslothai#10039/unslothai#10041) because nothing said the break
was known.

When a Backend CI run on main completes red, look up the last green main
run, list the commits between the two heads -- the complete suspect set,
usually one or two pushes -- and open ONE labeled issue carrying the
range, the failing jobs, and the run link. Repeat reds update the same
issue; the first green closes it, so the issue's lifetime IS main's red
window.

Ships inert per ci-capacity.yml's convention: writes are gated on the
MAIN_RED_GUARD_ENABLED repository variable, and until it is set the
workflow prints the issue it would have filed to the job summary on
every real red, so its output can be judged before it is allowed to
speak.
lonexreb added a commit to lonexreb/unsloth that referenced this pull request Sep 16, 2026
…f-closing issue

Main has no PR gate for the team, so Backend CI going red on a direct
push is routine -- and the cost is never the fix, it is the noticing. A
red main sits until someone happens to look, every branch cut meanwhile
inherits the failure families into its own PR runs, and the eventual
fixer starts by re-deriving which push since the last green broke it.
Aug 29-31 ran that cycle three times, once with the same two-line fix
built twice in parallel (unslothai#10039/unslothai#10041) because nothing said the break
was known.

When a Backend CI run on main completes red, look up the last green main
run, list the commits between the two heads -- the complete suspect set,
usually one or two pushes -- and open ONE labeled issue carrying the
range, the failing jobs, and the run link. Repeat reds update the same
issue; the first green closes it, so the issue's lifetime IS main's red
window.

Ships inert per ci-capacity.yml's convention: writes are gated on the
MAIN_RED_GUARD_ENABLED repository variable, and until it is set the
workflow prints the issue it would have filed to the job summary on
every real red, so its output can be judged before it is allowed to
speak.
lonexreb added a commit to lonexreb/unsloth that referenced this pull request Sep 27, 2026
…f-closing issue

Main has no PR gate for the team, so Backend CI going red on a direct
push is routine -- and the cost is never the fix, it is the noticing. A
red main sits until someone happens to look, every branch cut meanwhile
inherits the failure families into its own PR runs, and the eventual
fixer starts by re-deriving which push since the last green broke it.
Aug 29-31 ran that cycle three times, once with the same two-line fix
built twice in parallel (unslothai#10039/unslothai#10041) because nothing said the break
was known.

When a Backend CI run on main completes red, look up the last green main
run, list the commits between the two heads -- the complete suspect set,
usually one or two pushes -- and open ONE labeled issue carrying the
range, the failing jobs, and the run link. Repeat reds update the same
issue; the first green closes it, so the issue's lifetime IS main's red
window.

Ships inert per ci-capacity.yml's convention: writes are gated on the
MAIN_RED_GUARD_ENABLED repository variable, and until it is set the
workflow prints the issue it would have filed to the job summary on
every real red, so its output can be judged before it is allowed to
speak.
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.

1 participant