You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "liugddx (via GitHub)" <gi...@apache.org> on 2026/08/28 09:16:31 UTC
[PR] fix(desktop): offer safe resume after completed tool timeout [maka]
liugddx opened a new pull request, #4075:
URL: https://github.com/apache/maka/pull/4075
## Summary
- expose safe continuation guidance when a failed Turn timed out after a completed Tool Result
- make the Desktop resume candidate detector require a completed tool result for timeout recovery
- preserve fail-closed Runtime planner validation; incomplete or errored tools remain in inspection/parked flows
- add renderer presentation and candidate-selection regression tests
## Scope
This is the first Desktop recovery slice for #4074. It does not change Runtime tool execution, does not re-run tools, and does not change the `MAKA_RUNTIME_SAFE_BOUNDARY_RESUME` rollout flag. The existing `turn.resume.query/start` planner remains the authority for whether continuation may actually start.
Related: #4074
## Validation
- `npm --workspace @maka/desktop run typecheck`
- `npm --workspace @maka/desktop run build:main`
- `node --test "dist/main/__tests__/session-status-presentation.test.js" "dist/main/__tests__/interrupted-resume.test.js"`
- `npx biome check` on changed files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): offer safe resume after completed tool timeout [maka]
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4075:
URL: https://github.com/apache/maka/pull/4075#issuecomment-5454206668
Addressed the review: timeout Safe Resume now requires a non-empty tool set where every tool is completed; mixed [completed, interrupted] and errored/incomplete tool states remain gated. Added a regression using materializeTurns() to cover the persisted mixed shape. Rebased onto current main (including #4073) and force-pushed; new head is 1eb6ab006.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): offer safe resume after completed tool timeout [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #4075:
URL: https://github.com/apache/maka/pull/4075#discussion_r3883127475
##########
apps/desktop/src/renderer/interrupted-resume.ts:
##########
@@ -21,14 +21,24 @@ export interface InterruptedResumeTurn {
turnId: string;
status: string;
errorClass?: string;
+ /** Tool activity already has a durable result in the rendered Turn. */
+ tools?: readonly { status: string }[];
}
export function latestInterruptedResumeTurnId(
turns: readonly InterruptedResumeTurn[],
): string | undefined {
const latestTurn = turns.at(-1);
- return latestTurn?.status === 'failed'
- && latestTurn.errorClass?.toLowerCase() === 'app_restarted'
- ? latestTurn.turnId
- : undefined;
+ if (latestTurn?.status !== 'failed') return undefined;
+ const errorClass = latestTurn.errorClass?.toLowerCase();
+ if (errorClass === 'app_restarted') return latestTurn.turnId;
+ if (
+ errorClass?.includes('timeout') &&
Review Comment:
Thanks for tightening up the mixed-tool case. The earlier issue is fixed, and the `materializeTurns()` test now covers the real `[completed, interrupted]` shape.
**[P2] Do not offer timeout recovery when Safe Resume is disabled**
Safe-boundary resume is off by default unless `MAKA_RUNTIME_SAFE_BOUNDARY_RESUME=1` is set. I could not find a production Desktop startup path that enables it, but this branch now exposes the action for its normal target case: a timeout after completed tools. Clicking it in the default configuration always parks with `resume_feature_disabled`.
Runtime still fails closed, so this is not a safety problem. It is a UX problem: the button promises a recovery action that cannot run. Could we either hide it when the Runtime capability is disabled, or make enabling the capability part of this rollout?
AI-assisted review: Codex coordinated an `@reviewer` pass. I checked the exact-head diff, the Runtime capability gate, the renderer path, and the final severity. Astro-Han owns this review decision.
<details><summary>简体中文</summary>
谢谢把混合工具状态的问题补完整。之前的问题已经修好,`materializeTurns()` 测试也覆盖了真实的 `[completed, interrupted]` 投影。
现在还剩一个 P2:Safe Resume 默认关闭,只有设置 `MAKA_RUNTIME_SAFE_BOUNDARY_RESUME=1` 才能使用,但这里会在默认 Desktop 中为“工具已完成后超时”的情况显示恢复按钮。用户点击后只会得到 `resume_feature_disabled`。
Runtime 仍会安全地拒绝执行,所以这不是安全问题,但按钮在默认配置下无法完成它承诺的操作。可以在能力未开启时隐藏按钮,或者把开启该能力纳入这次发布。
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): offer safe resume after completed tool timeout [maka]
Posted by "M4n5ter (via GitHub)" <gi...@apache.org>.
M4n5ter merged PR #4075:
URL: https://github.com/apache/maka/pull/4075
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] fix(desktop): offer safe resume after completed tool timeout [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #4075:
URL: https://github.com/apache/maka/pull/4075#discussion_r3883127475
##########
apps/desktop/src/renderer/interrupted-resume.ts:
##########
@@ -21,14 +21,24 @@ export interface InterruptedResumeTurn {
turnId: string;
status: string;
errorClass?: string;
+ /** Tool activity already has a durable result in the rendered Turn. */
+ tools?: readonly { status: string }[];
}
export function latestInterruptedResumeTurnId(
turns: readonly InterruptedResumeTurn[],
): string | undefined {
const latestTurn = turns.at(-1);
- return latestTurn?.status === 'failed'
- && latestTurn.errorClass?.toLowerCase() === 'app_restarted'
- ? latestTurn.turnId
- : undefined;
+ if (latestTurn?.status !== 'failed') return undefined;
+ const errorClass = latestTurn.errorClass?.toLowerCase();
+ if (errorClass === 'app_restarted') return latestTurn.turnId;
+ if (
+ errorClass?.includes('timeout') &&
Review Comment:
**[P2] Do not offer timeout recovery when Safe Resume is disabled**
Safe-boundary resume is off by default unless `MAKA_RUNTIME_SAFE_BOUNDARY_RESUME=1` is set. I could not find a production Desktop startup path that enables it, but this branch now exposes the action for its normal target case: a timeout after completed tools. Clicking it in the default configuration always parks with `resume_feature_disabled`.
Runtime still fails closed, so this is not a safety problem. It is a UX problem: the button promises a recovery action that cannot run. Could we either hide it when the Runtime capability is disabled, or make enabling the capability part of this rollout?
<details><summary>简体中文</summary>
Safe Resume 默认关闭,只有设置 `MAKA_RUNTIME_SAFE_BOUNDARY_RESUME=1` 才能使用,但这里会在默认 Desktop 中为“工具已完成后超时”的情况显示恢复按钮。用户点击后只会得到 `resume_feature_disabled`。
Runtime 仍会安全地拒绝执行,所以这不是安全问题,但按钮在默认配置下无法完成它承诺的操作。可以在能力未开启时隐藏按钮,或者把开启该能力纳入这次发布。
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org