fix(goal): wire GoalLoop.node into the server request-context app graph - #357
Merged
Conversation
GoalLoop's only consumer is InstanceBootstrap's serviceOption(GoalLoop.Service) .init(), which runs in the request fiber's ambient context. GoalLoop.node was listed only in AppLayer, so headless serve/web, the desktop sidecar, and non-CWD TUI directories never armed the idle-event subscription or the startup goal scan — standing goals stalled after their first turn (the same wiring class as SettingsHook/Memory in #311). Closes#340
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#340
What
GoalLoop.nodeadded to the server request-context app group (server.ts), same slot and rationale as the SettingsHook/Memory fixes for fix(memory): /memory on and memory_search unreachable in live session despite valid identity and init stamp #311. All deps (EventV2Bridge/Session/SessionPrompt/Provider/Goal/SessionStatus + transitive SessionAutomationLease) are already in the graph.test/server/httpapi-goalloop-wiring.test.ts:GoalLoop.Serviceresolves in the ambient context the request handlers (and thus InstanceBootstrap) run inserviceOption(...).init()path actually reaches the service (the bug was that call being a silent no-op)Verification
bun run typecheckgreen (packages/opencode)bun test test/server/httpapi-goalloop-wiring.test.ts2/2bun test test/server/httpapi-memory-wiring.test.ts2/2 (no regression)bun test test/goal/e2e-loop.test.ts25/25 (no regression)