Skip to content

Fix main CI: rewind and Skills strings, token count harness, deep research contract, zoo 2026.10.5 scan baseline - #13701

Merged
danielhanchen merged 7 commits into
mainfrom
tests-skills-i18n-1014
Oct 14, 2026
Merged

danielhanchen merged 7 commits into
mainfrom
tests-skills-i18n-1014

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Three CI jobs on main are red for reasons outside the product code (five separate failures). Each one reproduces on main and passes with this change.

Frontend CI: i18n overlay parity

settings.data.library.filesNotRestored exists in overlay but not in en

#13676 added the Italian rewind.filesNotRestored string under settings.data.library. It now sits in rewind, next to skippedCount, as it does in en.ts and the other overlays. npm run i18n:check fails on main and passes here.

With that fixed, the strict check in the same job fails next: #13687 added skills.turnOff ("Turn off skills") to en.ts only. All 13 overlays now have it, worded like their existing skills.manage label. npm run i18n:check:strict passes.

Backend CI: tests/studio/test_deep_research_frontend_contract.py

#13679 builds the chat + menu from a keyed list, so the one-shot Deep research gate is now deepResearch: researchAvailable ? ( ... ) : null rather than the JSX {researchAvailable ? (. The contract checks the new form. It fails on main (1 failed, 16 passed) and passes here (17 passed).

Backend CI: tests/studio/test_token_count_prompt_parity.py

ReferenceError: skillsForTools is not defined

#13687 added const skillsForTools = () => ... to chat-adapter.ts, and both the token count and the request now call it. The harness resolver (tests/studio/_ts_deps.py) lifted the declaration, but then dropped it as an eagerly evaluated const, because its dependency (the zustand useSkillsSwitchStore, built by create(...)) cannot be lifted. An arrow or function expression reads its references only when called, the same as a function declaration, so the resolver now treats it that way. A const with any other initialiser is still dropped when a dependency is missing. The parity harness also gets a stand-in Skills switch store that is unset, as on a fresh install.

  • test_token_count_prompt_parity.py: 5 failed on main, 14 passed here.
  • Every test that goes through the resolver (10 files, 275 tests): same results apart from those 5.
  • New test_a_pulled_arrow_const_is_kept_like_a_function: fails with the old resolver, passes with the new one. test_a_pulled_const_that_needs_a_fixture_is_dropped_not_emitted still passes.

Security audit: pip scan-packages :: hf-stack

Failing on main since unsloth-zoo 2026.10.5. Five pinned zoo sites now have a file digest the baseline has not reviewed:

File What changed at the flagged site
unsloth_zoo/mlx/decision.py same matched code
unsloth_zoo/mlx/loader.py same matched code
unsloth_zoo/mlx/speculative.py two added mx.eval(...) calls (mlx.core.eval, MLX array evaluation)
unsloth_zoo/temporary_patches/moe_utils.py same matched code
unsloth_zoo/vllm_utils.py same matched code

Since the pin covers the whole file, I read each file's full 2026.10.4 to 2026.10.5 diff. The changes are an sm121 tile table entry, audio clip splitting, MLX evaluation calls and the vLLM merged-rollout weight folding. None of them adds network, exec, process or file-execution code. As in #13472, the five 2026.10.5 entries are appended and nothing else in the baseline changes. With the new baseline, scanning unsloth-zoo==2026.10.5 exits 0 (24 findings suppressed). With main's baseline it exits 1.

#13676 added it under settings.data.library, so the overlay parity check
in Frontend CI fails with an overlay key missing from en.
…resolver

