Skip to content

pdd sync over-regenerates mature modules and breaks public compatibility #1012

@Serhan-Asad

Description

@Serhan-Asad

Problem

pdd sync can turn a narrow prompt change into a broad rewrite of mature generated modules and tests. In PR #1010 for issue #1005, a small prompt change regenerated pdd/update_main.py and tests/test_update_main.py with thousands of lines changed, dropping existing public/helper compatibility.

Evidence

PR #1010 commit sequence:

  • 4b36ffde2 (pdd change) changed only pdd/prompts/update_main_python.prompt and architecture.json.
  • 839b02a49 (pdd sync) rewrote pdd/update_main.py and tests/test_update_main.py massively and added stray generated prompt artifacts.

Regressions introduced after sync included:

  • Removed or changed module-level symbols used by existing tests/callers: git, read_fingerprint, calculate_sha256.
  • Changed derive_basename_and_language compatibility.
  • Broke .pddrc context/strength behavior in update flows.
  • Narrow generated tests passed while broader CI failed.

Expected Behavior

For mature modules, pdd sync should preserve the existing public surface and behavior unless the prompt explicitly requests a breaking change.

Acceptance Criteria

  • pdd sync has a compatibility/conformance gate comparing generated public symbols/signatures against the pre-sync module or architecture.json interface.
  • Existing externally imported helpers remain present unless explicitly removed by the prompt/issue.
  • Generated test rewrites do not discard broad existing coverage for unrelated behavior.
  • A sync that would produce broad unrelated churn fails with an actionable diagnostic instead of committing it.

Related

Observed while reviewing PR #1010 / issue #1005.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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