fix(skills): prevent IndexError in build_plan_path on whitespace-only input - #7474
fix(skills): prevent IndexError in build_plan_path on whitespace-only input#7474konsisumer wants to merge 3 commits into
Conversation
227de91 to
6b12569
Compare
|
Rebased onto latest Root cause: Commit Fix: Updated the test to verify that |
6b12569 to
8f06f88
Compare
8f06f88 to
cb13542
Compare
… input When user_instruction contains only whitespace, .strip().splitlines() returns an empty list; indexing [0] on it raises IndexError. Split into two steps: compute lines first, then index only if non-empty.
…nputs Cover the three test scenarios from the PR checklist: - whitespace-only string returns default "conversation-plan" slug - normal string slug generation is unchanged - empty string and None both return default slug
cb13542 to
6b9284c
Compare
|
Closing: referenced_issue_closed. all referenced issues closed: [7576] autocontrib · housekeeping · 2026-04-19T13:17:05Z |
Summary
build_plan_path()crashes withIndexErrorwhenuser_instructionis whitespace-only (e.g." \n "), because.strip().splitlines()returns[]and then[0]is applied to the empty list.linesfirst, then index only when non-empty.Test plan
" \n ") asuser_instructiontobuild_plan_path— should return the defaultconversation-planslug instead of crashingNone— still returns default slugCloses #7576