Add failing tests for #522: fingerprint ignores include deps#527
Add failing tests for #522: fingerprint ignores include deps#527Serhan-Asad wants to merge 2 commits intopromptdriven:mainfrom
Conversation
…lude> dependencies Unit tests and E2E test that reproduce the bug where sync_determine_operation only hashes the raw .prompt file, missing changes to <include>d dependencies. Fixes promptdriven#522
…er included file changes Fixes promptdriven#522
|
Hey @Serhan-Asad — thanks for tackling this one! Really appreciate the thorough approach: failing tests first, clean implementation of I tested this locally and the unit tests + E2E tests all pass (88/88 on However, I hit a gap when running the full manual reproduction from issue #522. Here's what happens:
So the fix is correct at the fingerprint-calculation layer, but the upstream insert-includes step removes the A couple of possible paths forward:
Would you be up for exploring one of these approaches? Happy to pair on it or discuss further. This is a real bug that needs fixing and you're clearly on the right track — just needs one more layer to close the loop end-to-end. |
Summary
Adds failing tests that detect the bug reported in #522.
Test Files
tests/test_sync_determine_operation.pytests/test_e2e_issue_522_include_fingerprint.pyWhat This PR Contains
Root Cause
The fingerprint system in
sync_determine_operation.py:1364computes the hash using onlycalculate_sha256(paths['prompt'])— the raw top-level.promptfile.<include>dependencies are never resolved or hashed. When an included file changes but the top-level prompt doesn't, the fingerprint matches and sync skips regeneration.Next Steps
Fixes #522
Generated by PDD agentic bug workflow