Skip to content

Windows installer: shorten the native-type comments - #10621

Merged
danielhanchen merged 4 commits into
mainfrom
comments/installer-native-type-notes
Sep 9, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
comments/installer-native-type-notes

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Comment-only follow-up to #10540.

The notes that PR added around the reflection-emit helpers were accurate but long-winded: they restated the same point twice, narrated history at length, and hedged. This trims them to the minimum that still tells a future reader why the code is the way it is.

Files touched:

  • install.ps1 and studio/setup.ps1, the New-StudioEmittedNativeType / Test-StudioCanDefineNativeTypes / Test-StudioEmitInChildProcess / Enable-StudioVirtualTerminal notes. Both copies of a shared comment got the same wording.
  • .github/scripts/Watch-ForCompiler.ps1 and .github/workflows/windows-no-compiler-ci.yml.
  • tests/python/test_windows_installer_native_type_fallback.py, tests/python/test_windows_installer_concurrency_guard.py, tests/studio/test_installer_av_shapes.py.

Every concrete fact is kept: API names, the CS2001 and issue #9140 history, App Control policy option 19 and its behaviour before Windows 11 24H2, the CharSet name-mangling rule, the out uint metadata reason, the ContainsKey / Set-StrictMode trap, the 20 second child deadline, and the reasons each fallback exists. Only restatement and hedging came out.

Nothing else changed. No code, no string literal, no test data, and nothing inside a here-string (the probe body is compared byte for byte by a test, and the note inside it is untouched).

Checks run on this branch:

  • a comment-only diff checker over every changed file, confirming the token stream outside comments is identical
  • install.ps1, studio/setup.ps1 and Watch-ForCompiler.ps1 still parse
  • windows-no-compiler-ci.yml still loads as YAML
  • pytest tests/python/test_windows_installer_native_type_fallback.py tests/python/test_windows_installer_concurrency_guard.py tests/studio/test_installer_av_shapes.py tests/studio/test_workflow_guards_run_unfiltered.py tests/python/test_windows_setup_output_encoding.py: 208 passed, 25 skipped
  • pwsh -File tests/studio/test_native_path_resolver_degrades.ps1: all checks passed

Comment-only follow-up to #10540. The notes around the reflection-emit
helpers, the emit gate, the compiler watcher and its CI lane restated the
same point twice and narrated history at length. Tightened them to the
minimum that still explains why the code is the way it is: every API name,
exit code, policy option, timeout and reproduced observation is kept, only
the restatement is gone.

No code, string literal or test data changed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-09-09T15:38:08.678435Z ae637fb 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.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 9, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@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: 968e57d660

ℹ️ 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 Outdated
# change go by.
# ContainsKey, not a bare property read: most imports have no Out key and
# reading a missing one is fatal under a caller's Set-StrictMode, which
# this script never sets itself.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Point the strict-mode rationale at setup.ps1

This claim is false for this copy: Install-UnslothStudio explicitly executes Set-StrictMode -Off near the start of the function. The missing-key hazard applies to the duplicated emitter in studio/setup.ps1, which inherits the caller's strict mode; retaining that distinction explains why the ContainsKey guard must remain mirrored across both scripts.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Correct, and the wording came out of a rewrite that flattened the distinction. install.ps1 runs Set-StrictMode -Off for itself near the top of Install-UnslothStudio, so the hazard there is nil; studio/setup.ps1 sets nothing and runs under whatever the caller has. Both copies now say exactly that, which is also the reason the guard is mirrored rather than left to one of them. Fixed in 7be360e.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 7be360e777

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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@danielhanchen
danielhanchen merged commit 3cb17d7 into main Sep 9, 2026
0 of 67 checks passed
@danielhanchen
danielhanchen deleted the comments/installer-native-type-notes branch September 9, 2026 15:35
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