taskforce-loop-engineering 0.15.17 → 0.15.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.15.18 - 2026-09-18
|
|
6
|
+
|
|
7
|
+
- Recover non-zero dispatcher runs that report OpenClaw's missing user-visible-answer prompt by rotating the runtime session and requeueing the task.
|
|
8
|
+
- Preserve structured `incomplete_turn` and abandoned-liveness recovery even when a dispatcher wrapper exits successfully.
|
|
9
|
+
- Prevent successful recovered turns or ordinary task text that quotes the prompt from being misclassified and replayed.
|
|
10
|
+
- Add regression coverage for both recoverable failure and successful-output false-positive cases.
|
|
11
|
+
|
|
5
12
|
## 0.15.17 - 2026-09-13
|
|
6
13
|
|
|
7
14
|
- Stop OpenClaw doctor and disposable smoke probes from attaching the synthetic `doctor` account to dry-run notifications.
|
package/lib/core.mjs
CHANGED
|
@@ -9009,6 +9009,12 @@ const DEFAULT_RECOVERABLE_RUNTIME_PATTERNS = [
|
|
|
9009
9009
|
{ category: 'incomplete_turn', pattern: '"kind": "incomplete_turn"' },
|
|
9010
9010
|
{ category: 'incomplete_turn', pattern: '"livenessState": "abandoned"' },
|
|
9011
9011
|
{ category: 'incomplete_turn', pattern: 'stopped before confirming the turn was complete' },
|
|
9012
|
+
// The OpenClaw embedded runner injects a recovery prompt when an assistant
|
|
9013
|
+
// turn completes its tool calls without a user-visible answer. A dispatch
|
|
9014
|
+
// that exits non-zero with this signature hit a session protocol failure,
|
|
9015
|
+
// not a task defect: classify it as a recoverable incomplete turn so the
|
|
9016
|
+
// runtime recovery path rotates the worker session and resumes.
|
|
9017
|
+
{ category: 'incomplete_turn', pattern: 'did not produce a user-visible answer', nonZeroOnly: true },
|
|
9012
9018
|
{ category: 'compaction_timeout', pattern: 'compaction timed out' },
|
|
9013
9019
|
{ category: 'compaction_timeout', pattern: 'transcript compaction failed' },
|
|
9014
9020
|
{ category: 'transport_error', pattern: 'connection reset' },
|
|
@@ -9030,7 +9036,12 @@ export function dispatchFailureClassification(result, retry = {}) {
|
|
|
9030
9036
|
// exitCode=0 or the queue may accept partial work and replay a stale gate.
|
|
9031
9037
|
const output = `${result.stderr ?? ''}\n${result.stdout ?? ''}`.toLowerCase();
|
|
9032
9038
|
const runtimePatterns = retry.recoverableRuntimePatterns ?? DEFAULT_RECOVERABLE_RUNTIME_PATTERNS;
|
|
9033
|
-
const runtimeMatch = runtimePatterns.find((entry) =>
|
|
9039
|
+
const runtimeMatch = runtimePatterns.find((entry) => {
|
|
9040
|
+
const pattern = typeof entry === 'string' ? entry : entry.pattern;
|
|
9041
|
+
const nonZeroOnly = typeof entry === 'object' && entry !== null && entry.nonZeroOnly === true;
|
|
9042
|
+
return (!nonZeroOnly || result.exitCode !== 0)
|
|
9043
|
+
&& output.includes(String(pattern ?? entry).toLowerCase());
|
|
9044
|
+
});
|
|
9034
9045
|
if (runtimeMatch) {
|
|
9035
9046
|
return {
|
|
9036
9047
|
category: runtimeMatch.category ?? 'runtime_interruption',
|
package/package.json
CHANGED
|
@@ -66,6 +66,86 @@ assert.equal(inferTaskScope({ body: 'Continue the overall project with a product
|
|
|
66
66
|
assert.equal(classification.requiresHumanAction, false);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
{
|
|
70
|
+
// The OpenClaw embedded runner injects a recovery prompt when an assistant
|
|
71
|
+
// turn completes tool calls without a user-visible answer. A non-zero exit
|
|
72
|
+
// with this signature is a recoverable session protocol failure, so the
|
|
73
|
+
// runtime recovery path must rotate the worker session, not fail the task.
|
|
74
|
+
const classification = dispatchFailureClassification({
|
|
75
|
+
exitCode: 1,
|
|
76
|
+
timedOut: false,
|
|
77
|
+
stderr: '',
|
|
78
|
+
stdout: JSON.stringify({
|
|
79
|
+
finalPromptText: 'The previous assistant turn completed its tool calls but did not produce a user-visible answer. Continue from the current transcript and produce the final user-visible answer now. Do not repeat completed tool calls or restart from scratch.',
|
|
80
|
+
finalAssistantVisibleText: 'The tool run finished, but no final summary was produced. I did not repeat any completed actions.',
|
|
81
|
+
replayInvalid: true,
|
|
82
|
+
livenessState: 'working',
|
|
83
|
+
completion: { stopReason: 'stop', finishReason: 'stop' }
|
|
84
|
+
}, null, 2)
|
|
85
|
+
});
|
|
86
|
+
assert.equal(classification.category, 'incomplete_turn');
|
|
87
|
+
assert.equal(classification.recoverableRuntime, true);
|
|
88
|
+
assert.equal(classification.requiresHumanAction, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
{
|
|
92
|
+
// A healthy turn may still carry replayInvalid on the session. With a real
|
|
93
|
+
// final visible answer and exitCode 0 it must stay a plain success.
|
|
94
|
+
const classification = dispatchFailureClassification({
|
|
95
|
+
exitCode: 0,
|
|
96
|
+
timedOut: false,
|
|
97
|
+
stderr: '',
|
|
98
|
+
stdout: JSON.stringify({
|
|
99
|
+
finalAssistantVisibleText: '本轮已完成并写入 cp546.json。',
|
|
100
|
+
finalAssistantRawText: '本轮已完成并写入 cp546.json。',
|
|
101
|
+
replayInvalid: true,
|
|
102
|
+
livenessState: 'working',
|
|
103
|
+
completion: { stopReason: 'stop', finishReason: 'stop' }
|
|
104
|
+
}, null, 2)
|
|
105
|
+
});
|
|
106
|
+
assert.equal(classification.category, 'ok');
|
|
107
|
+
assert.equal(classification.recoverableRuntime, undefined);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
{
|
|
111
|
+
// A recovered turn may retain the earlier recovery prompt in its result.
|
|
112
|
+
// Once the wrapper exits successfully with a real visible answer, the weak
|
|
113
|
+
// natural-language signature must not override the successful outcome.
|
|
114
|
+
const classification = dispatchFailureClassification({
|
|
115
|
+
exitCode: 0,
|
|
116
|
+
timedOut: false,
|
|
117
|
+
stderr: '',
|
|
118
|
+
stdout: JSON.stringify({
|
|
119
|
+
finalPromptText: 'The previous assistant turn completed its tool calls but did not produce a user-visible answer. Continue from the current transcript and produce the final user-visible answer now.',
|
|
120
|
+
finalAssistantVisibleText: 'Recovery completed successfully; the final result is ready.',
|
|
121
|
+
finalAssistantRawText: 'Recovery completed successfully; the final result is ready.',
|
|
122
|
+
replayInvalid: false,
|
|
123
|
+
livenessState: 'working',
|
|
124
|
+
completion: { stopReason: 'stop', finishReason: 'stop' }
|
|
125
|
+
}, null, 2)
|
|
126
|
+
});
|
|
127
|
+
assert.equal(classification.category, 'ok');
|
|
128
|
+
assert.equal(classification.recoverableRuntime, undefined);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
{
|
|
132
|
+
// Successful tasks can legitimately discuss the OpenClaw diagnostic text.
|
|
133
|
+
// Quoting it in task content must not turn a successful dispatch into a
|
|
134
|
+
// recoverable runtime interruption.
|
|
135
|
+
const classification = dispatchFailureClassification({
|
|
136
|
+
exitCode: 0,
|
|
137
|
+
timedOut: false,
|
|
138
|
+
stderr: '',
|
|
139
|
+
stdout: JSON.stringify({
|
|
140
|
+
taskBody: 'Review the diagnostic text "did not produce a user-visible answer" and propose a regression test.',
|
|
141
|
+
finalAssistantVisibleText: 'The review is complete and the regression test is documented.',
|
|
142
|
+
completion: { stopReason: 'stop', finishReason: 'stop' }
|
|
143
|
+
}, null, 2)
|
|
144
|
+
});
|
|
145
|
+
assert.equal(classification.category, 'ok');
|
|
146
|
+
assert.equal(classification.recoverableRuntime, undefined);
|
|
147
|
+
}
|
|
148
|
+
|
|
69
149
|
{
|
|
70
150
|
const classification = dispatchFailureClassification({
|
|
71
151
|
exitCode: 0,
|