feat: channel-to-workspace routing control plane (rebased on latest development)#41
Conversation
Deploying sciclaw with
|
| Latest commit: |
30e82bf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2e6c5f85.sciclaw.pages.dev |
| Branch Preview URL: | https://feature-epic30-routing-contr-s2rm.sciclaw.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30e82bff0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ctx, cancel := context.WithCancel(context.Background()) | ||
| defer cancel() | ||
| var loopPool *routing.AgentLoopPool | ||
| if cfg.Routing.Enabled { |
There was a problem hiding this comment.
Start routing control plane even when disabled at boot
The gateway only creates the routing Dispatcher and reload watcher inside if cfg.Routing.Enabled, so a process that starts with routing disabled will ignore later routing enable + routing reload operations and keep using the legacy single-loop path until restart. This makes the new runtime control-plane workflow ineffective in the rollout scenario where operators enable routing on a live gateway.
Useful? React with 👍 / 👎.
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return agent.NewAgentLoop(cloned, msgBus, provider), nil |
There was a problem hiding this comment.
Register cron tool for pooled workspace agent loops
Per-workspace handlers are created with agent.NewAgentLoop(...) only, but cron registration is done separately on the top-level loop in gatewayCmd; when routing is enabled, user traffic goes through this pool, so routed chats no longer have access to the cron tool. That is a functional regression for scheduled-task workflows that worked before enabling routing.
Useful? React with 👍 / 👎.
| if err := ValidateRoutingConfig(cfg.Routing); err != nil { | ||
| return nil, err |
There was a problem hiding this comment.
Stop rejecting config load when a mapped workspace is offline
LoadConfig now hard-fails whenever ValidateRoutingConfig fails, and the validator requires each mapped workspace to exist and be readable. If a mapped directory is temporarily missing (for example, renamed or on an unmounted volume), config loading fails before routing admin commands can run, which prevents CLI-based recovery paths like removing or replacing the bad mapping.
Useful? React with 👍 / 👎.
Same routing feature set as #40, rebased onto latest development (includes 57be3f4).\n\nVerification:\n- go test ./pkg/config ./pkg/routing ./pkg/agent ./cmd/picoclaw\n\nSupersedes #40.