Skip to content

Sync fingerprint ignores <include> dependencies — stale code after included file changes #522

@Serhan-Asad

Description

@Serhan-Asad

pdd sync fingerprints only the top-level .prompt file, not its <include> dependencies. When an included file changes, sync reports "nothing to do" and skips regeneration, leaving generated code stale.

File: pdd/sync_determine_operation.py:892-906, 1364

Reproduction

mkdir /tmp/fp-test && cd /tmp/fp-test && git init && git commit --allow-empty -m "init"

# Create a prompt that includes a dependency
echo 'Create a helper function that uses shared types.
<include>shared_types.py</include>
Generate a function that creates a User object.' > helper_python.prompt

# Create the included file
echo 'class User:
    def __init__(self, name: str, age: int):
        self.name = name
        self.age = age' > shared_types.py

# First sync — generates code and saves fingerprint
pdd --force sync helper --no-steer --skip-tests

# Modify the included file (add email field)
echo 'class User:
    def __init__(self, name: str, age: int, email: str):
        self.name = name
        self.age = age
        self.email = email' > shared_types.py

# Second sync — should regenerate but doesn't
pdd --force sync helper --no-steer --skip-tests
# Result: 0.01s, $0.00 cost, "nothing to do"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions