Repository navigation
Windows installer: shorten the native-type comments - #10621
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 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".
| # 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. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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.ps1andstudio/setup.ps1, theNew-StudioEmittedNativeType/Test-StudioCanDefineNativeTypes/Test-StudioEmitInChildProcess/Enable-StudioVirtualTerminalnotes. Both copies of a shared comment got the same wording..github/scripts/Watch-ForCompiler.ps1and.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 uintmetadata 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:
install.ps1,studio/setup.ps1andWatch-ForCompiler.ps1still parsewindows-no-compiler-ci.ymlstill loads as YAMLpytest 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 skippedpwsh -File tests/studio/test_native_path_resolver_degrades.ps1: all checks passed