Skip to content

fix(goal): wire GoalLoop.node into the server request-context app graph - #357

Merged
LeXwDeX merged 2 commits into
devfrom
feat/340-issue340
Aug 19, 2026
Merged

fix(goal): wire GoalLoop.node into the server request-context app graph#357
LeXwDeX merged 2 commits into
devfrom
feat/340-issue340

Conversation

@LeXwDeX

Copy link
Copy Markdown
Owner

Closes#340

What

  • GoalLoop.node added 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.
  • New wiring probe regression test/server/httpapi-goalloop-wiring.test.ts:
    • asserts GoalLoop.Service resolves in the ambient context the request handlers (and thus InstanceBootstrap) run in
    • a recorder replacement proves bootstrap's serviceOption(...).init() path actually reaches the service (the bug was that call being a silent no-op)

Verification

  • bun run typecheck green (packages/opencode)
  • bun test test/server/httpapi-goalloop-wiring.test.ts 2/2
  • bun test test/server/httpapi-memory-wiring.test.ts 2/2 (no regression)
  • bun test test/goal/e2e-loop.test.ts 25/25 (no regression)

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
@LeXwDeX
LeXwDeX merged commit 2881f28 into devAug 19, 2026
6 checks passed
@LeXwDeX
LeXwDeX deleted the feat/340-issue340 branch August 19, 2026 03:29
Sign up for freeto 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.

1 participant

@LeXwDeX