Skip to content

Fix the exec-literal, encoding and formatter gates left red on main - #13543

Merged
danielhanchen merged 1 commit into
mainfrom
ci-autoopt-exec-encoding
Oct 13, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-autoopt-exec-encoding

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Three gates fail on main (8a0e453). All of them are reproduced locally and all of them sit in every PR's Backend CI and workflow-trigger lint jobs:

  1. tests/security/test_lint_exec_literals.py::test_the_baseline_matches_the_tree_it_was_recorded_against: 2 dynamic-execution call sites are not in the baseline. They are studio/backend/core/inference/diffusion_autoopt/patches.py:174 (compile) and :175 (exec), added by Studio: diffusion auto-optimizer core shared by the image and video load paths #13520.
  2. tests/test_source_read_encoding.py: four checked-in file reads/writes use the platform default encoding:
  3. tests/test_formatter_fixed_point.py: six files from Studio: per-family diffusion tables move into the family registries #13536 are not a fixed point of the ruff-format-with-kwargs hook.

Test or product?

  • exec sites: the product is right and the baseline is behind. splice_function rebuilds a diffusers function from its own inspect.getsource. It edits the source only by exact-once literal needle replacements, checks that the result parses to a single function, and checks that every global resolves. Then it compiles and executes it into a copy of the original globals. That is the same pattern as the already-baselined HunyuanImage / HunyuanVideo rebuild in diffusion_capture_safe.py, and it never sees user or model input. So both sites are recorded with scripts/lint_exec_literals.py --update, with the reasons written into the entries. Regenerating moved exactly those two entries and nothing else.
  • encoding: the gate is right. Each site now passes encoding = "utf-8", including the /proc/<pid>/stat read, which is ASCII anyway.
  • formatter: the gate is right. This is the output of scripts/run_ruff_format.py only.

Verification

main this PR
test_lint_exec_literals.py + test_source_read_encoding.py 4 failed, 38 passed 42 passed
test_formatter_fixed_point.py fails (6 files) 16 passed
diffusion / video suites touched (family_data_freeze, video_families, diffusion_memory, autoopt_parity, video_backend, diffusion_backend, vae_tile_fixture_coverage) 1362 passed, 6 skipped

The test_diffusion_autoopt_parity.py failures seen on #13520's own run pass on current main and are not touched here.

…13536 left red on main

- Baseline the two diffusion_autoopt splice_function compile/exec sites
  with their reasons (#13520).
- Name encoding="utf-8" on four file reads/writes in tests (#13520,
  #13534, #13536).
- Format six #13536 files with scripts/run_ruff_format.py.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T06:45:46.634189Z ff11604 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 Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-13T06:41:21.856432Z ff11604 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: ff1160443b

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

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