Skip to content

Commit a05cc6e

Browse files
authored
docs(auto-derive): document cross-repo dispatch trigger + fix dead G6 link (#144)
* docs(auto-derive): document cross-repo dispatch trigger + fix dead G6 link 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. * docs(auto-derive): scope reconcile-job description (dry-run is a separate job)
1 parent bce5c3b commit a05cc6e

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

tools/auto-derive/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ See the G6 design in the [release-mechanism migration plan](https://github.com/o
1616
- **Sticky cluster identity:** each cluster maps to an externally-referenced
1717
subdomain (e.g. `eight` -> `eight.openemr.io`), so the bot reads the current
1818
file as state and applies a diff rather than rendering from scratch.
19-
- **Section ownership** (per [G6 matrix](#)):
19+
- **Section ownership** (per G6 matrix — see the design doc linked above):
2020
- Production (`five` family): fixed clusters; `branch` column set to
2121
the `latest`-tagged row's `openemr_version_ref` (e.g. `v8_0_0_3`);
2222
description regenerated from a template using the latest row's
@@ -129,9 +129,25 @@ WS=$(mktemp -d) && cp -a fixtures-and-tests/fixtures/<your-name>/current/. $WS/
129129
cp -a $WS/. fixtures-and-tests/fixtures/<your-name>/expected/ && rm -rf $WS
130130
```
131131

132-
## Daily reconcile + auto-PR
132+
## Triggers + reconcile + auto-PR
133133

134-
The `derive-ip-map` workflow runs daily at 07:00 UTC in **reconcile** mode:
134+
The `derive-ip-map` workflow runs `derive.sh --write` and opens a PR on diff.
135+
It fires on three triggers:
136+
137+
1. **Daily 07:00 UTC cron** — load-bearing self-healing fallback; catches
138+
any drift that wasn't picked up by an event trigger (e.g., the bot was
139+
down during a push, or a maintainer hand-edited demo_farm state).
140+
2. **`repository_dispatch` event `release-targets-changed`** — fired by
141+
openemr/openemr's `.github/workflows/notify-release-targets-changed.yml`
142+
on push to master touching `.github/release-targets.yml`. Eliminates the
143+
up-to-24h lag for the most common trigger condition (a release-targets
144+
row changes → demo_farm reconciles within minutes).
145+
3. **Manual `workflow_dispatch`** — input dropdown picks `reconcile` (write
146+
+ PR) or `dry-run` (preview only, no branch/PR side effects, output
147+
uploaded as the `derive-output` artifact).
148+
149+
Triggers 1 + 2 always invoke the **reconcile** job; trigger 3 picks
150+
between `reconcile` and `dry-run` per the input. The **reconcile** job:
135151

136152
- Runs `derive.sh --write` and checks `ip_map_branch.txt` +
137153
`docker/scripts/demoLibrary.source` for any diff vs `master`. Diff
@@ -147,10 +163,6 @@ The branch is **stable + force-pushed**, so the bot updates the same PR
147163
across days rather than spamming new ones. Merge to land the reconciled
148164
state; the bot quiets until the next genuine drift.
149165

150-
`workflow_dispatch` defaults to `reconcile` too; pick `dry-run` from the
151-
input dropdown to preview the algorithm's output without any branch/PR
152-
side effects (uploaded as the `derive-output` artifact).
153-
154166
**Caveat:** the bot PR is created via `GITHUB_TOKEN`, so downstream
155167
workflows (rabbit, CI) don't run on it automatically. The fixture suite
156168
job in this same workflow is the authoritative algorithm validator. To

0 commit comments

Comments
 (0)