Skip to content

diag(ime): 超时时刻记录子进程状态 (#40) - #228

Merged
JavaZeroo merged 1 commit into
mainfrom
diag/ime-timeout-state
Oct 30, 2026
Merged

JavaZeroo merged 1 commit into
mainfrom
diag/ime-timeout-state

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

内容

按 #40 的下一步建议,在超时分支补两个字段(不改期限、不改判据):

  • exit_at_timeout:process.poll() 在期限瞬间的返回值(None = 子进程仍在运行);
  • partial_stdout_bytes:TimeoutExpired.output 的长度(已读到的 stdout 字节数)。

为什么

run 40992735979 的同类复发里,ready_seconds=3.812、9 个检查点全部完成(worker-returned @5480 ms)、Job 0、cleanup_complete=true —— 未知已收窄到 worker-returned 之后(子进程退出 / stdout 排干)。这两个字段正好回答:超时时子进程是否还活着、已读了多少 stdout。

验证

python -m unittest research.ime.test_hosted_inventory → 29 tests OK(首版多算了一次 time.monotonic(),破坏了 mock 的调用序列,已去掉该字段)。

边界

Refs #40

On timeout the record now carries process.poll and the partial stdout length, which separates a live child from a drained-but-late one.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T03:37:33.958461Z d3f24d6 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@JavaZeroo
JavaZeroo merged commit c86045f into main Oct 30, 2026
6 checks passed
JavaZeroo added a commit that referenced this pull request Oct 31, 2026
本分支修改了 experiments/conpty/run.py(2022 基线改为记录制),但没有同步
benchmarks/tools/results/2026-10-29-c0-settings-*/ 里 source_files_sha256 记录的哈希,
导致 Windows 回归的 windterm_c0_settings_contract 断言失败:

  54fb4187…(快照记录)!= 3766879c…(工作区实际)

三处同步为当前 run.py 的 SHA-256(3766879c…):
- 2026-10-29-c0-settings-proposal/plan.json
- 2026-10-29-c0-settings-reference/plan.json
- 2026-10-29-c0-settings-reference/validation.json

不变的是契约本身:断言仍然要求快照与工作区一致,只是把记录更新到该分支的实际内容。
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.

1 participant