Skip to content

fix: protect workflow synchronization from local divergence - #55

Merged
vitormattos merged 4 commits into
mainfrom
fix/sync-workflows-divergence
Sep 20, 2026
Merged

vitormattos merged 4 commits into
mainfrom
fix/sync-workflows-divergence

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Reopens and completes #52.

Summary

Harden the reusable workflow sync Action before migrating more consumers.

The Action now:

  • adopts an existing workflow only when it already matches catalog + local patch;
  • refuses initial adoption when local content differs and no matching patch explains the difference;
  • detects divergence when the lock already points to the current catalog version;
  • reports a managed workflow that disappeared locally instead of silently forgetting it;
  • keeps patch failures distinct from unmanaged local divergence;
  • never overwrites an unmanaged divergent workflow during adoption.

This makes the migration safe for repositories such as LibreSign that already have many workflows with local history.

Signed-off-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: Vitor Mattos <vitor@php.rio>
@vitormattos
vitormattos merged commit c689409 into main Sep 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant