Skip to content

fix: Windows 选路径、文件占用重试、主循环退出事件、潜影盒 - #293

Merged
Phantivia merged 5 commits into
mainfrom
fix/triage-1021
Oct 21, 2026
Merged

Phantivia merged 5 commits into
mainfrom
fix/triage-1021

Conversation

@Phantivia

Copy link
Copy Markdown
Member

验证:pnpm test(5007 通过)与 pnpm run typecheck 全绿;新测试覆盖 Windows 上占用两次后放开时 save 落盘、一直占用时抛出。PowerShell 改名的后果在本机 PowerShell 里确认过;没在真机点过选文件夹按钮,潜影盒没进游戏实测。

🤖 Generated with Claude Code

Phantivia and others added 5 commits October 21, 2026 16:24
- 根因:终端/控制台改名时脚本里的 [Console]:: 一起被换成 [WebUI]::。PowerShell 找不到类型只报语句级错误,对话框照弹,路径没写到 stdout,退出码 0,前端当成取消
- 已在本机 PowerShell 确认 [WebUI]:: 报 TypeNotFound 后脚本继续执行

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 根因:杀毒软件、索引器、同步盘在文件刚写完时短暂独占它,rename 报 EBUSY,错误冒到主循环把它停掉
- retryBusy 只在 Windows 上对 EBUSY/EPERM/EACCES 重试,同步调用总共等约半秒,仍失败照原样抛出;同 graceful-fs 的做法
- 测试覆盖:占用两次后放开时 save 落盘,一直占用时抛出

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 追加时 open 失败还没写进任何字节,重试不会写重

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 原色与 16 种染色共 17 种;mineflayer openContainer 本来就支持
- 挖方块的账本保护名单不加:潜影盒挖下来物品还在盒里

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 宿主订阅 runlog 按 event 判断,不比对说明文字
- Core 本身仍只记录并停定时器,进程去留归宿主

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
export const CHEST_BLOCKS = ['chest', 'trapped_chest', 'barrel', 'ender_chest'] as const;
export const CHEST_BLOCKS = [
'chest', 'trapped_chest', 'barrel', 'ender_chest',
'shulker_box', 'white_shulker_box', 'orange_shulker_box', 'magenta_shulker_box', 'light_blue_shulker_box',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

这两处 bug 修复的 diff 里没有能在修复前失败的测试。

CONTRIBUTING.md「What is accepted」要求:Bug fixes in the runtime, the WebUI, the extension loader and the bundled Worlds and providers, with a test that fails before the fix.

  • src/worlds/minecraft/chests.ts 第 15 行:17 种潜影盒进入 CHEST_BLOCKS(chestsIn / CONTAINER_FIND / take 都读这份名单)。tests/worlds/minecraft/chests.test.ts 已有「chestsIn 只回箱子族」用例,本 diff 没给潜影盒加上对应断言。
  • src/web/path-picker.ts 第 160、182、184 行:[WebUI]:: 改回 [Console]::。diff 里没有覆盖 WINDOWS_SCRIPT 的测试。

请补上修复前会失败的测试,或把不测的理由写进 PR 说明。

— Cortico PR Gate via Cursor Cloud Agent

@Phantivia
Phantivia merged commit 2299c24 into main Oct 21, 2026
4 checks passed
@Phantivia
Phantivia deleted the fix/triage-1021 branch October 21, 2026 21:59
Phantivia added a commit to Pal-AI-Lab/Coopanion that referenced this pull request Oct 21, 2026
Phantivia added a commit to Pal-AI-Lab/Coopanion that referenced this pull request Oct 21, 2026
* build(vendor): cortico 52c26963→2299c24b,Windows 选路径、文件占用重试、主循环退出事件

- Pal-AI-Lab/Cortico#293

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(core): 主循环异常退出时 Core 进程跟着退出,由应用重启

- 根因:主循环停了进程还活着,界面停在处理中,排队消息没人取;Windows 上落盘遇到文件占用就会这样
- 按 Cortico 的 loop-exit 日志判断,上报 crash 后走正常关机,应用照崩溃重启(5 分钟内最多 5 次),重启后补投未送达的消息
- Closes #270

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(core): Coo 默认上下文阶段预算 128k,交接保留比例 0.25

- 只改 Coo 的默认值,不动 Cormini;在「上下文与交接」里保存过的配置保留原值,不迁移
- Closes #288

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Minecraft:潜影盒未纳入容器识别名单,导致无法存取物品(或许还漏了其他容器)

1 participant