Skip to content

fix: retain native turn work across transient persistence failures - #74

Merged
forrestlinfeng merged 6 commits into
EvoMap:mainfrom
imxyanua:codex/recover-native-turn-failures
Nov 11, 2026
Merged

forrestlinfeng merged 6 commits into
EvoMap:mainfrom
imxyanua:codex/recover-native-turn-failures

Conversation

@imxyanua

Copy link
Copy Markdown
Contributor

Summary

A temporary evidence read failure could permanently close a verified native turn. A report queue write failure could preserve its retry payload but skip the work candidate and retention bookkeeping.

Reopen only a failed pre-write evidence read for the same turn, epoch and settlement. Release uncommitted notes claims for immediate recovery. When report enqueue fails after its retry payload is cached, finish the turn bookkeeping before surfacing the original error.

Evidence

  • Regression tests reproduce terminal-record, saved-note and edit-baseline read failures through real file stores, then replay once without duplicate reports or candidates.
  • A newer prompt is protected from an older failed read reopening it.
  • The queue regression checks that the captured model route, candidate and retention survive before the original report retries.
  • Native, lifecycle, storage, monitor and architecture tests passed 120/120 on Windows Node 22.23.4 and 26.13.0.
  • A locally prepared adaptation to Run Kimi on the shared late-terminal mechanism and drop its own #68 passed 94 relevant tests on Node 26. That PR removes the old native-specific paths, so its merge needs the shared recovery changes retained.
  • Includes the captured-null owner fix also on fix: preserve replacement drafts and captured native owners #70 for the existing Windows CI hook budget.

Merge Danger

Two-way. Reopening is limited to errors before writes. The report queue error is still surfaced. Immediate evidence recovery requires access to the claim files.

@evomap-aiqa-bot

evomap-aiqa-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 2 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=74、head_sha="cef26f362b4d2feec0269851db45e0f5f65d2225",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 cef26f362b4d

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 2 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] 会话 epoch 在 notes/baseline 读取期间变化时,旧 turn 仍会入队报告 — PR 将 epoch 校验移动到 recordOf 之后、notes.take 之前,却未在两个异步 evidence take 完成后再�...(truncated) · lib/app/turn-end.js · advisory_d6563864f4e1d6b1df09ac36
  • [P3] 释放认领失败会使重试丢失已保存的 turn 证据 — release() 仅通过把 .taking 文件的 mtime 设为 0 来使认领立即过期,但新增代码吞掉了 utimesS...(truncated) · ``lib/runtime/store/file-lock.js`` · advisory_393fad90650d4e5755dcda62`

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 cef26f362b4d

forrestlinfeng and others added 4 commits November 11, 2026 10:18
EvoMap#68 removed the deferred native-turn path; the evidence-read reopen, claim release and queue-failure bookkeeping
are ported onto main's single turnEnded path. The owner fix in turn-end.js is reviewed with EvoMap#70.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only a native turn caches its reports with their evidence when the queue fails. Elsewhere the injections stay
unreported for a later end, which remembers their retention with its own edits, so this end must not as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A claim released at the epoch looked days past the evidence lifetime, so the next background run could delete
evidence the turn's redelivery was about to take.

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

evomap-aiqa-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Sentinel 已审核此变更,未发现已核验问题,但发现需要人工确认的风险。

另有 2 个需要人工确认的风险;黄色 advisory 不阻塞合并,建议开发 agent review advisory 评论并逐条确认。

开发 agent 查询详情: 调用 MCP 工具 sentinel_pr_review_context,传入 owner_repo="evomap/evolver-agent-plugin"、pr_number=74、head_sha="d580d73229983aefdfee340a749bf7fda295ca76",并按条目追加 finding_id 或 finding_key。

由 Sentinel 审核 · 目标提交 d580d7322998

@forrestlinfeng
forrestlinfeng merged commit 04ced85 into EvoMap:main Nov 11, 2026
7 checks passed
@forrestlinfeng

Copy link
Copy Markdown
Contributor

Merged with maintainer changes: main merged in (reopen / claim release / queue-failure moved onto main's single turn-end path); a released claim's mtime is now set just past the 60 s claim timeout instead of 1970, which let the next pruning pass delete it as expired before redelivery (test now prunes before the second take); continuing after a queue failure is limited to native hosts, where reports are kept with their evidence; notes-store release is now required instead of ?.. Thanks!

@evomap-aiqa-bot

Copy link
Copy Markdown

Sentinel 保留了 2 个尚未确认的审核候选。这些黄色条目不阻塞合并;红色 P0/P1 与其他独立硬门禁不受影响。 单一猜测、缺少变更行证据或纯 checklist 的候选会统一降为 P3。
开发 agent:请 review 以下 advisory,并逐条给出“已验证无风险 / 已修复 / 转为后续事项”的结论;不要只做整体确认。

  • [P3] release 更新时间失败被吞掉,立即重试可能把空 evidence 当成最终结果 — release() 依赖回调 .taking 文件的 mtime 使其立即过期,但新增代码无条件吞掉 utimesSync 错�...(truncated) · lib/runtime/store/file-lock.js · advisory_b79d31ebfcdc9e38db55f9b2
  • [P3] 证据读取期间切换 epoch 仍可为旧 turn 入队报告 — readTurnEvidence 在开始和 recordOf 后检查 epoch,但在 await ports.notes.take(...)、await ports.baselin...(truncated) · lib/app/turn-end.js·advisory_fe59bda66e2902263ce44484`

需要完整证据时,可用行末 finding_key 查询 Sentinel PR review context。

由 Sentinel 审核 · 目标提交 d580d7322998

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.

2 participants