Skip to content

Add failing tests for #505: DEFAULT_STRENGTH inconsistency#529

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

Add failing tests for #505: DEFAULT_STRENGTH inconsistency#529
prompt-driven-github[bot] wants to merge 1 commit intomainfrom
fix/issue-505

Conversation

@prompt-driven-github
Copy link
Contributor

Summary

Adds failing tests that detect the bug reported in #505 — stale hardcoded DEFAULT_STRENGTH values across multiple files that don't match the canonical 1.0 in pdd/__init__.py.

Test Files

  • Unit tests: tests/core/test_cli.py, tests/test_llm_invoke.py, tests/server/test_executor.py
  • E2E test: tests/test_e2e_issue_505_default_strength.py

Prompt Files

  • Prompt file fixed in Step 5.5: pdd/templates/generic/generate_pddrc_YAML.prompt (updated 3 stale 0.751.0)

What This PR Contains

  • 4 failing unit tests that reproduce the reported bug across cli.py, llm_invoke.py, and executor.py
  • 3 failing E2E tests that verify the bug at integration level using subprocess CLI invocation
  • Prompt template fix for generate_pddrc_YAML.prompt (prompt defect from Step 5.5)
  • Tests are verified to fail on current code and will pass once the code bug is fixed

Root Cause

The DEFAULT_STRENGTH constant was incrementally updated from 0.5 → 0.75 → 1.0 over time, but hardcoded string literals and fallback values in cli.py (0.75), llm_invoke.py (0.5), and executor.py (0.5) were never updated to match. There is no mechanism to derive user-facing default descriptions from the constant — each location independently hardcodes a stale numeric literal.

Next Steps

  1. Implement the fix at the identified locations (pdd/core/cli.py:220, pdd/llm_invoke.py:1657, pdd/server/executor.py:16)
  2. Verify the unit tests pass
  3. Verify the E2E tests pass
  4. Run full test suite
  5. Mark PR as ready for review

Fixes #505


Generated by PDD agentic bug workflow

Add unit and E2E tests that detect stale hardcoded DEFAULT_STRENGTH
values across cli.py (0.75), llm_invoke.py (0.5), and executor.py (0.5)
which should all reflect the canonical value of 1.0 from pdd/__init__.py.

Also fix prompt template generate_pddrc_YAML.prompt which referenced
the stale 0.75 default in 3 places.

Tests are verified to fail on current code and will pass once the
code bug is fixed.

Fixes #505
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.

CLI help text shows wrong DEFAULT_STRENGTH (0.75 vs actual 1.0)

1 participant