fix(sessions): 「卡在哪一步」物理上不可回答——transcript 无 step/turn 字段、checkpoints 默认空、失败事件全静默
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start at src/session/serialize.rs:9-41 (TranscriptEntry) and the kernel's MessageAppended emission to see where step information is already available but dropped. Then trace run_core.rs:1396 into runtime.rs:304-308 to see how an Err skips emit_turn_messages and TurnFinished, and pick where AgentEvent::TurnFailed and a HookEvent failure variant would slot into the existing 17. checkpoint_log.rs:37-72 writes checkpoints.jsonl, read by rewind.rs:57-65; decide what a crash-time snapshot must hold. Done means each proposed point verified by diff; runtime visibility is deferred to #124.
Written by the indexing model from the issue text.
Description
场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无 · 验收:代码 diff 逐点核对;运行时可见性另需 Langfuse(#124)
基线 origin/main = fc29f3d4。(事故驱动:flow run 失败后值守只能翻 stderr 尾巴反推。)
Summary
src/session/serialize.rs:9-41(TranscriptEntry):有 uuid/parent_uuid/role/content/tool_calls/usage/timestamp/audit——无 step、无 turn;跑了几步只能数 assistant 条目。- 唯一带 turn 的
checkpoints.jsonl(checkpoint_log.rs:37-72)是 on-demand(Goal 284 取消自动快照)——实测 232 条消息的会话 0 字节;空 log 让sessions rewind直接报错(rewind.rs:57-65"no checkpoints recorded")。 - 失败时事件面全静默:
run_core.rs:1396Err直接冒泡 →runtime.rs:304-308使 emit_turn_messages、TurnFinished、摘要日志全跳过;HookEvent17 变体无失败版(无 SessionEndErr/RunFailed)。
建议
TranscriptEntry 加 step: Option<usize>(kernel 已按 step 发 MessageAppended,只是没落);失败补 AgentEvent::TurnFailed { step, error } + HookEvent::SessionEndErr;checkpoints 加崩溃兜底快照。
- Dominant language
- Rust
- Stars
- 4
- Forks
- 0
- Avg merge
- 5h 32m
- Merged PRs (30d)
- 7
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jeffkit/recursive
-
Difficulty 3/5 Half a day Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
jeffkit/recursive#141 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
jeffkit/recursive#138 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
jeffkit/recursive#134 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
All issues in jeffkit/recursive
Similar issues
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 90/100
fastrevmd-lab/rustmistmcp#161 ·
-
arch-audit refactor
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
SocketDev/socket-patch#1011 ·
Maintainers usually reply within 1 day
-
bug user-priority/P2
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
opencode: an unanswered --version probe launches opencode 2 without per-session service isolationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
security-advisory
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MinBZK/regelrecht#1686 ·
Maintainers usually reply within 1 day