Skip to content

Conversation

@prompt-driven-github
Copy link
Contributor

Summary

Adds failing tests that detect the bug reported in #437 where fingerprint metadata files have all hash fields set to null instead of containing actual content hashes.

Test Files

  • Unit test: tests/test_operation_log.py (modified)
  • E2E test: tests/test_e2e_issue_437_null_hashes.py (new)

What This PR Contains

  • Failing unit test (test_log_operation_decorator_null_hashes_bug_issue_437) that reproduces the reported bug by testing the @log_operation decorator directly
  • Failing E2E test (test_e2e_issue_437_null_hashes_full and test_e2e_issue_437_null_hashes_minimal) that verifies the bug at integration level using the actual pdd generate CLI command
  • Tests are verified to fail on current code and will pass once the bug is fixed

Root Cause

The @log_operation decorator at line 338 of pdd/operation_log.py calls save_fingerprint() without the required paths parameter. Without this parameter, calculate_current_hashes() returns an empty dictionary, causing all hash fields (prompt_hash, code_hash, example_hash, test_hash) to be set to None in the fingerprint metadata files.

This breaks the fingerprint-based change detection feature that is core to PDD's incremental regeneration system.

Next Steps

  1. Implement the fix at pdd/operation_log.py:338
  2. Verify the unit test passes
  3. Verify the E2E test passes
  4. Run full test suite to check for regressions
  5. Mark PR as ready for review

Fixes #437


Generated by PDD agentic bug workflow

…adata

This commit adds comprehensive test coverage to detect the bug where
fingerprint metadata files have all hash fields set to null instead of
containing actual content hashes.

Test files added:
- Unit test in tests/test_operation_log.py: Tests the @log_operation
  decorator to verify it creates fingerprints with null hashes when the
  'paths' parameter is not passed to save_fingerprint()
- E2E test in tests/test_e2e_issue_437_null_hashes.py: Tests the full
  'pdd generate' command flow to verify the bug at integration level

Both tests are verified to fail on the current codebase and will pass
once the fix is implemented.

Root cause: pdd/operation_log.py:338 - @log_operation decorator calls
save_fingerprint() without the required 'paths' parameter.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant