Skip to content

bug: global sync misreads nested worktrees and path-aware architecture metadata #1074

@Serhan-Asad

Description

@Serhan-Asad

Problem

While syncing stale PDD dev units in pdd_cloud, global sync and architecture sync hit several command-level failures before any prompt/code decision could be trusted:

  • pdd sync --dry-run can discover nested .pddrc files inside hidden/tooling directories such as .worktrees/, then resolve modules against stale worktree copies instead of the real project tree.
  • Global sync scans duplicate architecture entries that point at the same absolute output filepath, causing duplicate scheduling and noisy false staleness.
  • pdd sync-architecture does not reliably handle path-aware prompt filenames, nested architecture files that use an ancestor prompts/ root, or legacy dependency tags that refer to module basenames/case variants.

These issues make large repo-wide stale-unit cleanup unsafe because the dry-run graph can be wrong before any fingerprint or prompt/code comparison is considered.

Expected

Repo-wide PDD sync analysis should only schedule the real project modules, de-dupe duplicate architecture entries by output file, and keep architecture dependency filenames normalized to existing prompt-relative architecture filenames.

Acceptance Criteria

  • Global sync ignores nested .pddrc files under hidden/tooling directories such as .worktrees/.
  • Global sync schedules duplicate absolute output filepaths only once.
  • sync-architecture can infer path-aware output filepaths from prompt names such as src/workers/runtime/gemini_cli_Python.prompt.
  • sync-architecture resolves nested architecture files with an ancestor prompts/ root.
  • Dependency tags using stale basenames or case variants are normalized to the existing architecture filename when unambiguous.
  • Regression tests cover each behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pdd-fixPDD: apply a fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions