test(ptc): record approved program execution and document per-call controls

This commit is contained in:
Tianyi Cui committed 2026-09-12 15:03:02 +08:00
1 parent a248cc4e64
commit c6b959783a
28 files changed
+333 -15

No files matched your search

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/code-runtime/code-runtime-node/README.md
README.md: 357173bf93a0e5d1e0048b6ee06fac36db856a62
README.zh.md: 5808193e493b1a8dcf1e404dcc938f62b4b246db
README.md: 4897656b6b42a7a5b38401576506088130d7b92a
README.zh.md: 83c17be7c1d3a0c9b6d1ac5b7e1c2dd647006914
@@ -65,6 +65,8 @@ Direct filesystem, network and subprocess operations remain Node operations, sub
### Deadlines and cancellation
The PTC consumer exposes per-call timeout and approved sandbox choices as described in [dsh-tools](../../core/tools/README.md#ptc-mode). The runtime's readonly `timeout` descriptor reports its effective default and maximum to that consumer.
The elapsed deadline covers runtime setup and execution, including time awaiting nested tools or approval. It is not a CPU meter. Timeout or cancellation stops a synchronous loop through the host's managed process owner; successful completion also cleans that managed range. The timer stops when an outcome is selected, before cleanup, so the returned call can take longer than its execution deadline while cleanup settles.
### Failures
@@ -65,6 +65,8 @@ kind: "package-reference"
### 截止时间与取消
PTC 消费方按 [dsh-tools](../../core/tools/README.zh.md#ptc-mode) 的说明公开逐次超时与经审批的沙箱选择。运行时只读 `timeout` 描述符向该消费方报告有效默认值与上限。
经过时间截止覆盖运行时准备和执行,包括等待嵌套工具或审批的时间。它不是 CPU 计量器。超时或取消通过 Host 的受管进程所有者停止同步循环;成功完成也会清理该受管范围。选择结果后、清理前停止计时器,因此调用可能要在执行截止之后等待清理结算才返回。
### 失败