Skip to content

test: add regression tests for multi-context basename resolution#737

Closed
gltanaka wants to merge 1 commit intomainfrom
fix/sync-basename-resolution-upstream
Closed

test: add regression tests for multi-context basename resolution#737
gltanaka wants to merge 1 commit intomainfrom
fix/sync-basename-resolution-upstream

Conversation

@gltanaka
Copy link
Copy Markdown
Contributor

Summary

  • Adds regression tests for _detect_modules_from_branch_diff verifying it preserves directory context for prompts in context-specific directories (e.g. prompts/frontend/, prompts/backend/)
  • Also covers extension prompts under extensions/github_pdd_app/prompts/

The code already handles this correctly — these tests prevent future regressions.

Related: promptdriven/pdd_cloud#826

Test plan

  • All new tests pass
  • All existing TestDetectModulesFromBranchDiff tests still pass

🤖 Generated with Claude Code

Adds tests verifying _detect_modules_from_branch_diff preserves
directory context for prompts in context-specific directories like
prompts/frontend/ and prompts/backend/. Also covers extension prompts
under extensions/github_pdd_app/prompts/.

These basenames (e.g. "frontend/app/dashboard/page") must retain their
directory prefix so pdd sync resolves the correct .pddrc context.

Related: promptdriven/pdd_cloud#826

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds regression coverage for _detect_modules_from_branch_diff to ensure prompt module basenames preserve directory context (multi-context repos) and correctly handle nested prompts/ directories under extensions.

Changes:

  • Add a regression test asserting context-prefixed basenames are preserved for prompts under prompts/<context>/....
  • Add a regression test asserting extension prompt paths like extensions/<ext>/prompts/... are handled and produce correct basenames.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gltanaka
Copy link
Copy Markdown
Contributor Author

Moving to gltanaka/pdd — this should be in the private fork.

@gltanaka gltanaka closed this Mar 31, 2026
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.

2 participants