dapr / dapr/mechanical-markdown
Incorrect Order Handling in expected_stdout_lines Matching Logic
- Dominant language
- Python
- Stars
- 19
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Given an step:
```text
name: Run Chaining Pattern workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
- 'Activity returned: 2'
- 'Activity returned: 9'
- 'Activity returned: 21'
- 'Activity returned: 17'
- 'Workflow finished with result: 60'
```
The verification executes in the `expected_stdout_lines` in [order](https://github.com/dapr/mechanical-markdown/blob/2ce1c907d05e987e4e64472256267a5caeef51fe/mechanical_markdown/step.py#L144), then the first line to be verified is `Activity returned: 2`.
If the output shows first `Activity returned: 21` the first line (`Activity returned: 2`) will be matched and the following line will be [removed](https://github.com/dapr/mechanical-markdown/blob/2ce1c907d05e987e4e64472256267a5caeef51fe/mechanical_markdown/step.py#L157).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in mechanical_markdown/step.py at the verification logic around lines 144 and 157, using the linked workflow example to reproduce the substring collision. Check how match_order: none processes expected_stdout_lines and how matched output lines are removed. Done means a longer output such as “Activity returned: 21” is not incorrectly consumed by the expected “Activity returned: 2” entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100