fix: join root task sections with newlines#683
Open
sean-kim05 wants to merge 1 commit into
Open
Conversation
build_root_task assembled section headers and per-item bullets as separate list elements, then joined them with a single space. Scans with more than one target (or diff-scope constraints) rendered every bullet on one run-on line, e.g. "URLs: - a - b" instead of a proper list. Join with a newline to match the sibling child_initial_input builder. Add a regression test covering multiple targets. Closes usestrix#682
Contributor
Greptile SummaryThis PR fixes root task prompt formatting for multi-item sections.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix: join root task sections with newlin..." | Re-trigger Greptile |
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.
Closes #682
What
build_root_task()instrix/core/inputs.pyjoined thepartslist with a single space. Because section headers (e.g."\n\nURLs:") and per-item bullets (e.g."- https://a") are separate list elements, every bullet after a header was concatenated with spaces instead of newlines.Why
A scan with more than one target (or diff-scope constraints) rendered a run-on line in the root task prompt:
Before
After
The section headers already embed
\n\n, and the sibling builderchild_initial_input()in the same file joins its parts with newlines — confirming newline is the intended separator.Change
One line:
" ".join(parts)→"\n".join(parts).Tests
Added
test_build_root_task_multiple_targets_are_newline_separated, which fails on the old space-join (both URLs collapse onto one line) and passes with the fix. Full suite green:uv run pytest→ 84 passeduv run ruff check/ruff format --check→ cleanuv run mypy strix/core/inputs.py→ no issues