refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -229,16 +229,20 @@ describe("关键合同行为", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("capabilitySpec 组装目录元数据与真实 schema;有副作用的类别不可重放", () => {
|
||||
it("capabilitySpec 组装目录元数据与真实 schema;写入仅明确的幂等例外可重放", () => {
|
||||
for (const id of C.CAPABILITY_IDS) {
|
||||
const spec = C.capabilitySpec(id);
|
||||
const { inputSchema: _i, outputSchema: _o, ...meta } = C.CAPABILITY_CATALOG[id];
|
||||
expect(spec).toMatchObject(meta);
|
||||
expect(spec.inputSchema).toBe(C.CAPABILITY_IO[id].input);
|
||||
expect(spec.outputSchema).toBe(C.CAPABILITY_IO[id].output);
|
||||
// 例外:site.health_check 只读首页并写回健康列,幂等可重跑;metadata.enrich 只存补全建议(7 天标题缓存),重跑无副作用
|
||||
if (spec.kind !== "read" && spec.kind !== "preview" && id !== "site.health_check" && id !== "metadata.enrich")
|
||||
expect(spec.replay, id).toBe("never");
|
||||
// 健康列、补全建议、带事项与事件去重的资源事实可幂等重跑;其它写入仍不可重放。
|
||||
if (spec.kind !== "read" && spec.kind !== "preview") {
|
||||
if (["site.health_check", "metadata.enrich", "release.apply_facts"].includes(id)) {
|
||||
expect(spec.replay, id).toBe("safe");
|
||||
expect(spec.idempotent, id).toBe(true);
|
||||
} else expect(spec.replay, id).toBe("never");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user