Skip to content

fix: join root task sections with newlines#683

Open
sean-kim05 wants to merge 1 commit into
usestrix:mainfrom
sean-kim05:fix/root-task-multiline-targets
Open

fix: join root task sections with newlines#683
sean-kim05 wants to merge 1 commit into
usestrix:mainfrom
sean-kim05:fix/root-task-multiline-targets

Conversation

@sean-kim05

Copy link
Copy Markdown

Closes #682

What

build_root_task() in strix/core/inputs.py joined the parts list 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

URLs: - https://a.example.com - https://b.example.com

After

URLs:
- https://a.example.com
- https://b.example.com

The section headers already embed \n\n, and the sibling builder child_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 passed
  • uv run ruff check / ruff format --check → clean
  • uv run mypy strix/core/inputs.py → no issues

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
@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes root task prompt formatting for multi-item sections.

  • build_root_task() now joins prompt parts with newlines.
  • Multiple target URLs now render as separate bullet lines.
  • A regression test covers the collapsed URL formatting case.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
strix/core/inputs.py Updates root task string assembly so section headers and bullets stay on separate lines.
tests/test_inputs.py Adds coverage for newline-separated multiple web application targets.

Reviews (1): Last reviewed commit: "fix: join root task sections with newlin..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build_root_task flattens multiple targets/constraints onto one line

1 participant