Replies: 4 comments
|
Current main still doesn't expose headless resume. The |
|
Two independent data points for your "is the machinery actually reachable" question — from the other side of the plugin fence (we maintain pi2dsh, a Pi ABI compatibility engine; different problem, same seams):
On your mid-turn question I have no evidence either way — the crash-point behavior you measured is more than anyone else has published, so I'll defer to your data. Haven't run your plugin myself; the above is corroboration of the seams, not a review. |
这个场景我做过大量实测,headless resume 在恢复面上的答案(来自 dsh-checkpoint-rewind 与 dsh-claude-move 的实践):
关于「mid-turn jsonl.zstd 恢复合法性」:日志是按帧写入的,torn frame 会被恢复层拒绝(即 fail-closed),mid-turn 中断建议走 fork/seed 子会话续接——这点与 sylvesterkaczmarek 的结论一致。 |
|
Small update after checking current
So I would no longer treat the SIGTERM exit code as an accidental implementation bug. Changing it would be a deliberate CLI/process-exit semantics change.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR —
dsh --profile headlesscannot name or resume its session, so an unattended run that gets terminated is unrecoverable. I wrote a plugin that fixes it using only published API, and measured the crash behaviour. Three questions at the bottom, plus one thing that looks like a bug.The gap
The id is minted inside
run(), and headless takes no flag but--help— so the transcript lands on disk under an id nobody wrote down. Our runs are hours long on a host that SIGTERMs on every deploy.Everything needed is already there:
ctx.agents.resume()is published API and the JSONL persistence backend is already mounted in the headless bundle. Only the runner couldn't reach them. So — a--patchoverlay that disables theheadless-runnerrow and inserts a replacement:https://github.com/Outblock/dsh-headless-resumable — MIT, tagged
dsh-plugin, no fork, no vendoring.(CONTRIBUTING says you can't take external PRs at the moment. I asked before reading it — sorry. A plugin it is.)
It works, including the case I expected to be hard
0.1.0-rc.6, real runs killed at randomised points and relaunched throughctx.agents.resume():Thank you for that. The persistence README's "Durability and crash semantics" section is why we knew where to look, and it held up.
One thing looks like a bug, not a missing feature
In
runProfile:SIGINT correctly yields 130. SIGTERM yields 0 — so under Kubernetes, systemd, ECS, Fly or plain
docker stop, a headless run that was killed reports success, and a caller checking the exit code cannot tell it from a completed one.A plugin can only work around this by removing your listener at mount time (Node dispatches signal listeners in registration order and yours is registered first), which is a hack worth reporting rather than living with. Happy to split it into its own thread if that is easier to triage.
Questions
dsh --helpshows--profile tui --resume <session>in its examples but notuibundle ships in rc.6, so I could not tell whether that is a plan or just an argument-passthrough example.)turn/endrejecting as corruption?All reactions