Repository navigation
Conversation
`workflow start --correlation` tags an execution, but there was no way to find those executions again — search filtered on name, status and start time only. Add `workflow search --correlation-id`, which emits a `correlationId = "<value>"` clause ANDed with the existing filters. The value is quoted so ids containing spaces reach the server as a single term rather than being split by its query parser. Filter assembly moves out of the command handler into buildWorkflowSearchQuery so it can be unit tested directly; the e2e search suite now tags its fixture execution and searches for it by correlation ID. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mp-orkes
reviewed
Oct 5, 2026
mp-orkes
left a comment
Contributor
There was a problem hiding this comment.
Ready to merge after fixes.
- Works for normal ids. Existing filters produce the same query as before. Build and unit tests pass.
- Should fix: the correlation id is inserted into the query unescaped (
cmd/workflow.go:836-838). Results depend on the backend:- Elasticsearch/OpenSearch: an id containing
"cuts the value short, and\is dropped. - Postgres/SQLite: a comma causes an SQL error or no match,
*becomes a wildcard, quotes and brackets are stripped, andANDadds a bogus condition. - Orkes: an apostrophe ends the value early and the parse fails.
- Suggested fix: reject
",',\,,,(,)andANDin the CLI with a clear error, and add unit tests for each.
- Elasticsearch/OpenSearch: an id containing
- Should fix: CLAUDE.md says "Matched exactly", but
*acts as a wildcard on some backends. Update the wording to match the validation. - Minor:
--correlation-id ""is silently ignored, so the search returns everything. - Minor: no unit test pins the old query strings for a single filter.
- Minor: the e2e fixture uses a fixed correlation id. A run-unique suffix would avoid matching leftovers on the shared server.
- Minor: missing blank line before
TestBuildWorkflowSearchQuery(cmd/execution_test.go:182).
Contributor
|
@liketed let me know if the requested changes make sense and ping when it's ready for review again. |
Author
|
Requested changes make sense, need to convert feedback to code which may take some time |
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.
workflow start --correlationtags an execution, but there was no way to find those executions again — search filtered on name, status and start time only. Addworkflow search --correlation-id, which emits acorrelationId = "<value>"clause ANDed with the existing filters.The value is quoted so ids containing spaces reach the server as a single term rather than being split by its query parser.
Filter assembly moves out of the command handler into buildWorkflowSearchQuery so it can be unit tested directly; the e2e search suite now tags its fixture execution and searches for it by correlation ID.