#13687 added const skillsForTools = () => ..., which reads the zustand
Skills switch store. The resolver treated it as an eagerly evaluated const
and dropped it because the store cannot be lifted, so the token count
parity harness failed with ReferenceError: skillsForTools is not defined.
An arrow or function expression reads its references only when called.
The parity harness also gets a stand-in Skills switch store.
Five pinned zoo sites moved digest in 2026.10.5. Four have the same matched
code; speculative.py adds two mx.eval calls (MLX array evaluation). The rest
of each file's 2026.10.4 to 2026.10.5 diff adds no network, exec or
process code.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-10-14T10:04:49.999416Z 0c452be Manual request
🔒 Security Review ⚠️ Failed 2026-10-14T09:31:48.320471Z ebe2668 PR opened
ℹ️ 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.

#13687 added the Skills switch's Turn off skills label in en only, so the
strict overlay check in Frontend CI fails with it missing from all 13.
#13679 builds the chat + menu from a keyed list, so the one-shot gate is now
deepResearch: researchAvailable ? ( ... ) : null.
@danielhanchen danielhanchen changed the title Fix three main CI failures: Italian rewind string, token count harness, zoo 2026.10.5 scan baseline Fix main CI: rewind and Skills strings, token count harness, deep research contract, zoo 2026.10.5 scan baseline Oct 14, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 0c452befc4

ℹ️ 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".

