Parcourir la source

docs: prose-standard pass over the PR's added comments and one label

Current-state fixes: two test comments still named the pre-rename
spawnProcess; two narrated history ('the old whole-chunk drop', 'no
longer kills backend work') instead of the pinned contract; and the
packages/README row said process-group where the seam's own vocabulary
is process-tree (en+zh, pair re-recorded).
Tianyi Cui il y a 1 mois
Parent
commit
cb1864795e

+ 2 - 2
packages/README.i18n.yaml

@@ -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
-README.md: e56ff806d2fabeb9a921b09897e006ed58c2019a
-README.zh.md: 6787385d7ff4d361878e17c2945cc1dbef9c99ad
+README.md: 911f18547120eb3dbbc9e42bbcd41e3b6d518cfe
+README.zh.md: d6e1f0bf9b38b40944f8e3cebea3f6d90dcaceb5

+ 1 - 1
packages/README.md

@@ -13,7 +13,7 @@ Packages live at `packages/<group>/<pkg>/`; groups are containers, while names r
 | [`core/`](core/README.md) | Product API spine: sessions, prompts, tools, agent services, and the concrete loop | Product — stable surface |
 | [`goal/`](goal/README.md) | Persisted same-session goal state and lifecycle | Product — stable surface |
 | [`llm/`](llm/README.md) | LLM capability family: the abstract service + provider adapters | Product — stable surface |
-| [`subprocess/`](subprocess/README.md) | Subprocess capability family: spawn seam + local process-group implementation | Product — stable surface |
+| [`subprocess/`](subprocess/README.md) | Subprocess capability family: spawn seam + local process-tree implementation | Product — stable surface |
 | [`bash/`](bash/README.md) | Bash capability family: executor seam, local impl, model-facing tool | Product — stable surface |
 | [`pty/`](pty/README.md) | Persistent PTY capability family: owner-scoped sessions, local implementation, and model-facing tools | Product — stable surface |
 | [`code-runtime/`](code-runtime/README.md) | Code-execution capability family: the runtime seam for model-written programs + a worker-thread backend | Product — stable surface |

+ 1 - 1
packages/README.zh.md

@@ -13,7 +13,7 @@
 | [`core/`](core/README.md) | 产品 API 主干:会话、提示词、工具、agent(智能体)服务与具体循环 | 产品:稳定表面 |
 | [`goal/`](goal/README.md) | 持久化的同会话 goal 状态与生命周期 | 产品:稳定表面 |
 | [`llm/`](llm/README.md) | LLM(大语言模型)能力系列:抽象服务 + 提供方适配器 | 产品:稳定表面 |
-| [`subprocess/`](subprocess/README.md) | 进程管理能力系列:spawn seam + 本地进程实现 | 产品:稳定表面 |
+| [`subprocess/`](subprocess/README.md) | 进程管理能力系列:spawn seam + 本地进程实现 | 产品:稳定表面 |
 | [`bash/`](bash/README.md) | Bash 能力系列:执行器 seam、本地实现、面向模型的工具 | 产品:稳定表面 |
 | [`pty/`](pty/README.md) | 持久 PTY 能力系列:按所有者隔离的会话、本地实现和面向模型的工具 | 产品:稳定表面 |
 | [`code-runtime/`](code-runtime/README.md) | 代码执行能力系列:面向模型所写程序的运行时 seam + worker 线程后端 | 产品:稳定表面 |

+ 1 - 1
packages/bash/bash-local/tests/executor.spec.ts

@@ -309,7 +309,7 @@ describe('process lifecycle ownership (the subprocess service, not the executor)
     const pid = Number((await readUntil(proc, '\n')).trim())
     expect(Number.isInteger(pid) && pid > 0).toBe(true)
 
-    // Reloading/disposing the executor no longer kills backend work — the
+    // Executor reload/disposal leaves background work running — the
     // handle stays live and readable, mirroring the task runtime's
     // registrations-outlive-producer-fibers contract.
     await executorFiber.dispose()

+ 4 - 4
packages/subprocess/subprocess-local/tests/spawn.spec.ts

@@ -144,7 +144,7 @@ describe('spawnSubprocess', () => {
   })
 
   it('kills the process group with SIGTERM when the signal fires', async () => {
-    // spawnProcess owns no timer: it kills on abort. The bash executor drives the timeout
+    // spawnSubprocess owns no timer: it kills on abort. The bash executor drives the timeout
     // by firing this signal via a deadline (see executor.spec.ts); here we
     // assert the kill itself lands as SIGTERM.
     const controller = new AbortController()
@@ -350,8 +350,8 @@ describe('OutputCollector', () => {
   })
 
   it('retains a byte-exact tail across uneven chunk boundaries', () => {
-    // The old whole-chunk drop could under-retain; a diagnostic tail must be
-    // exactly the LAST maxBytes regardless of chunking.
+    // A diagnostic tail must be exactly the LAST maxBytes regardless of
+    // chunking; dropping only whole chunks would under-retain.
     const collector = new OutputCollector(10, undefined, 'exact-tail', spillDir)
     collector.push(Buffer.from('aaaa'))
     collector.push(Buffer.from('bbbbbb'))
@@ -818,7 +818,7 @@ describe('abort edge cases', () => {
   })
 
   it('reports the terminating signal of an externally self-killed command', async () => {
-    // spawnProcess reports the raw signal; whether it counts as timeout/cancel is the
+    // spawnSubprocess reports the raw signal; whether it counts as timeout/cancel is the
     // executor's classification (a self-kill is neither) — see executor.spec.ts.
     const result = await finish(spawnSubprocess(spec('kill -TERM $$')))
     expect(result.signal).toBe('SIGTERM')