Skip to content

Risky loader baseline: record the FSDP2 export's store handoff - #15379

Merged
danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-fsdp2-store
Oct 26, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-risky-loader-fsdp2-store

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

tests/security/test_lint_risky_loaders.py::test_the_tree_matches_the_baseline and the Source lint risky-loader step fail on main since #15353, so every PR based on it inherits the failure (#15374 today):

1 risky loader call site(s) not in the baseline:
  unsloth/models/fsdp2_save.py:695  [unsafe-deserialize] pickle.loads

#15353 added _share_from_writer. The export's writer rank pickles a small result into the job's default c10d store: the RAM refusal string, or ("ok", run()) / ("error", message). The other ranks wait on that key and unpickle it.

Product or test

Neither is wrong; the call site just was not recorded. The bytes come only from a peer rank of the same job, through the job's own c10d store, under an unsloth_fsdp2_export_* key. Anyone who can write that store already controls the job's collectives. A format change would be a product change: run() returns whatever the export returns, so JSON would need its own handling for each exporter. The lint's prescribed path for a trusted input is a reviewed baseline entry, and that is what this does.

Fix

  • python scripts/lint_risky_loaders.py --update, which added exactly one entry (unsloth/models/fsdp2_save.py, pickle.loads, count: 1) and changed nothing else.
  • Its "REVIEW ME" reason replaced with why the input is trusted.

Verification

  • python scripts/lint_risky_loaders.py: ok: 109 risky loader call site(s), all recorded (failed on main).
  • tests/security/test_lint_risky_loaders.py: 46 passed.
  • Sabotage: adding a second pickle.loads to fsdp2_save.py is still reported as not in the baseline, because the entry is pinned to count: 1.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T13:53:37.330412Z 74dd244 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 74dd244713

ℹ️ 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 208d46b into main Oct 26, 2026
1 of 13 checks passed
@danielhanchen
danielhanchen deleted the ci-risky-loader-fsdp2-store branch October 26, 2026 14:00
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