Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
I would not merge this yet. The new preflight is pointed at the right failure mode, but it does not currently match the include grammar that generation actually accepts. Needed changes:
Verification I ran: |
|
Addressed the review blockers in 62f011c. The substantive points were legit:\n\n- Include parsing now matches preprocess for body includes, path= precedence, and self-closing path= includes.\n- Deterministic line-range self-includes now map selected ranges to public symbol spans, including select="lines:...".\n- query-only self-includes and mode="interface" self-includes now fail with explicit unsupported-context reasons instead of being treated as full implementation context.\n\nValidation run locally:\n- git diff --check\n- python -m py_compile pdd/architecture_include_validation.py pdd/code_generator_main.py\n- pytest -q tests/test_prompt_contract_validation.py tests/test_architecture_include_validation.py tests/test_agentic_arch_complexity_prompt.py\n- pytest -q tests/test_code_generator_main.py tests/test_agentic_sync.py\n- pytest -q tests/test_sync_main.py -k "code_generator_main or front_matter or processes_real_language or skips_llm_only or accepts_bracket_basename"\n- pytest -q tests/test_e2e_issue_553_circular_includes_non_recursive.py::TestIssue553CircularIncludesNonRecursiveE2E::test_non_circular_includes_still_work tests/test_e2e_issue_553_circular_includes_non_recursive.py::TestIssue553CircularIncludesNonRecursiveE2E::test_three_file_cycle_default_mode\n\nGitHub checks are green: CodeQL, Package Preprocess Smoke, Public CLI Regression, and Run Unit Tests. |
Summary
agentic_common_python.promptto include the full existingpdd/agentic_common.pysource so declared exports are preserved.Context
This addresses the #798-style failure mode where
pdd synccan correctly fail architecture conformance after the generated code drops symbols declared in<pdd-interface>/architecture.json, because the LLM only saw partial existing source context.Test Plan
git diff --checkpytest -q tests/test_prompt_contract_validation.py tests/test_agentic_arch_complexity_prompt.py tests/test_architecture_include_validation.py tests/test_code_generator_main.py tests/test_agentic_sync.pypytest -q tests/test_sync_main.py -k "code_generator_main or front_matter or processes_real_language or skips_llm_only or accepts_bracket_basename"pytest -q tests/test_e2e_issue_553_circular_includes_non_recursive.py::TestIssue553CircularIncludesNonRecursiveE2E::test_non_circular_includes_still_work tests/test_e2e_issue_553_circular_includes_non_recursive.py::TestIssue553CircularIncludesNonRecursiveE2E::test_three_file_cycle_default_modepython -m py_compile pdd/architecture_include_validation.py pdd/code_generator_main.pyagentic_commonprompt contract check:agentic_common prompt contract errors: 0I also attempted full
make test; it reached 99% with no failures shown and included the prior circular-include tests passing, but pytest/xdist hung during teardown on inherited test-helper pipes. I terminated the stuck process group and reran the bounded acceptance suite above successfully.