fix: windows bug bash fixes for the node bundle, spawns, conhost glyphs, and the create wizard - #2208
fix: windows bug bash fixes for the node bundle, spawns, conhost glyphs, and the create wizard#2208tejaskash wants to merge 20 commits into
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
95d522f to
c3b4e29
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## refactor #2208 +/- ##
============================================
+ Coverage 97.07% 97.11% +0.03%
============================================
Files 544 546 +2
Lines 37866 38029 +163
============================================
+ Hits 36760 36932 +172
+ Misses 1106 1097 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude Security Review: no high-confidence findings. (run) |
|
Claude Security Review: no high-confidence findings. (run) |
aidandaly24
left a comment
There was a problem hiding this comment.
Left three inline comments. Also, this is showing as conflicting with the current refactor tip on src/components/EndpointWizard.tsx (#2211 touched it after ErrorPanel moved out), so it will need a rebase before merge.
| const submit = async () => { | ||
| let input: CreateProjectInput; | ||
| try { | ||
| assertProjectPathFits(values.name, ctx.require(PlatformKey)); |
There was a problem hiding this comment.
I think the wizard has no way past this refusal. The message ends with "or pass --skip-install and install the CDK dependencies yourself", but the wizard hardcodes skipInstall: false (lines 188 and 204) and never asks about it, so a Windows user in a deep directory only gets a dead end and ctrl+c. I reproduced the exact text at a 187 character destination. Could the wizard either offer install as a step, or raise a wizard-specific message that just asks for a shorter directory?
There was a problem hiding this comment.
Fixed in aeb1431. The way out is now caller-supplied: the CLI message mentions --skip-install, the wizard's message only asks for a shorter directory. The refusal happens before anything is written, so the wizard offers r to retry after moving directories. Added a screen-level test that drives the wizard with platform win32 and a deep cwd and checks the message, the retry hint, and that the directory stays empty.
| ); | ||
| } | ||
|
|
||
| const unicode = unicodeSupported(process.env, process.platform); |
There was a problem hiding this comment.
I may be missing a reason to keep this at module scope, but it decides the Windows branch from process.platform right after withPlatform was added so handlers would stop doing that. The cost is coverage: core.test.ts covers the predicate, but with glyphs frozen at import no component test can render the ASCII fallback across 27 call sites, and renderScreen pins process.platform too, so the wizard's new win32 refusal has no screen-level test. Would it make sense to resolve glyphs from the context, or at least let renderScreen accept a platform the way createRootHandler now does?
There was a problem hiding this comment.
renderScreen now takes a platform option (aeb1431), and the wizard's win32 refusal has a screen-level test through it. I kept glyphs at module scope deliberately: it is a capability of the process's terminal rather than a per-command decision, it sits next to darkTheme, which is also a module constant every component takes as a default prop, and resolving it from the context means threading a prop through 27 leaf components for a fallback that only matters on legacy conhost. core.test.ts covers the predicate on every branch. If a second env-dependent rendering decision appears I would move both onto the theme object at that point. Happy to do it now if you feel strongly.
| .toString(16) | ||
| .padStart(NAME_HASH_LENGTH, "0") | ||
| .slice(-NAME_HASH_LENGTH); | ||
| const hash = fingerprint(configName); |
There was a problem hiding this comment.
I think this changes resource identity for configs created by released binaries, and the worse case fails silently rather than loudly. The prefix is 20 characters, so any config name over 44 gets a hashed role name, and for my-production-online-evaluation-config-for-the-support-assistant the suffix moves from 20487c61 to 63113c5d. eval.tsx:1232 decides a role is CLI-managed with roleArn.endsWith(onlineEvalExecutionRoleName(configName)), so after an upgrade that check fails, refreshManagedRole goes false, and a data-source move quietly stops granting the new log group instead of erroring. Shorter names keep their role but move scopePolicyName (ff687d46 to 0a7a30a7), and revokeOnlineEvalScope swallows NoSuchEntity, so the superseded policy stays attached with no warning. Since the goal here is Node compatibility rather than a naming change, would it make sense to fall back to the legacy name before treating the role as unmanaged?
There was a problem hiding this comment.
Done in aeb1431. isManagedOnlineEvalRole matches a truncated role on its prefix (AgentCoreOnlineEval--), so a role with a legacy hash suffix is still treated as managed, and grantOnlineEvalScope takes the role name from the config's ARN so the refresh lands on the existing role instead of creating a second one. The superseded policy written under the legacy name cannot be derived, so revokeOnlineEvalScope now returns false on NoSuchEntity and the update path surfaces the existing stale-scope warning instead of staying silent. Unit tests cover detection for short names, truncated names with the current suffix, and truncated names with a legacy suffix.
… bypass the MAX_PATH check, detect local datasets as files
…perseded scope stays attached; wizard-specific MAX_PATH message
edfdfeb to
aeb1431
Compare
|
Claude Security Review: no high-confidence findings. (run) |
…task list on resubmit; pin Unicode glyphs in tests
|
Claude Security Review: no high-confidence findings. (run) |
Fixes the CLI issues from the 2026-09-03 Windows bug bash. Write-ups and verification are in the workspace tracker under
.scratch/windows-bugbash/.Bun.*in production code, so the config-file region, local eval datasets, andeval online creatework under Node. An oxlint rule guards it.shell: trueis gone..cmdwrappers go throughcmd.exewith quoted arguments, real executables spawn directly. Fixes the DEP0190 warning and the broken OTEL lookup.PYTHONUTF8andPYTHONUNBUFFERED, so emoji no longer kill the stream.cd X && ...hints, no internal retry command,ctrl+cspelling, unknown subcommands named instead of "too many arguments",project removeends its line and honours--json.escgoes back,rretries when nothing was written yet).project createrefuses a Windows destination that would pushnode_modulespast MAX_PATH unless--skip-installis passed.Behavior changes worth a changelog line:
Bun.hashbecame sha256, so online-eval policy and long role names change. Roles created by earlier binaries are still recognised as managed (truncated names match on their prefix) and get refreshed on a data-source move; the superseded policy written under the legacy name cannot be derived, so it stays attached and the existing stale-scope warning now says so. Fixtures were rekeyed.project removeprints its message on stderr, stdout carries only the--jsonobject.Verified on a Windows Server 2022 box under Node 24 (scripted over SSH plus the TUI over a pseudo-terminal). Issue 11 (paths with spaces) is in the L3 repo and needs its own PR.