fix: return 404 on deploy/stop for non-existent workflow IDs#137
Merged
intel352 merged 2 commits intofeat/issue-86-admin-decomp-bfrom Feb 23, 2026
Merged
fix: return 404 on deploy/stop for non-existent workflow IDs#137intel352 merged 2 commits intofeat/issue-86-admin-decomp-bfrom
intel352 merged 2 commits intofeat/issue-86-admin-decomp-bfrom
Conversation
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Decompose V1 CRUD routes into pipeline primitives
fix: return 404 on deploy/stop for non-existent workflow IDs
Feb 23, 2026
intel352
added a commit
that referenced
this pull request
Feb 23, 2026
* feat: decompose V1 CRUD routes into pipeline primitives (#86) Replace 6 V1 admin CRUD routes that delegated to V1APIHandler with declarative pipeline definitions using admin-db: - POST /api/v1/admin/organizations/{id}/projects (create project) - POST /api/v1/admin/projects/{id}/workflows (create workflow in project) - POST /api/v1/admin/workflows (create workflow) - PUT /api/v1/admin/workflows/{id} (update workflow + version) - POST /api/v1/admin/workflows/{id}/deploy (deploy workflow) - POST /api/v1/admin/workflows/{id}/stop (stop workflow) Each route now uses pipeline steps (request_parse, validate, set, db_exec, db_query, conditional, json_response) instead of Go delegates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: return 404 on deploy/stop for non-existent workflow IDs (#137) * Initial plan * fix: add 404 handling to deploy and stop workflow pipelines 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.
The deploy and stop pipeline routes were performing an UPDATE then returning
steps.get-workflow.rowunconditionally — when the workflow ID didn't exist,db_query(mode: single) returnedfound: falsewith an empty row, causing a200 {}response instead of a 404.Changes
/deployand/stoppipelines: addedcheck-exists(step.db_query) +check-found(step.conditional) before the UPDATE, consistent with the PUT/DELETE workflow route patternnot-foundstep returning404 {"error": "workflow not found"}🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.