@danielhanchen
danielhanchen merged commit eb49b6f into main Oct 14, 2026
@danielhanchen
danielhanchen deleted the tests-skills-i18n-1014 branch October 14, 2026 10:20
danielhanchen added a commit that referenced this pull request Oct 16, 2026
…ngs after review (#13949)

## Summary

`Security audit` on main fails in `pip scan-packages :: hf-stack` and
`pip scan-packages :: studio` (run 38811240332 on 565630c). Two new
upstream releases moved reviewed findings out of the baseline:

- **unsloth-zoo 2026.10.6** changed several files whose entries are
pinned to a file digest (`vision_utils.py`, `compiler.py`,
`vllm_utils.py`, `mlx/speculative.py`,
`temporary_patches/moe_utils.py`), changed the matched lines in
`mlx/decision.py` and `mlx/loader.py`, and added a new site in
`vllm_gdn_replayssm.py`.
- **transformers 5.20.0** shifted the `while True:` generator in
`testing_utils.py`, which the scanner reads as a polling loop.

No product change caused this; it is the expected churn of evidence-hash
and file-digest keyed entries on a new release, same as #13143, #13472
and #13701.

## Review

I diffed every flagged zoo file between 2026.10.5 (last baselined) and
2026.10.6. The added lines that touch the matched patterns are:

- `mx.eval(...)` MLX array evaluation calls and `model.eval()`
(decision.py, loader.py, speculative.py)
- reads of feature flags (`UNSLOTH_MOE_LORA_PAD_ALWAYS`,
`VLLM_MLA_DISABLE`, `UNSLOTH_VLLM_ONLINE_FP8`, `UNSLOTH_VLLM_REPLAYSSM`,
`VLLM_USE_V2_MODEL_RUNNER`, `UNSLOTH_VLLM_MERGED_ROLLOUT_RESTORE`)
- the `unsloth_fsdp_unshard` import and calls in the compiler header
(zoo #1766)
- the `mask_out_tokens` argument in `vision_utils.py`; the env and IMDS
hits there are still the SSRF guard that lists metadata hosts in order
to block them
- `vllm_gdn_replayssm._edit_method`, which recompiles a vLLM method from
its own `inspect.getsource` text after a textual edit, the same pattern
as the other vLLM patchers

None adds network access, subprocess use, encoded payloads or a new
destination.

The transformers hit is `evaluate_side_effect_factory` in
`testing_utils.py`, a test helper that yields the last value forever
(`while True: yield side_effect_values[-1]`). It was baselined at three
earlier line numbers already.

## Change

Ten entries appended to `scripts/scan_packages_baseline.json`, taken
from `scan_packages.py --write-baseline` over the two failing shards and
filtered to the flagged keys. Nothing is removed, so the older releases
stay covered, and pins carry over: every entry whose site was pinned
before is pinned to the 2026.10.6 file digest. The new
`vllm_gdn_replayssm.py` site is pinned too, since what it execs is
decided by the edit tables and source lookup elsewhere in the file, and
`tests/security/test_scan_packages.py` now requires that pin in both
context-dependent pin tests.

Excluded on purpose: the local run also flagged `multiprocess`, which
comes from a Python-version-specific wheel this host resolves and CI
does not.

## Testing

- Both shards rescanned locally against the new baseline: no unbaselined
unsloth-zoo or transformers finding remains.
- The baseline diff is additions only (10 entries).
- `tests/security/test_scan_packages.py`: 152 passed. Removing the new
pin makes
`test_context_dependent_unsloth_zoo_findings_are_digest_pinned` and
`test_context_dependent_unsloth_zoo_pins_reopen_on_other_file_changes`
fail.
danielhanchen added a commit that referenced this pull request Oct 18, 2026
…solver checks hold on every host (#14116)

Follow-up to #13265, #13395 and #13701. Each one was rechecked on other
hosts and environments, and these four gaps showed up. Each one
reproduces on `main` and is fixed here. No product code changes.

## Studio `--help` test (#13265)

`COLUMNS=200` is not enough. Typer passes an inherited `TERMINAL_WIDTH`
to Rich as an explicit width. `GITHUB_ACTIONS`, `FORCE_COLOR` or
`PY_COLORS` force terminal mode, whose colour codes split every flag
(`--model` no longer appears as a substring). On staging, the test fails
on `ubuntu-latest` and `macos-15` for exactly this reason. The test now
also sets `TERMINAL_WIDTH=200` and `_TYPER_FORCE_DISABLE_TERMINAL=1`
(both present from Typer 0.19, the floor), and it decodes the child's
output as UTF-8 so a CJK Windows code page cannot break the decode.

| Environment | `main` | Here |
| --- | --- | --- |
| none | pass | pass |
| `TERMINAL_WIDTH=80` | fail | pass |
| `GITHUB_ACTIONS=true` | fail | pass |
| `FORCE_COLOR=1` | fail | pass |
| `PY_COLORS=1` | fail | pass |
| `GITHUB_ACTIONS=true TERM=dumb` | fail | pass |

## Media scan tests (#13395)

`test_media_model_index_accounts.py` and `test_openai_catalog.py`
cleared `HF_HOME` and redirected `XDG_CACHE_HOME`. The scan also reads:
- `hf_default_cache_dir()`, which is `Path.home() / ".cache" /
"huggingface" / "hub"` and ignores `XDG_CACHE_HOME`;
- the LM Studio, Hermes, Ollama and oMLX model folders, including the
system-wide Ollama paths;
- `./models` under the working directory.

So the most common developer setup, an image model in the default HF
cache, still added rows. Both fixtures now point those helpers at the
test's temp dir and run from it. Patching the helpers rather than `HOME`
means the fix works the same on Windows (`USERPROFILE`), macOS and
Linux.

Result with a fake image model planted in each location (33 tests in
each case):

| Case | `main` | Here |
| --- | --- | --- |
| clean | 33 passed | 33 passed |
| model in `~/.cache/huggingface/hub`, `~/.lmstudio/models`,
`OLLAMA_MODELS` | 4 failed | 33 passed |
| pytest run from a folder with `models/<x>/model_index.json` | 4 failed
| 33 passed |

## Installer differential comparer (#13265)

The rule that drops a repeated 100% bar (a winget redraw) compared lines
after sizes were normalised. That made two genuinely different events
collapse into one bar and compare equal:
- a second transfer with no header line, where a partial frame sits
between the two full bars;
- two finished downloads of different sizes.

A repeat is now dropped only when no partial frame was seen since the
kept bar and the raw numbers match. Two new tests cover these cases;
they fail on `main` and pass here. The existing redraw test still passes
(94 passed).

## Node harness resolver (#13701)

#13701 lets a `const` bound to an arrow or function expression be lifted
even when some of its references cannot be. Two shapes could now
load-crash a harness:
- an eagerly evaluated const that calls such a helper on load (`const
TABLE = { v: f() }`, directly or through another helper);
- an immediately invoked `const v = function () { ... }();`, which runs
on load.

The first is now dropped like a const that reads the missing reference
itself. A const that only names the helper (`[g]`) is kept. The second
stays eager.

No current frontend source has either shape: a sweep of every top-level
declaration in `studio/frontend/src` found no harness that loads only on
one side. All 278 tests that use the resolver pass, and the two new
tests fail with the old resolver.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
danielhanchen added a commit that referenced this pull request Oct 20, 2026
## Summary

`Security audit` on main fails in `pip scan-packages :: hf-stack` (run
39357543071 on 22a0bea) with 2 CRITICAL and 5 HIGH unbaselined
findings, all in unsloth-zoo. unsloth-zoo 2026.10.7 reached PyPI
yesterday at 15:39, and the scan installs the latest release. Nothing in
this repo caused it; it is the expected churn of digest-pinned entries
on a zoo release, same as #13143, #13472, #13701 and #13949.

| File | Check | Why it reopened |
|---|---|---|
| `llama_cpp.py` | env + network | file digest changed, matched lines
unchanged |
| `compiler.py` | exec/eval | file digest changed, matched lines
unchanged |
| `vllm_utils.py` | exec/eval | file digest changed, matched lines
unchanged |
| `mlx/loader.py` | exec/eval | file digest changed, matched lines
unchanged |
| `mlx/speculative.py` | exec/eval | file digest changed, matched lines
unchanged |
| `temporary_patches/moe_utils.py` | exec/eval | file digest changed,
matched lines unchanged |
| `triton_kernels_compat.py` | downloads and executes remote code | new
matched lines |

## Review

I diffed each of the seven files between 2026.10.6 (last baselined) and
2026.10.7 and searched the added lines for network, subprocess,
exec/eval/compile, encoding, pickle, ctypes and environment access. What
they add:

- `triton_kernels_compat.py`: the flagged lines are
`importlib.import_module(self.name + ".topk")` and
`".tensor_details.ragged_tensor"`, which import fixed submodules of an
already installed `triton_kernels` package or vLLM's vendored copy. The
new `UNSLOTH_TRITON_KERNELS_SOURCE` flag (`auto | triton_kernels |
vllm`) only picks which of those two to import. Nothing is downloaded.
- `vllm_utils.py`, `temporary_patches/moe_utils.py`: feature flags
(`UNSLOTH_VLLM_SUFFIX_DECODING`, `UNSLOTH_VLLM_FP32_LM_HEAD`,
`UNSLOTH_MOE_DEQUANT_CHUNK_EXPERTS`, `UNSLOTH_MOE_SELECTIVE_DEQUANT`).
- `mlx/loader.py`: on MLX >= 0.32.4, imports the mlx-vlm modules named
in a fixed table (`_EXACT_VERIFY_SUM_SOURCES`) and uses two regexes to
promote their verify-kernel sums to float32.
- `llama_cpp.py`, `compiler.py`, `mlx/speculative.py`: no added line
touches any of those patterns.

None adds network access, subprocess use, encoded payloads or a new
destination.

## Change

Seven entries added to `scripts/scan_packages_baseline.json`, taken from
`scan_packages.py --write-baseline` over `unsloth-zoo==2026.10.7` and
filtered to the unbaselined keys. Each is pinned to its 2026.10.7 file
digest, as the previous entries for these files were, and sits next to
them. Nothing is removed, so older releases stay covered.

## Testing

- `scan_packages.py unsloth-zoo==2026.10.7`: exits 0 with this baseline;
with main's baseline it exits 1 with the same seven findings as CI.
- `scan_packages.py unsloth-zoo==2026.10.6` still exits 0.
- `tests/security/test_scan_packages.py`: 152 passed.
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