Repository navigation
低优硬化:孤儿结果清扫、转录容错读、worker home 派生、跨实例读 (PR-4) - #32
Merged
Fei2411 merged 3 commits intoOct 6, 2026
Merged
Conversation
- start() 清扫 results/ 里无 task 行引用的孤儿文件,foreign-live 守卫不误删兄弟实例(A1) - read_events 改 errors=replace,与 read_events_tail 容错对齐(H-09) - build_worker_env 增加 home 参数,worker 嵌套 home 从注册表 home 派生(G2) - check_task/get_result 加磁盘只读回落并带 from_state 标记;生命周期仍归 owner(F5) - G5 刻意不改码:坏 TOML fail-fast 是刻意契约,降级启动属过度设计
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
- 孤儿清扫在 state 文件锁内重读任务行,消除启动快照与 unlink 之间的 TOCTOU 窗口;state 不可读时整段跳过 - _load_state quarantine 置标志——state 为空是'损坏'而非'无任务',此时整段跳过清扫,防止误删 corrupt 文件中任务的结果 - 磁盘回落行的 silent_for_sec 报 None:状态时钟跟随 owner 实例,本实例无实时语义,0 会误读为刚活跃
FileLockTimeout 是 TimeoutError 而非 OSError——兄弟实例慢写持锁时 file_lock 超时逃出捕获域,把一个可选清扫变成了启动失败。捕获 TimeoutError 并跳过清扫
Fei2411
pushed a commit
that referenced
this pull request
Oct 6, 2026
- 新增 diagnostics.redact_diagnostic,task.error/warnings、Codex/Antigravity 错误事件落盘前脱敏 - [env] deny 支持用户配置的 glob 名单,显式 set/agent env 优先;无内置禁止名单;dsh 回填同样遵守 - [agents.<name>] permission_policy:allow_once(默认)/ allow_always / deny;allow_once 下不选择 allow_always - 同步 ORCHESTRATION、SETUP、skill 与 agents.toml.example 中 #29–#32 的契约变化
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
剩余低优项的最小修复(刻意不做过度防御)。
start()清扫results/下无 task 行引用的task_*.txt孤儿文件(崩溃于结果写与 save 之间的残留);foreign_task_ids守卫——兄弟实例的文件不误删。read_events改errors="replace",坏行走既有 JSONDecodeError skip,与read_events_tail行为对齐。build_worker_env(home=…),三个适配器传self.home——worker 嵌套 home 从注册表 home 派生,不再误用协调器 env 里的AGENT_BRIDGE_HOME。check_task/get_result对非本实例 task 加磁盘只读回落(_merge_owned本就留着兄弟行),返回带from_state: true;wait_task/cancel_task刻意不动——生命周期归 owner。测试:+4 用例,全套 625 passed / 1 skipped。
Link to Devin session: https://app.devin.ai/sessions/b270264aa3634bc5934cad9bcec9f9ae
Open in Devin Desktop: https://app.devin.ai/desktop/session/b270264aa3634bc5934cad9bcec9f9ae?variant=devin
Requested by: @FeiZhuLulu