Replies: 3 comments
|
补充一份已发布的双语排查指南(v0.5.280):\n\n- English: https://github.com/sandbaseai/deepseek-harness-handbook/blob/main/docs/en/troubleshooting/windows-readonly-pwsh-stderr.md\n- 中文: https://github.com/sandbaseai/deepseek-harness-handbook/blob/main/docs/zh-CN/troubleshooting/windows-readonly-pwsh-stderr.md\n- Release: https://github.com/sandbaseai/deepseek-harness-handbook/releases/tag/v0.5.280\n\n指南把 exit code/stdout/stderr、ConstrainedLanguage、ACL 沙箱和 FullLanguage 编码 guard 拆成独立验收边界,并保留真实命令错误。手册是独立社区资料,不是官方插件或 API wrapper。 |
|
Independent verification of the report and the patch against alpha.1 (HEAD Root cause confirmed (three facts, all in-tree)
Patch review — correct, behavior-preserving, well-tested
This is the same class of bug as the pwsh family in #3911/#4239 (Windows pwsh execution-path edge cases that only surface under the sandbox), and the fix pattern (gate at the provider's argv seam, not at every call site) matches how the pwsh sandbox confinement is layered. 中文摘要:已在 alpha.1 源码逐一确认根因(pwsh-local:48-49 无条件注入 UTF-8 编码 pin + :218 每条命令前置;tool-pwsh:123-124 早已文档化只读沙箱为 ConstrainedLanguage,但 preamble 从未感知)——补丁用 |
|
@denial123789 and @argszero, thank you both. The bilingual handbook usefully separates exit code, stdout/stderr, ConstrainedLanguage, and the encoding guard into independently checkable boundaries. The source-level review also materially strengthens this report: it confirms both the provider seam and why an exact FullLanguage guard preserves the existing unrestricted behavior. I rechecked the current upstream master at No additional retest is expected from either of you. I appreciate the independent verification and the durable troubleshooting documentation. 中文摘要:感谢两位补充双语排查文档和源码级独立验证。今天复查当前 master( |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Windows, every
pwshcommand executed through the ACL sandbox inread-onlymode inherits two PowerShellInvalidOperationrecords on stderr, even when the requested command succeeds with exit code 0.中文摘要:Windows 只读沙箱会让 PowerShell 进入 ConstrainedLanguage;当前每条命令前无条件注入的 UTF-8 编码调用会失败两次,导致成功命令也携带两条无关 stderr。下面附有当前主分支上的根因、真实回归测试和已验证修复分支。
Reproduction and observed result
I found this while running authenticated app-CLI compatibility probes through a real DeepSeek Harness session. A controlled baseline that asked the read-only profile to run only
node --versionproduced:The same command in
workspace-writemode has empty stderr. The Windows ACL end-to-end fixture also confirms that the read-only child is actually inConstrainedLanguage.Root cause
@deepseek-ai/dsh-pwsh-localprependsENCODING_PREAMBLEto every command. The preamble unconditionally constructsSystem.Text.UTF8Encodingtwice and assigns the console/output encodings. ConstrainedLanguage rejects those non-core static calls before the user command starts, so the bootstrap noise is indistinguishable from the command's own diagnostics.The sandbox behavior itself is intentional and already documented. The narrower bug is the unconditional preamble inside that known restricted mode.
Tested fix
Guard the encoding assignments with an exact
FullLanguagecheck. FullLanguage retains the existing UTF-8 pin; restricted modes keep the host encoding and avoid calls that cannot succeed.A ready-to-review reference implementation is available here:
The patch adds a real Windows ACL regression assertion that proves all three facts together:
ConstrainedLanguage;It also preserves the FullLanguage encoding behavior and updates the paired English/Chinese package documentation and Agent Note.
Validation
Local environment note: the broader suites contain two pre-existing symlink-creation fixtures that cannot run on this Windows host because Developer Mode is disabled (
EPERMatsymlinkSync). Their adjacent tests pass, and neither fixture touches this PowerShell change.Per the current contribution policy, I am reporting the bug here instead of opening an external PR. I would be happy to adjust the patch if maintainers prefer a different guard or regression-test location.
All reactions