Repository navigation
fix: preserve workspace config and make analysis portable - #1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 298f00728d
ℹ️ 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".
| $stream = [IO.File]::Open($resolvedConfig, [IO.FileMode]::CreateNew, [IO.FileAccess]::Write) | ||
| try { | ||
| $writer = New-Object IO.StreamWriter($stream, $utf8) | ||
| $writer.Write($json + [Environment]::NewLine) |
There was a problem hiding this comment.
Publish the config only after its write succeeds
If serialization or the stream write fails—for example because the disk fills—or the process is interrupted after CreateNew, the destination remains as an empty or partial file. The new early Test-Path check then rejects every subsequent initialization attempt at the default path, turning a transient failure into a persistent invalid configuration; write to a temporary sibling and atomically move it into place without overwriting the destination.
Useful? React with 👍 / 👎.
变更说明
变更类型
自查清单
pwsh -NoProfile -File tests/Test-PublicSkill.ps1通过;pwsh -NoProfile -File tests/Test-WorkspaceScripts.ps1通过;git diff --check,均通过;tests/Test-PublicSkill.ps1(不适用:未改 SKILL.md);CHANGELOG.md(本 PR 未发版)。验证边界
从仓库外工作目录验证了分析脚本的输入文件定位。未重建图表:本地
research环境缺少jieba。