Skip to content

Fix three CI regressions: code-span anchor, load-dispatch anchor, recordless pip install - #9959

Merged
danielhanchen merged 3 commits into
mainfrom
fix/ci-regressions-release-notes-slots-installer
Aug 30, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
fix/ci-regressions-release-notes-slots-installer

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Three unrelated CI failures, each reproduced locally before changing anything.

1. Repo tests (CPU): test_code_span_closers_ignore_backslashes

#9796 moved the code-span scanner into scanCodeSpans, which is defined above export function codeSpans. The test sliced the file from that export and counted escaped(text in the remainder, so the count went 1 to 0 and "only an opener can be escaped" fired on a file where exactly one opener is still the only escaped thing.

The behaviour is unchanged and correct: escaped() guards the opening run, and the closer loop deliberately ignores backslashes, per CommonMark. Only the anchor was stale.

Now counted over the whole module, with a second assertion that the surviving call is the one guarding the opener. A wrapper moving again cannot silently read as "no opener is escaped either".

2. Python 3.13: test_route_resolves_slots_once_before_dedupe_guard_and_load

The GGUF load moved into _run_gguf_load_attempt, a health-wait helper defined above _load_model_impl, so llama_backend.load_model left the function body and .index() raised ValueError: substring not found.

Every ordering the test guards still holds (guard < dispatch < load). It now anchors on whichever call the body dispatches a load through, rather than on one backend's method name.

This is the last of the 19 failures in that job. The other 18 are covered by #9952.

3. startup windows-latest

error: uninstall-no-record-file
Cannot uninstall pydantic-core None
The package's contents are unknown: no RECORD file was found for pydantic-core.
[FAILED] Python dependency installation failed (exit code 1)

pip will not replace a distribution whose .dist-info carries no RECORD, because it cannot know which files to remove, and an interrupted install leaves exactly that. The job reuses its venv, so the stub is not transient: once written, every later run on that machine dies the same way, which is why this job fails on some PRs and not others.

pip_install now retries once after clearing only the distributions pip itself named as unremovable, and only when it named one. A blind retry would just double the wait; pip's own hint, --ignore-installed, would apply to every package in the command and skip real upgrades along with it.

run() grows check=False so pip_install can inspect a failure instead of exiting inside it. Every existing caller keeps the old exit-on-failure behaviour.

Verification

  • tests/studio/test_update_release_notes.py: 187 passed
  • studio/backend/tests/test_parallel_slots_per_load.py: 41 passed
  • tests/python/test_install_python_stack.py: 157 passed, with the one remaining failure being the pre-existing diffusers-pin test that studio: fix audio ci tests #9953 fixes. With studio: fix audio ci tests #9953 applied on top: 158 passed.
  • 10 new tests cover the installer recovery: the named stub is cleared, a complete install of the same name is left alone, other packages are never touched, an unrelated failure clears nothing, dash/underscore spellings match, the fallback retries exactly once, and a failure with nothing to clear still exits without a retry.

…ordless pip install

Three unrelated failures, all reproduced locally first.

1. tests/studio/test_update_release_notes.py::test_code_span_closers_ignore_backslashes

   #9796 moved the code-span scanner into scanCodeSpans, which is defined ABOVE
   `export function codeSpans`. The test sliced the file from that export and
   counted `escaped(text` in the remainder, so the count went from 1 to 0 and
   the assertion "only an opener can be escaped" fired on a file where exactly
   one opener is still the only escaped thing. Count over the whole module and
   check the surviving call guards the opening run, so a wrapper moving again
   cannot read as "no opener is escaped either".

2. studio/backend/tests/test_parallel_slots_per_load.py::test_route_resolves_slots_once_before_dedupe_guard_and_load

   The GGUF load moved into _run_gguf_load_attempt, a health-wait helper defined
   above _load_model_impl, so `llama_backend.load_model` left the function body
   and .index() raised ValueError. Every ordering the test guards still holds.
   Anchor on whichever call the body dispatches a load through instead of on one
   backend's method name.

3. startup windows-latest

   pip will not replace a distribution whose .dist-info carries no RECORD, and an
   interrupted install leaves exactly that. The job reuses its venv, so the stub
   is not transient: once written, every later run dies the same way on
   "Cannot uninstall pydantic-core / no RECORD file was found". pip_install now
   retries once after clearing only the distributions pip named as unremovable,
   and only when it named one. pip's own hint is --ignore-installed, which would
   apply to every package in the command and skip real upgrades with it.

run() grows check=False so pip_install can inspect a failure instead of exiting
inside it; every existing caller keeps the old exit-on-failure behaviour.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-29T09:28:23.125333Z 8766605 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

pre-commit-ci Bot and others added 2 commits August 29, 2026 08:59
#9890 added staging support to studio/setup.ps1 and put an early
`if ($StageRoot)` return inside Get-ManagedLlamaCppDir, which sits in the block
install.ps1 holds a byte-identical copy of. The copy never got it, so
test_denied_llama_cpp_preflight.py failed on exactly the drift it exists to
catch, taking Repo tests (CPU) down with it.

install.ps1 never assigns $StageRoot, and it runs under Set-StrictMode -Off from
line 25 onwards, so the read is $null there and the branch is inert. Parity is
what the block is for: the copies have to match or the next person edits one of
them and only finds out in production.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8766605003

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread install.ps1
Comment on lines +1601 to +1602
if ($StageRoot) {
return (Join-Path $StageRoot "llama.cpp")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the setup-only StageRoot out of the installer

When install.ps1 is invoked from a PowerShell session that already defines a nonempty $StageRoot (notably through the documented irm | iex flow), PowerShell's dynamic scope makes this function read the caller's variable because the installer never initializes its own $StageRoot. The installer then preflights <caller value>\llama.cpp instead of its managed cache and, for env-mode installs, bakes that unrelated path into UNSLOTH_LLAMA_CPP_PATH; an inaccessible caller path can also abort installation before downloads begin. Initialize an installer-local value or omit this setup-only staging branch here.

Useful? React with 👍 / 👎.

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.

2 participants