Skip to content

AV lint: record the sd.cpp missing-DLL probe test's python.exe copy - #16108

Merged
danielhanchen merged 1 commit into
mainfrom
lint-av-baseline-sd-cpp-dll-probe
Oct 30, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
lint-av-baseline-sd-cpp-dll-probe

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Since #16031 (test-launch sd.cpp binaries without the Windows missing-DLL box), the AV shapes lint finds a new error on main. Every PR's Source lint job and the test_lint_av_shapes.py::test_the_repository_is_clean_against_its_baseline test in the CPU shards fail on it, for example on #16018 and #15994:

studio/backend/tests/test_sd_cpp_probe_error_mode.py:221: [AV009] error: copies a Windows system binary
    line: shutil.copy(getattr(sys, "_base_executable", sys.executable), binary)
1 new error(s).

test_a_real_binary_missing_its_dll_is_reported_unrunnable copies python.exe into tmp_path as sd-server.exe, away from pythonXY.dll, and cuts PATH to System32. The result is a real PE whose loader fails with STATUS_DLL_NOT_FOUND, the same failure as an sd.cpp ROCm build without HIP. The lint's suggested replacement, windows_console_stub.py, links nothing and starts fine, so it cannot produce that failure. The copy has to stay. The lint documents this route for that case: the finding is recorded in scripts/av_shapes_baseline.json with the reason. The entry carries the digest of that one line, so any other copy in the file is still a new error.

I did not use --update. It would also have pruned many unrelated stale entries across the baseline. This adds the one group (9 lines).

The CI message also prints an AV010 warning for .github/workflows/studio-tauri-smoke.yml:374 first, but warnings do not fail the check. With only this entry added, the test passes.

Verification

  • python scripts/lint_av_shapes.py: 1 new error(s) on main, 0 new errors here.
  • tests/security/test_lint_av_shapes.py::test_the_repository_is_clean_against_its_baseline: fails on main on the AV009 line, passes here. The rest of the file passes (19 passed).
  • --self-test still passes, since the lint is unchanged.

#16031's Windows-only test copies python.exe away from pythonXY.dll so a real loader
failure can be checked; the AV shapes lint reads it as AV009 and every PR's lint and
CPU shards fail on it. The console stub links nothing and would start, so the copy
stays and is recorded with its reason.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-30T11:25:11.610922Z 78edf11 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. What shall we delve into next?

Reviewed commit: 78edf110a8

ℹ️ 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 2199d9f into main Oct 30, 2026
0 of 16 checks passed
@danielhanchen
danielhanchen deleted the lint-av-baseline-sd-cpp-dll-probe branch October 30, 2026 11:55
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