refactor(*): 平台架构 - 拆分后端领域模块与画布前端组件并补充测试

This commit is contained in:
ddcat666 committed 2026-09-30 10:01:39 +08:00
1 parent e0a2697c60
commit 7f5d87ef1a
186 files changed
+33727 -29905

No files matched your search

@@ -9,9 +9,13 @@ import (
func TestCloudAgentProductionSchedulingDoesNotCallLegacyGoLoop(t *testing.T) {
root := filepath.Join("..", "..")
// 生产调度入口:Agent 创建、运行时(含拆分出的调度/工具/媒体文件)与任务 worker。
// 调度循环本身(cloud_agent_runtime_scheduler.go)定义了旧入口,只检查调用方。
files := []string{
filepath.Join(root, "internal", "app", "cloud_agent.go"),
filepath.Join(root, "internal", "app", "cloud_agent_runtime.go"),
filepath.Join(root, "internal", "app", "cloud_agent_runtime_media.go"),
filepath.Join(root, "internal", "app", "cloud_agent_runtime_tools.go"),
filepath.Join(root, "internal", "app", "task_worker.go"),
}
for _, file := range files {
@@ -33,11 +37,16 @@ func TestCloudAgentProductionSchedulingDoesNotCallLegacyGoLoop(t *testing.T) {
func TestCloudAgentPiRuntimeContractUsesGovernedStepBridge(t *testing.T) {
root := filepath.Join("..", "..")
coordinator, err := os.ReadFile(filepath.Join(root, "internal", "app", "cloud_agent_pi_coordinator.go"))
if err != nil {
t.Fatal(err)
// 协调器拆分为协调、请求组装、模型桥与消息/工具桥四个文件,合同覆盖整组。
var coordinator strings.Builder
for _, name := range []string{"cloud_agent_pi_coordinator.go", "cloud_agent_pi_request.go", "cloud_agent_pi_model.go", "cloud_agent_pi_bridge.go"} {
body, err := os.ReadFile(filepath.Join(root, "internal", "app", name))
if err != nil {
t.Fatal(err)
}
coordinator.Write(body)
}
text := string(coordinator)
text := coordinator.String()
for _, required := range []string{
"Operation: cloudAgentStepOperation",
"s.enqueueCloudAgentTask(run, &state, req, nil)",