Skip to content

Add failing tests for #530: documentation-only changes#532

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

Add failing tests for #530: documentation-only changes#532
prompt-driven-github[bot] wants to merge 1 commit intomainfrom
fix/issue-530

Conversation

@prompt-driven-github
Copy link
Contributor

Summary

Adds failing tests that detect the bug reported in #530 where pdd-change incorrectly stops at Step 6 for documentation-only changes, wasting tokens on Steps 1-5.

Test Files

  • Unit test: tests/test_agentic_change_orchestrator.py
  • E2E test: tests/test_e2e_issue_530_documentation_only_changes.py

Prompt Files

  • Prompt file fixed in Step 5.5: pdd/prompts/agentic_change_step6_devunits_LLM.prompt

What This PR Contains

  • Failing unit test that reproduces the reported bug
  • Failing E2E test that verifies the bug at integration level
  • Prompt file fix that distinguishes "Documentation Only" (valid path) from "No Dev Units Found" (true failure)
  • Tests are verified to fail on current code and will pass once the bug is fixed

Root Cause

The _check_hard_stop() function at pdd/agentic_change_orchestrator.py:286 treats "No Dev Units Found" as a failure condition rather than recognizing documentation-only changes as a valid workflow path. The orchestrator runs all steps 1-10 sequentially without conditional logic to skip Steps 7-8 (architecture/code analysis) for documentation-only changes, wasting tokens on irrelevant analysis.

Next Steps

  1. Implement the fix at the identified location (orchestrator.py:286)
  2. Verify the unit test passes
  3. Verify the E2E test passes
  4. Run full test suite
  5. Mark PR as ready for review

Fixes #530


Generated by PDD agentic bug workflow

This commit adds comprehensive test coverage for the bug where
pdd-change incorrectly stops at Step 6 for documentation-only
changes, wasting tokens on Steps 1-5.

Test Files:
- Unit tests in tests/test_agentic_change_orchestrator.py
- E2E tests in tests/test_e2e_issue_530_documentation_only_changes.py

Prompt Fix:
- Modified pdd/prompts/agentic_change_step6_devunits_LLM.prompt to
  distinguish "Documentation Only" (valid path) from "No Dev Units
  Found" (true failure)

The tests currently fail on the buggy code and will pass once the
orchestrator is fixed to skip Steps 7-8 for documentation-only changes.

Related to #530

Co-Authored-By: Claude Sonnet 4.5 <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 finished step 1-5 but failed at step 6

1 participant