Skip to content

fix: PDD fix for #687#697

Draft
prompt-driven-github[bot] wants to merge 2 commits intomainfrom
fix/issue-687
Draft

fix: PDD fix for #687#697
prompt-driven-github[bot] wants to merge 2 commits intomainfrom
fix/issue-687

Conversation

@prompt-driven-github
Copy link
Copy Markdown
Contributor

Summary

Adds failing tests that detect the bug reported in #687code_generator_main.py never injects example_output_path from resolved_config into template env_vars, causing the LLM to emit raw source code paths instead of _example.py file paths.

Test Files

  • Unit tests: tests/test_code_generator_main.py (5 new tests added)
  • E2E test: tests/test_e2e_issue_687_example_output_path.py

What This PR Contains

  • 5 failing unit tests that reproduce the reported bug (3 fail detecting the bug, 2 pass covering edge cases)
  • 1 failing E2E test that verifies the bug at integration level through the real code_generator_main → construct_paths → _expand_vars pipeline
  • Tests are verified to fail on current code and will pass once the bug is fixed

Root Cause

code_generator_main.py resolves example_output_path from the config via construct_paths() but never injects it into env_vars for template variable substitution. When .pddrc is missing, the LLM has no way to discover example file paths and falls back to emitting raw source code paths like src/core/storage_layer.py.

Next Steps

  1. Implement the fix in code_generator_main.py — inject EXAMPLE_OUTPUT_PATH into env_vars
  2. Verify the unit tests pass
  3. Verify the E2E test passes
  4. Run full test suite
  5. Mark PR as ready for review

Fixes #687


Generated by PDD agentic bug workflow

…plate env_vars

Unit tests (test_code_generator_main.py) and E2E test verify that
EXAMPLE_OUTPUT_PATH from resolved_config is never substituted in
the prompt template, causing the LLM to emit raw source code paths
instead of _example.py file paths.

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.

cli: prompt generation creates code file includes instead of example file includes

1 participant