Skip to content

refactor(bootstrap): stage service wiring and explicit deps#503

Merged
Blackcloudss merged 4 commits into
mainfrom
xgopilot/issue-444-1778380185
May 10, 2026
Merged

refactor(bootstrap): stage service wiring and explicit deps#503
Blackcloudss merged 4 commits into
mainfrom
xgopilot/issue-444-1778380185

Conversation

@fennoai
Copy link
Copy Markdown
Contributor

@fennoai fennoai Bot commented May 10, 2026

Requested by @Blackcloudss

Summary

  • refactor orchestrator.NewService to accept explicit Deps and remove post-construction required dependency patching
  • split bootstrap.New into staged builders for core deps, runtimes, and services
  • update affected bootstrap/orchestrator/rpc tests and add staged bootstrap coverage

Verification

  • go test ./services/local-service/internal/bootstrap -run 'Test(NewWiresStorageBackedMemoryService|BuildCoreDepsSeedsBootstrapInfrastructure|BuildRuntimesRegistersToolsAndModelRuntime)'
  • go test ./services/local-service/internal/orchestrator -run 'TestServiceStartTaskAndConfirmFlow|TestServiceSubmitInputEmptyTextReturnsWaitingInput|TestServiceSecurityRespondAllowOnceResumesAndCompletes'
  • go test ./services/local-service/internal/rpc -run 'TestDispatchReturnsSecurityAuditList|TestDispatchReturnsTaskArtifactList|TestDispatchReturnsSettingsUpdate'

xgopilot and others added 2 commits May 10, 2026 03:21
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>
Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>
fennoai[bot]

This comment was marked as outdated.

@Blackcloudss
Copy link
Copy Markdown
Collaborator

@xgopilot 对以上问题进行相应的判断是否选择修改(“一定要最合理的判断,review提到的问题不是都要修改的,可能问题已经解决了,也可能会没问题就乱找问题”)。如果需要是修改代码还是选择修改文档,还是都要修改。如果决定修改,以最合理的方式修改,不要做向下兼容从而过拟合。然后再详细检查相关文件的内容是否还有类似的问题,要求一次性解决完,最后核查一遍,修改后直接告诉我修改了什么、修改的原因、修改后的可能出现的现象以及如果不修改所带来的具体影响。然后再查看是否还有其他问题。

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>
@Blackcloudss
Copy link
Copy Markdown
Collaborator

/review

@fennoai
Copy link
Copy Markdown
Contributor Author

fennoai Bot commented May 10, 2026

No issues found after code quality, performance, security, and documentation accuracy review passes.

@Blackcloudss
Copy link
Copy Markdown
Collaborator

@xgopilot 拉取项目仓库main分支最新代码,并检查有无冲突(项目仓库是最新的)。有则先合理判断怎么修改,不要单独依赖某一方的。然后修改后再把结果提交推送到这个PR

@fennoai
Copy link
Copy Markdown
Contributor Author

fennoai Bot commented May 10, 2026

Result

Merged the latest origin/main into this PR branch and pushed the result as 80ce9835.

The only merge conflict was services/local-service/internal/rpc/server_test.go: upstream main had already split that large RPC test file into focused test files, while this PR still modified the old file for the explicit orchestrator.Deps wiring. I resolved that by moving the PR's dependency-injection updates into the new split RPC test helpers/files, keeping the upstream file split, and deleting the obsolete server_test.go.

Verification run:

  • go test ./services/local-service/internal/bootstrap -run 'Test(NewWiresStorageBackedMemoryService|BuildCoreDepsSeedsBootstrapInfrastructure|BuildRuntimesRegistersToolsAndModelRuntime)'
  • go test ./services/local-service/internal/orchestrator -run 'TestServiceStartTaskAndConfirmFlow|TestServiceSubmitInputEmptyTextReturnsWaitingInput|TestServiceSecurityRespondAllowOnceResumesAndCompletes'
  • go test ./services/local-service/internal/rpc -run 'TestDispatchReturnsSecurityAuditList|TestDispatchReturnsTaskArtifactList|TestDispatchReturnsSettingsUpdate'

No additional doc checklist item was completed by this merge-only follow-up, so docs/work-priority-plan.md was left unchanged.

View job run

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>
@Blackcloudss Blackcloudss requested a review from jinyu918 May 10, 2026 04:54
@Blackcloudss Blackcloudss merged commit 4823c52 into main May 10, 2026
4 checks passed
@Blackcloudss Blackcloudss deleted the xgopilot/issue-444-1778380185 branch May 10, 2026 05:19
fennoai Bot added a commit that referenced this pull request May 10, 2026
* refactor(orchestrator): require explicit service deps

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>

* refactor(bootstrap): stage dependency assembly

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>

* fix(orchestrator): fail fast on missing service deps

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>

---------

Co-authored-by: xgopilot <noreply@goplus.org>
Co-authored-by: Blackcloudss <161042579+Blackcloudss@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(bootstrap): split dependency wiring into staged builders and explicit deps

3 participants