fix(test): publish shell owner readiness markers atomically #6135
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 251 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.331
Real PR Conversation Timeline
1 comments
"Review active on #6135"
general
weight: 0.35
Astro-Han
Summary
The shell owner-death tests can read an empty readiness marker between file creation and the first JSON write, causing a JSON parse failure before they exercise owner death. Write the complete marker to a temporary file and rename it into place in both test fixtures. The existing process termination and delayed-write assertions remain unchanged; production behavior is unchanged.
Extracted from #6091 so the unrelated CI reliability fix can be reviewed independently.
Verification
@maka/core,@maka/storage, and@maka/runtimesuccessfully.shell-owner-death.test.jssuite three consecutive times on macOS: 6 tests per run, 18 executions, no failures or skips.AI use
Tool(s) and scope: OpenAI Codex extracted the existing fixture fix, ran validation, and prepared this PR. The commit retains its
Generated-by: OpenAI Codextrailer.Checklist
The existing owner-death suite covers both marker producers; reproducing the pre-fix empty-file race depends on scheduling.
Does this PR entail a change in behavior?
<details>
<summary>点击展开中文</summary>
Shell owner-death 测试的就绪标记先创建文件、再写入 JSON,轮询可能读到空文件并提前解析失败。此修复让两个测试 fixture 先把完整 JSON 写入临时文件,再通过重命名发布标记,保留原有的进程回收和延迟写入断言,不改变生产代码。
该修复从 #6091 拆出,单独审查。
验证:core、storage、runtime 构建成功;完整 owner-death 测试连续三轮通过,每轮 6 项,共 18 次执行,无失败或跳过;runtime 类型检查、变更文件 lint/格式检查,以及提交时的许可证、协议版本和空白检查通过。Windows 由 CI 验证。原竞态依赖调度时机,本次没有增加确定性的故障注入测试。
</details>