@tea-agent/loop-agent 0.16.16 → 0.16.17
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
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
- Pi SDK 执行长推理或大段结构化输出时不再把高频流式增量事件无界累积到内存;同一响应在多个生命周期事件中重复出现的 Token 用量只统计一次,避免 `Invalid string length` 和成本数据虚高。
|
|
23
23
|
- 后端测试复合执行节点继续保持 clean environment、失败分类和 fail-closed outcome,并为 initial/final Result、repair eligibility、traceability 与 Observe 投影保留结构化运行证据。
|
|
24
24
|
|
|
25
|
+
## [0.16.17] - 2026-07-20
|
|
26
|
+
|
|
27
|
+
### 修复
|
|
28
|
+
|
|
29
|
+
- backend-test execution 合同在 `in-process` 且 `existingFixtures: []` 时注入非秘密默认 fixture(优先 server bootstrap),避免 near-schema 侦察输出在 contracts 门 fail-closed。
|
|
30
|
+
|
|
25
31
|
## [0.16.16] - 2026-07-20
|
|
26
32
|
|
|
27
33
|
### 修复
|
|
@@ -341,23 +341,53 @@ export function sanitizeBackendTestExecutionInput(value) {
|
|
|
341
341
|
return value;
|
|
342
342
|
const next = { ...record };
|
|
343
343
|
const managed = asRecord(record.managedCommand);
|
|
344
|
-
if (
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
344
|
+
if (managed) {
|
|
345
|
+
const cleaned = {};
|
|
346
|
+
for (const key of ["start", "stop", "sourceRef"]) {
|
|
347
|
+
const raw = managed[key];
|
|
348
|
+
if (typeof raw === "string" && raw.trim())
|
|
349
|
+
cleaned[key] = raw.trim();
|
|
350
|
+
}
|
|
351
|
+
if (next.targetMode === "managed-command") {
|
|
352
|
+
next.managedCommand = cleaned;
|
|
353
|
+
}
|
|
354
|
+
else if (Object.keys(cleaned).length === 0) {
|
|
355
|
+
delete next.managedCommand;
|
|
356
|
+
}
|
|
357
|
+
else {
|
|
358
|
+
// in-process / external: optional managedCommand must not carry empty strings
|
|
359
|
+
next.managedCommand = cleaned;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
// Near-schema scouts sometimes emit in-process with existingFixtures: [].
|
|
363
|
+
// Only rewrite near-schema payloads here; free-form envelopes keep empty/missing
|
|
364
|
+
// fixtures so coerceBackendTestExecutionInput can map discoveredFixtures first.
|
|
365
|
+
const nearSchema = typeof next.framework === "string" &&
|
|
366
|
+
asRecord(next.runner) !== null &&
|
|
367
|
+
typeof next.testRoot === "string";
|
|
368
|
+
const fixtures = Array.isArray(next.existingFixtures) ? next.existingFixtures : null;
|
|
369
|
+
if (nearSchema &&
|
|
370
|
+
(next.targetMode === "in-process" || next.targetMode === undefined) &&
|
|
371
|
+
(!fixtures || fixtures.length === 0)) {
|
|
372
|
+
const managedStart = asRecord(next.managedCommand) &&
|
|
373
|
+
typeof asRecord(next.managedCommand).start === "string"
|
|
374
|
+
? String(asRecord(next.managedCommand).start)
|
|
375
|
+
: "";
|
|
376
|
+
next.existingFixtures = [
|
|
377
|
+
managedStart.includes("server")
|
|
378
|
+
? {
|
|
379
|
+
name: "server-bootstrap",
|
|
380
|
+
sourcePath: "server.js",
|
|
381
|
+
kind: "server-bootstrap",
|
|
382
|
+
}
|
|
383
|
+
: {
|
|
384
|
+
name: "pytest-test-root",
|
|
385
|
+
sourcePath: BACKEND_TEST_EXECUTION_DEFAULT_TEST_ROOT,
|
|
386
|
+
kind: "test-root",
|
|
387
|
+
},
|
|
388
|
+
];
|
|
389
|
+
if (next.targetMode === undefined)
|
|
390
|
+
next.targetMode = "in-process";
|
|
361
391
|
}
|
|
362
392
|
return next;
|
|
363
393
|
}
|