Restore persisted DSH sessions in governed Turns #9694
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.55) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 635 lines diff across 7 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
Diff Size
diff_size
0.386
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #9694"
general
weight: 0.35
loopx-agent
Goal And Delivered Outcome
An ordinary governed DSH Turn can continue its native session across processes. When the native transcript goes missing, the Turn returns a concrete recovery action before requesting model input, running independent task validation, or spending a quota slot. An authorized fresh Turn can establish the replacement session and the following Turn can continue it.
普通 DSH Turn 可以跨进程续接会话。历史丢失时,Turn 在请求模型、独立验收和扣账前停止,并给出可执行的恢复动作。获准的新一轮可以建立新的会话,后续 Turn 可继续该会话。
Author Declaration
Implemented against
0.2.2rc2. DSH SDK restoration reference| Criterion | Delivered behavior | Verification |
| --- | --- | --- |
| Plan and dispatch the same ordinary DSH session | The detailed built-in plan projects cold start or compatible binding without starting the SDK. The built-in and v1 stdio adapters verify native restoration at dispatch. | Cold/warm plans, native read and independent artifact validation in fresh processes. |
| Supervise session loss and recovery | A profile-bound opaque record distinguishes a first launch from missing known history. The built-in host reports
session_missing. Stdio returnsiteration_failedand exposes its recovery action in JSON and Markdown. | Both transports stop on transcript loss before a provider request, writeback or debit. A fresh Turn succeeds and the following Turn observes that fresh session's prior result. || Preserve original transaction recovery | Automatic session lookup keeps the cold transaction key for unchanged work. Explicit
--resume-turn-keyand--resume-turn-instance-idreplay the original journal across a work frontier change. | Both original locators replay without additional provider input or debit. Retargeting a replay is refused. || Keep authority scoped to the Work Contract | The host stores only its opaque session identity. Goal, Todo and profile boundaries still apply to dispatch. | Changed-model, corrupt-history, stopped-Goal and legacy pinned SDK cases. |
Scope And Continuation
0.1.5rc1. The pinned pair still runs a fresh governed Turn and reads a workspace file. The ordinary adapter and managed operation transport have separate session records. DSH connector guide--iteration-context fresh. To recover a lost Turn reply, use the original journal locator.Validation
122a203f8a492d2f1a825ac0ad45823d00d27b14against1bdf851e9447bc7c22ab29d10948a674bf4687c4.finished.synthetic.| Check kind | Result | Public-safe evidence |
| --- | --- | --- |
|
real_entrypoint|passed| Isolated installedturn plan,turn run-once --host dsh, and the v1 stdio adapter. A subsequent model input includes the first native result and an independent file witness read using the SDK's workspace tool. Two successful Turns settle two debits. ||
real_backend|passed| Published SDK and bundled runtime on Linux arm64 with an isolated loopback model endpoint. LoopX wheel SHA-256f5868be4010a50c39218bdbd224036c7d839d1e8c66ae6eea77e7cd8c440f456. ||
regression_parity|passed| Eight packaged cases cover valid continuation, loss, fresh recovery, exact replay, profile changes, corrupt history, Stop and a fresh read on the pinned SDK. The loss itself adds zero model requests and zero debits for each transport. ||
unit|passed| 423 focused exact-head tests passed. ||
static|passed| Local premerge and exact-scope change-quality receiptcqr_4611a532b9a192d6d1ac. One existing advisory inloopx/status.pyreproduces on the unchanged base. |Frontend / Visual Evidence
none. The affected product readback is the CLI.Type And Area
Boundary Checklist