Add failing tests for #1074#1079
Draft
prompt-driven-github[bot] wants to merge 3 commits into
Draft
Conversation
Adds 8 behavioral tests covering all 5 acceptance criteria in #1074: - AC1 (worktree skip): 2 tests confirming nested .pddrc under .worktrees/ is ignored (already passes via existing dot-prefix filter, kept as regression guard). - AC2 (duplicate filepath dedup): 1 test confirming architecture entries pointing at the same absolute output filepath are scheduled once. - AC3 (path-aware filepath inference): 2 tests confirming sync-architecture infers nested output filepaths from path-aware prompt names like src/workers/runtime/gemini_cli_Python.prompt. - AC4 (ancestor prompts/ root): 1 test confirming nested architecture.json resolves against an ancestor prompts/ directory. - AC5 (dependency-tag normalization): 2 tests confirming legacy basename and case-variant <pdd-dependency> tags are normalized to existing architecture filenames. 6 of 8 tests fail on main, reproducing the bugs at: - pdd/agentic_sync.py:480 (dedup key) - pdd/architecture_sync.py:329-343 (_infer_filepath) - pdd/architecture_sync.py:105-136 (_resolve_sync_paths) - pdd/architecture_sync.py:281-287, 873-886 (dep-tag normalization) Refs #1074 Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 8 behavioral regression tests that reproduce the bug reported in #1074: global sync misreading nested worktrees and path-aware architecture metadata.
Test File
tests/test_issue_1074_reproduction.py— 8 tests, 6 currently failing onmain(reproducing AC2–AC5), 2 passing as regression guards (AC1 already works via the existing dot-prefix filter).Acceptance Criteria Covered
main.pddrcunder.worktrees/sync-architectureinfers path-aware filepaths from nested prompt namesarchitecture.jsonresolves against ancestorprompts/root<pdd-dependency>tags normalizedRoot Cause (from Step 6 analysis)
Four localized defects in two files:
pdd/agentic_sync.py:480: dedup key is(arch_path, basename); must also dedupe on the resolved absolutefilepath.pdd/architecture_sync.py:329-343(_infer_filepath): non-path-aware and case-sensitive; should mirrorfilepath_to_prompt_filenameand consult_EXT_TO_LANGUAGEcase-insensitively.pdd/architecture_sync.py:105-136(_resolve_sync_paths): stops at the firstarchitecture.jsonwithout verifying a siblingprompts/; must walk up to find an ancestorprompts/.pdd/architecture_sync.py:281-287(filter drops bare basenames) and873-886(writes verbatim): needs a normalization map built from existing arch filenames, mirroringnormalize_architecture_filenames'sold_to_newpattern.Next Steps
tests/test_issue_1074_reproduction.pypasspytest -vv tests/) to check for regressionsFixes #1074
Generated by PDD agentic bug workflow