Non-Python sync fails when agentic test generator creates files with different naming conventions

Resolved 💬 2 comments Opened Jan 27, 2026 by jiaminc-cmu Closed Feb 28, 2026

Summary

When running pdd sync for non-Python languages (e.g., JavaScript), the sync fails even when the agentic test generator successfully creates test files, because the generated test files use different naming conventions than what sync_orchestration expects.

Root Cause

  1. Agentic test generator respects project conventions: When generating tests for a JavaScript prompt, the agentic test generator explores the project and discovers existing TypeScript test files with .test.ts naming convention (e.g., Jest/Vitest style). It creates tests/test_postcss_config.test.ts to match.
  1. sync_orchestration expects language-specific paths: The get_pdd_file_paths() function computes expected paths based on the prompt language. For JavaScript, it expects tests/test_{basename}.js.
  1. Success check fails: After cmd_test_main returns (even with Success: True), sync_orchestration checks:
  • Line 1558: if operation == 'test': success = pdd_files['test'].exists()
  • Line 1380: if pdd_files['test'].exists(): _execute_tests_and_create_run_report(...)

These checks fail because the expected .js file doesn't exist (the agent created .test.ts instead).

  1. fix operation also fails: When fix is triggered, it tries to run tests on the expected path (tests/test_tailwind_config.js) which doesn't exist, causing FileNotFoundError.

Example Log

Agentic Test Generation Finished. Success: True
Changed files: tests/test_postcss_config.test.ts
...
┃ JavaScript │ Failed │    $0.5923 │ Operation 'test' failed. │

Proposed Fix

For non-Python languages, trust the agentic result instead of doing path-based verification:

  1. In result parsing (line ~1558): For non-Python test operation, use success = bool(result[0]) instead of checking pdd_files['test'].exists().
  1. After test operation: For non-Python, create a synthetic run report based on agentic success (similar to existing crash/fix handling at lines 1593-1607, 1642-1655).
  1. In fix operation: For non-Python, skip the test capture phase that uses pdd_files['test'] path and go directly to agentic fix which will discover the actual test files.

Affected Files

  • pdd/sync_orchestration.py: Lines 1380, 1558, 1446-1512

Labels

bug, non-python, agentic

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