U4 第一步:Squad 依赖注入解耦(Options + 后端工厂),移除 config.Config 依赖 #4

Merged
weichen merged 2 commits from feature/squad-options-injection-2026-09-29 into dev 2026-09-29 05:19:27 +00:00
Collaborator

KTD1 仓内解耦第一步,行为不变:

  • squad.Options 替代 config.Config(仅用 3 字段:BackendName/BackendTimeout/DataDir)
  • 后端工厂由 bizdev 装配注入,凭证/环境/并发留在产品侧;nil 工厂失败关闭不降级 Stub
  • go vet ./... 通过,squad/bizdev 短测通过

后续步骤:stream 事件类型化、workspace 句柄化、材料解析去耦,然后独立模块提取。

KTD1 仓内解耦第一步,行为不变: - squad.Options 替代 config.Config(仅用 3 字段:BackendName/BackendTimeout/DataDir) - 后端工厂由 bizdev 装配注入,凭证/环境/并发留在产品侧;nil 工厂失败关闭不降级 Stub - go vet ./... 通过,squad/bizdev 短测通过 后续步骤:stream 事件类型化、workspace 句柄化、材料解析去耦,然后独立模块提取。
agent-bot added 1 commit 2026-09-29 05:09:54 +00:00
refactor(squad): inject Options + backend factory, drop config.Config dependency
CI / go-vet (pull_request) Failing after 10s
CI / short-tests-report (pull_request) Failing after 36s
CI / backup-restore-drill (pull_request) Successful in 27s
CI / web (pull_request) Successful in 30s
72c0996b74
KTD1 first step (in-repo decoupling, behavior preserved):
- squad.Options{BackendName, BackendTimeout, DataDir, NewBackend} replaces
  *config.Config; defaults applied in withDefaults
- backend construction injected by caller (bizdev assembly): credentials,
  environment and concurrency stay product-side; nil factory fails closed
  instead of silently degrading to Stub
- verified: go vet ./... clean, squad/bizdev short tests pass
agent-bot added 1 commit 2026-09-29 05:13:55 +00:00
arch(boundaries): declare bizdev->agent assembly edge
CI / go-vet (pull_request) Successful in 11s
CI / short-tests-report (pull_request) Failing after 34s
CI / backup-restore-drill (pull_request) Successful in 29s
CI / web (pull_request) Successful in 32s
97879e5956
bizdev is the composition point injecting the backend factory into
squad.Options (KTD1: assembly stays in the product app); the new import is
intentional and now owned by the machine contract, same PR as the code.
weichen approved these changes 2026-09-29 05:19:26 +00:00
weichen left a comment
Owner

KTD1 第一步批准:Options 注入 + 工厂 fail-closed,arch 边已声明,vet/短测绿。

KTD1 第一步批准:Options 注入 + 工厂 fail-closed,arch 边已声明,vet/短测绿。
weichen merged commit 258c9d0a8f into dev 2026-09-29 05:19:27 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System#4