fix(planning): the plan gate joins step text through embedding_text (#4079)

test_nothing_else_builds_the_embedding_document_itself caught start_planning
building f"{title}\n{body}" inline for the plan gate's candidate text. That is
the embedded-document shape; plan_candidate_text now takes (title, body) pairs
and calls embedding_text, so the candidate moves with the corpus it is ranked
against (#2486).

Also carries the create_task / create_records milestone_id docstring lines from
step 5 (#4080), which share the file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01821k5B3Ysecp9fNYs92Kuy
This commit is contained in:
2026-09-15 13:45:52 -04:00
co-authored by Claude Opus 5
parent 59407728e6
commit 2811fc9025
3 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -408,8 +408,9 @@ async def test_a_bad_threshold_setting_falls_back_to_the_default():
def test_plan_candidate_text_carries_the_steps():
text = plan_candidate_text(description=None, body=" design ", step_texts=["Step one\n", ""])
assert text == "design\n\nStep one"
text = plan_candidate_text(description=None, body=" design ",
steps=[("Step one", None), ("Step two", "with a body"), (None, None)])
assert text == "design\n\nStep one\n\nStep two\nwith a body"
def test_plan_match_response_points_at_adding_steps_not_a_second_plan():