fix(daemon): scope dreaming triggers by agent#786
Conversation
Assisted-by: OpenAI Codex
5fbdd4d to
323b356
Compare
|
Hi @NicholaiVogel - I'm taking a look at the fixes in This comment is updated in place by pr-reviewer. |
PR-Reviewer-Ant
left a comment
There was a problem hiding this comment.
Review metadata
- Reviewer: pr-reviewer
- Model:
gpt-5.5 - Commit:
323b3560
I did not find a correctness, security, or data-integrity issue worth flagging. The implementation matches the PR description: dream request agent resolution now honors body/query/header/fallback ordering, manual triggers run under the requested agent, periodic checks scan known/data-bearing agents, and the touched repair paths no longer fall back to a hardcoded default.
Confidence: Medium [sufficient_diff_evidence, targeted_context_included, missing_runtime_repro] - The changed route and worker code directly show the new agent resolution path and scoped dreaming calls, and the added tests cover the main body/query/fallback and manual-trigger behavior. I did not have a live daemon trace or DB fixture beyond the included tests, so confidence is medium rather than high.
Summary
Fixes the issue #785 agent-scope leak in dreaming triggers and the adjacent hardcoded repair fallbacks.
Changes
agentId/agent_id, query aliases,x-signet-agent-id, then daemon configured fallback.relink-entitiesmemory reads to the selected agent.Closes #785.
Type
fix— bug fixPackages affected
@signet/daemonScreenshots
N/A — daemon/API change only.
PR Readiness (MANDATORY)
INDEX.md+dependencies.yaml)Migration Notes
N/A — no migrations or schema changes.
Testing
bun test platform/daemon/src/routes/pipeline-routes-agent.test.ts platform/daemon/src/pipeline/dreaming-worker.test.ts platform/daemon/src/pipeline/dreaming.test.ts platform/daemon/src/agent-id.test.tsbunx biome check platform/daemon/src/pipeline/dreaming-worker.ts platform/daemon/src/pipeline/dreaming-worker.test.ts platform/daemon/src/routes/pipeline-routes.ts platform/daemon/src/routes/pipeline-routes-agent.test.ts platform/daemon/src/routes/repair-routes.ts platform/daemon/src/daemon.ts docs/api/knowledge-ontology.mdgit diff --checkbun run --filter '@signet/daemon' buildAI disclosure
Assisted-bytags in commits)Notes
bun run --filter '@signet/daemon' build:typesis currently blocked by pre-existing repo-wide TypeScript issues outside this patch, includingTS6059rootDir errors forplatform/core/src/migrations/*and existing test casts fromDatabasetoReadDb/WriteDb. The PR haschecklist-exceptionfor that local typecheck caveat; no generated declaration artifacts are included.