docs(comments): 注释中文化 · internal/runtime/orchestration(29 文件,纯替换)
- 只翻注释/文档字符串:剥离注释后代码行逐字节不变(机械校验只剩允许的行尾注释形态) - 裁决编号与 design 节号(02.4.3 / 11.4.2 / design/05 §9 等)逐字保留 - 复核:go build 绿;orchestration 及其子包(audit/comm)测试绿;gofmt 干净
This commit is contained in:
1 parent
fe90f64a56
commit
eb1828ee7a
29 files changed
+751
-949
No files matched your search
@@ -99,7 +99,7 @@ func TestContextIsolation(t *testing.T) {
|
||||
t.Fatalf("Spawn: %v", err)
|
||||
}
|
||||
|
||||
// Mutating the caller's slice after Spawn must not leak into the sub-agent.
|
||||
// Spawn 之后再改调用方的切片,不得泄漏进子代理。
|
||||
specCtx[0].Content[0].Text = "mutated"
|
||||
|
||||
res, err := s.Join(context.Background())
|
||||
@@ -112,8 +112,8 @@ func TestContextIsolation(t *testing.T) {
|
||||
if m.total != 1 {
|
||||
t.Fatalf("runner calls = %d, want 1", m.total)
|
||||
}
|
||||
// The runner receives the isolated caller context plus the task itself as one
|
||||
// trailing user message (裁决 2026-10-04: 任务作为一条 user 消息注入).
|
||||
// runner 收到的是隔离后的调用方上下文,加上任务本身作为末尾一条 user 消息
|
||||
// (裁决 2026-10-04: 任务作为一条 user 消息注入).
|
||||
got := m.captured(0)
|
||||
if len(got) != 2 {
|
||||
t.Fatalf("runner received %d messages, want the isolated context + the task message: %#v", len(got), got)
|
||||
@@ -238,7 +238,7 @@ func TestRunWithRealLoop(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNoGoroutineLeak(t *testing.T) {
|
||||
// Not parallel: a goroutine-count assertion is noisy under parallel tests.
|
||||
// 不并行:goroutine 计数断言在并行测试下噪声很大。
|
||||
s := newScheduler(t, Options{MaxParallel: 2})
|
||||
m := &mockRunner{result: &loop.Result{Text: "ok"}}
|
||||
s.runner = m
|
||||
|
||||
Reference in new issue
Block a user