From 8e1f83feed8d82cead4dfcaab34a7d793655f44b Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Sun, 28 Jun 2026 10:51:30 +0000 Subject: [PATCH 1/2] docs(auto-derive): document cross-repo dispatch trigger + fix dead G6 link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two updates: * Fix the dead `[G6 matrix](#)` empty-anchor link (rabbit had flagged in #135 review; the original fix targeted README:6 not README:19; replaced with prose since the matrix is in the design doc linked above, not anywhere in this repo). * Rewrite the "Daily reconcile + auto-PR" section as "Triggers + reconcile + auto-PR" — enumerates all 3 fire triggers (daily cron, release-targets-changed repository_dispatch added by openemr#12657, manual workflow_dispatch). Existing reconciliation behavior moved under the "in all three trigger paths" framing. Trimmed the redundant workflow_dispatch paragraph that now duplicates the trigger enumeration. --- tools/auto-derive/README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/tools/auto-derive/README.md b/tools/auto-derive/README.md index b9bc4d5..efd061d 100644 --- a/tools/auto-derive/README.md +++ b/tools/auto-derive/README.md @@ -16,7 +16,7 @@ See the G6 design in the [release-mechanism migration plan](https://github.com/o - **Sticky cluster identity:** each cluster maps to an externally-referenced subdomain (e.g. `eight` -> `eight.openemr.io`), so the bot reads the current file as state and applies a diff rather than rendering from scratch. -- **Section ownership** (per [G6 matrix](#)): +- **Section ownership** (per G6 matrix — see the design doc linked above): - Production (`five` family): fixed clusters; `branch` column set to the `latest`-tagged row's `openemr_version_ref` (e.g. `v8_0_0_3`); description regenerated from a template using the latest row's @@ -129,9 +129,24 @@ WS=$(mktemp -d) && cp -a fixtures-and-tests/fixtures//current/. $WS/ cp -a $WS/. fixtures-and-tests/fixtures//expected/ && rm -rf $WS ``` -## Daily reconcile + auto-PR +## Triggers + reconcile + auto-PR -The `derive-ip-map` workflow runs daily at 07:00 UTC in **reconcile** mode: +The `derive-ip-map` workflow runs `derive.sh --write` and opens a PR on diff. +It fires on three triggers: + +1. **Daily 07:00 UTC cron** — load-bearing self-healing fallback; catches + any drift that wasn't picked up by an event trigger (e.g., the bot was + down during a push, or a maintainer hand-edited demo_farm state). +2. **`repository_dispatch` event `release-targets-changed`** — fired by + openemr/openemr's `.github/workflows/notify-release-targets-changed.yml` + on push to master touching `.github/release-targets.yml`. Eliminates the + up-to-24h lag for the most common trigger condition (a release-targets + row changes → demo_farm reconciles within minutes). +3. **Manual `workflow_dispatch`** — input dropdown picks `reconcile` (write + + PR) or `dry-run` (preview only, no branch/PR side effects, output + uploaded as the `derive-output` artifact). + +In all three trigger paths the **reconcile** job: - Runs `derive.sh --write` and checks `ip_map_branch.txt` + `docker/scripts/demoLibrary.source` for any diff vs `master`. Diff @@ -147,10 +162,6 @@ The branch is **stable + force-pushed**, so the bot updates the same PR across days rather than spamming new ones. Merge to land the reconciled state; the bot quiets until the next genuine drift. -`workflow_dispatch` defaults to `reconcile` too; pick `dry-run` from the -input dropdown to preview the algorithm's output without any branch/PR -side effects (uploaded as the `derive-output` artifact). - **Caveat:** the bot PR is created via `GITHUB_TOKEN`, so downstream workflows (rabbit, CI) don't run on it automatically. The fixture suite job in this same workflow is the authoritative algorithm validator. To From e5845e9a8f8907a523dcece1ec3b024498ecac25 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Sun, 28 Jun 2026 10:58:59 +0000 Subject: [PATCH 2/2] docs(auto-derive): scope reconcile-job description (dry-run is a separate job) --- tools/auto-derive/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/auto-derive/README.md b/tools/auto-derive/README.md index efd061d..dd03a2a 100644 --- a/tools/auto-derive/README.md +++ b/tools/auto-derive/README.md @@ -146,7 +146,8 @@ It fires on three triggers: + PR) or `dry-run` (preview only, no branch/PR side effects, output uploaded as the `derive-output` artifact). -In all three trigger paths the **reconcile** job: +Triggers 1 + 2 always invoke the **reconcile** job; trigger 3 picks +between `reconcile` and `dry-run` per the input. The **reconcile** job: - Runs `derive.sh --write` and checks `ip_map_branch.txt` + `docker/scripts/demoLibrary.source` for any diff vs `master`. Diff