Skip to content

Add failing tests for #643: hard stop casing mismatch#645

Draft
prompt-driven-github[bot] wants to merge 1 commit intomainfrom
fix/issue-643
Draft

Add failing tests for #643: hard stop casing mismatch#645
prompt-driven-github[bot] wants to merge 1 commit intomainfrom
fix/issue-643

Conversation

@prompt-driven-github
Copy link
Copy Markdown
Contributor

Summary

Adds failing tests that detect the bug reported in #643_check_hard_stop uses title-case string matching that doesn't match the lowercase STOP_CONDITION: format the prompts instruct the LLM to output.

Test Files

  • Unit tests: tests/test_issue_643_hard_stop_casing.py
  • E2E tests: tests/test_e2e_issue_643_hard_stop_casing.py

Prompt Files

  • Step 4 prompt fixed in Step 5.5: pdd/prompts/agentic_change_step4_clarify_LLM.prompt (added missing STOP_CONDITION: marker)

What This PR Contains

  • 6 failing unit tests that reproduce the casing mismatch in _check_hard_stop
  • 4 failing E2E tests that verify the orchestrator continues past steps 4/7 with prompt-instructed output
  • 4 passing regression tests confirming existing title-case detection still works
  • Prompt fix adding STOP_CONDITION: Clarification needed to the step 4 prompt

Root Cause

_check_hard_stop() at pdd/agentic_change_orchestrator.py:319,323 checks for "Clarification Needed" and "Architectural Decision Needed" (title case), but the prompts instruct the LLM to output STOP_CONDITION: Clarification needed and STOP_CONDITION: Architectural decision needed (lowercase). The step 4 prompt was also missing the STOP_CONDITION marker entirely.

Next Steps

  1. Make _check_hard_stop detect the STOP_CONDITION: prefix format with case-insensitive matching
  2. Verify all unit tests pass
  3. Verify all E2E tests pass
  4. Run full test suite
  5. Mark PR as ready for review

Fixes #643


Generated by PDD agentic bug workflow

- Unit tests verifying _check_hard_stop detects STOP_CONDITION format
- E2E tests verifying orchestrator halts on prompt-instructed output
- Fix step 4 prompt to include STOP_CONDITION marker

Tests fail on current code, confirming the bug: _check_hard_stop uses
title-case comparisons that don't match the lowercase format the prompts
instruct the LLM to output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

pdd change doesn't wait for response after posting clarification/architecture questions

1 participant