fix: address multi-workflow mode review feedback#138
Merged
intel352 merged 2 commits intofeat/issue-113-multi-workflowfrom Feb 23, 2026
Merged
fix: address multi-workflow mode review feedback#138intel352 merged 2 commits intofeat/issue-113-multi-workflowfrom
intel352 merged 2 commits intofeat/issue-113-multi-workflowfrom
Conversation
- Extract defaultEnginePlugins() to eliminate plugin list duplication - Fix bootstrapAdmin to check ErrNotFound explicitly; return admin UUID - Fix seedWorkflow: handle List error, improve slug via slugify(), populate required WorkflowRecord fields (ProjectID, CreatedBy, UpdatedBy) using new ensureSystemProject() helper - Change JWT secret logger.Warn -> logger.Error - Use srvErrCh to propagate API server failures to initiate graceful shutdown - Fix URL display using net.SplitHostPort for non-localhost bind addresses - Fix misleading comment about admin infrastructure setup Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Wire multi-workflow mode into main server
fix: address multi-workflow mode review feedback
Feb 23, 2026
intel352
added a commit
that referenced
this pull request
Feb 23, 2026
* feat: wire multi-workflow mode into main server (#113) When -database-dsn is provided, the server starts in multi-workflow mode: - Connects to PostgreSQL and runs migrations - Creates WorkflowEngineManager for managing concurrent engines - Mounts the REST API at /api/v1/ on the same HTTP server - Bootstraps admin user when -admin-email and -admin-password are set - -config flag becomes a seed for the initial workflow - Without -database-dsn, single-config mode is preserved unchanged Closes #113 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address multi-workflow mode review feedback (#138) * Initial plan * fix: address all review comments for multi-workflow mode - Extract defaultEnginePlugins() to eliminate plugin list duplication - Fix bootstrapAdmin to check ErrNotFound explicitly; return admin UUID - Fix seedWorkflow: handle List error, improve slug via slugify(), populate required WorkflowRecord fields (ProjectID, CreatedBy, UpdatedBy) using new ensureSystemProject() helper - Change JWT secret logger.Warn -> logger.Error - Use srvErrCh to propagate API server failures to initiate graceful shutdown - Fix URL display using net.SplitHostPort for non-localhost bind addresses - Fix misleading comment about admin infrastructure setup Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
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.
Nine issues identified in the PR review for the multi-workflow mode implementation, ranging from DB constraint violations to silent errors and insecure defaults.
Changes
Correctness
WorkflowRecordwas missing NOT NULL FK fields (ProjectID,CreatedBy,UpdatedBy) — addedensureSystemProject()to find/create a "system" company + "default" project and populate all required fieldsbootstrapAdminsilently swallowed non-ErrNotFoundDB errors; now useserrors.Is(err, evstore.ErrNotFound)and returns(uuid.UUID, error)so callers get the admin IDpg.Workflows().List()error was discarded (existing, _ :=) — now propagatedReliability
ListenAndServefailures (e.g. port already in use) were only logged; addedsrvErrChso server errors trigger the same graceful shutdown path as SIGINT/SIGTERMMaintainability
defaultEnginePlugins() []plugin.EnginePlugin— eliminates the duplicated 17-plugin list betweenbuildEngineand therunMultiWorkflowengine builder closureMinor
slugify()replaces the naivestrings.ReplaceAll(name, " ", "-")— handles special chars, consecutive/leading/trailing hyphens, non-ASCIInet.SplitHostPortso0.0.0.0:8080renders ashttp://localhost:8080/api/v1/instead ofhttp://localhost0.0.0.0:8080/api/v1/Warn→Error✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.