feat(workflow-sync): add --phase health drift detection + --repo-filter [#350] #358

Merged
jmiller merged 2 commits from feature/workflow-health-check into main 2026-07-17 00:09:37 +00:00
Owner

Summary

Adds workflow_sync.php --phase health — read-only drift detection that flags any governed repo missing its synced .mokogit/workflows/, exits non-zero for CI, and optionally sends a critical ntfy push (--alert-ntfy) and/or opens a Git issue on the affected repo (--alert-issue, idempotent). Also adds --repo-filter to scope sync/health to specific repos, and registers workflow:sync in bin/moko.

This is the one genuinely-unique piece of the superseded PR #356 (against a stale dev base) — everything else in #356 (the MokoGitea→MokoGit rebrand, manifest→metadata-API retirement, npm/dot template maps, schema markers, CI fixes) already landed on main via #317–#355, so #356 was closed rather than merged.

Design

  • Expected set per repo = its platform template's workflows (via existing PLATFORM_TEMPLATES) minus PLATFORM_EXCLUDES — same source of truth the sync writes from, so the check can't pass while the sync is broken.
  • Unreachable mapped template ⇒ warn + skip (never assesses against the wrong Generic baseline).
  • Health verdict isolated in evaluateRepoHealth(); branch-existence guard skips repos lacking the target branch.

Verification

  • php -l clean; ran --phase health --repo-filter .mokogit,.vault,.mokogit-private → correctly reports all healthy.
  • CHANGELOG [Unreleased] updated (Validate PR gate).

https://claude.ai/code/session_014Fjb4NvgviMoNU6NrGa4VE

## Summary Adds `workflow_sync.php --phase health` — read-only drift detection that flags any governed repo missing its synced `.mokogit/workflows/`, exits non-zero for CI, and optionally sends a critical **ntfy** push (`--alert-ntfy`) and/or opens a **Git issue** on the affected repo (`--alert-issue`, idempotent). Also adds `--repo-filter` to scope sync/health to specific repos, and registers `workflow:sync` in `bin/moko`. This is the one genuinely-unique piece of the superseded PR #356 (against a stale dev base) — everything else in #356 (the MokoGitea→MokoGit rebrand, manifest→metadata-API retirement, npm/dot template maps, schema markers, CI fixes) already landed on `main` via #317–#355, so #356 was closed rather than merged. ## Design - Expected set per repo = its platform template's workflows (via existing `PLATFORM_TEMPLATES`) minus `PLATFORM_EXCLUDES` — same source of truth the sync writes from, so the check can't pass while the sync is broken. - Unreachable mapped template ⇒ warn + skip (never assesses against the wrong Generic baseline). - Health verdict isolated in `evaluateRepoHealth()`; branch-existence guard skips repos lacking the target branch. ## Verification - `php -l` clean; ran `--phase health --repo-filter .mokogit,.vault,.mokogit-private` → correctly reports all healthy. - CHANGELOG `[Unreleased]` updated (Validate PR gate). https://claude.ai/code/session_014Fjb4NvgviMoNU6NrGa4VE
jmiller added 2 commits 2026-07-17 00:09:00 +00:00
feat(workflow-sync): add --phase health drift detection + --repo-filter [#350]
Universal: Auto Version Bump / Version Bump (push) Successful in 15s
3f2e7a64f3
Read-only health check that flags repos missing their synced .mokogit/workflows/ (non-zero
exit) with optional critical ntfy push (--alert-ntfy) and auto-filed Git issue (--alert-issue).
Adds --repo-filter to scope sync/health. Registers workflow:sync in bin/moko.

Ported from the superseded PR #356 onto current main (the rest of #356 — rebrand, manifest
retirement, template maps — already landed on main via #317-#355).
chore(version): auto-bump patch 09.45.01-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 24s
99d55b63af
jmiller merged commit 64a654db34 into main 2026-07-17 00:09:37 +00:00
jmiller deleted branch feature/workflow-health-check 2026-07-17 00:09:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoCLI#358