Skip to content

Detect drift in synchronized workflow stubs #59

@coisa

Description

@coisa

Objective

Detect drift between packaged workflow stubs in resources/github-actions and existing consumer workflow files managed by dev-tools:sync.

Current Limitation

dev-tools:sync copies workflow stubs when missing and can overwrite when explicitly requested, but it does not report when an existing consumer workflow has drifted from the packaged default.

Proposed Work

Add workflow stub drift detection so maintainers can see when consumer repositories are behind or customized relative to the packaged resources.

Scope

  • Compare packaged workflow stubs from resources/github-actions/*.yml with matching files under .github/workflows/.
  • Report missing, matching, drifted, and intentionally overwritten files.
  • Do not overwrite drifted files unless the existing overwrite option requests it.
  • Make drift output actionable by naming source and target paths.
  • Add tests for matching, missing, drifted, and overwrite cases.

Non-goals

  • Auto-merging workflow customizations.
  • Rewriting all consumer workflows by default.
  • Introducing a new workflow templating system.

Acceptance Criteria

Delivery Criteria

  • dev-tools:sync reports when an existing workflow stub differs from its packaged source.
  • Drift detection does not modify existing workflow files unless overwrite behavior is explicitly enabled.
  • Missing workflows continue to be copied as today.
  • Matching workflows are reported as up to date or included in the sync summary.
  • Tests cover drift detection without overwrite and overwrite behavior.

Architectural / Isolation Criteria

  • Workflow comparison logic is isolated from SyncCommand orchestration.
  • Comparison is deterministic and ignores no unrelated files.
  • The implementation can be reused by future --check or status modes.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions