fix(server): harden multi-workflow mode wiring based on review feedback#110
Merged
intel352 merged 3 commits intofix/remove-dead-api-wiring-todofrom Feb 23, 2026
Merged
Conversation
4 tasks
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix server to implement multi-workflow mode API wiring
fix(server): harden multi-workflow mode wiring based on review feedback
Feb 23, 2026
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 free
to 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.
Four issues in the multi-workflow mode implementation identified in review: engine manager not connected to API deploy/stop endpoints, no JWT secret length enforcement, shutdown defer using unbounded
context.Background(), and admin bootstrap treating allGetByEmailerrors as "user not found".Changes
Wire engine manager to Deploy/Stop endpoints (
api/)WorkflowOrchestratorinterface (DeployWorkflow,StopWorkflow) satisfied by*workflow.WorkflowEngineManagerOrchestrator WorkflowOrchestratorfield toapi.Config; wired intoWorkflowHandlerviaNewRouterWithIAMDeploy/Stophandlers now call the orchestrator to start/stop live engines when set, then re-fetch from DB for the response; fall back to DB-only update when no orchestrator is wiredJWT secret length guard (
cmd/server/main.go)log.Fatalfwhen--jwt-secret< 32 bytes, consistent with the minimum enforced bymodule/jwt_auth.goBounded shutdown context
context.Background()in the shutdown defer withcontext.WithTimeout(..., 10s)Admin bootstrap error discrimination
GetByEmailerror → attempt create" with an expliciterrors.Is(lookupErr, evstore.ErrNotFound)check; other errors (DB failures, permission issues) nowlog.Fatalfinstead of triggering a spurious createswitchto satisfygocriticifElseChain💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.