diff --git a/plugins/ocl/.claude-plugin/plugin.json b/plugins/ocl/.claude-plugin/plugin.json index 0f7322f..de96f91 100644 --- a/plugins/ocl/.claude-plugin/plugin.json +++ b/plugins/ocl/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "ocl", - "version": "0.5.0", + "version": "0.5.1", "description": "Search and maintain the PIH concept dictionary in Open Concept Lab (OCL): look up concepts, check set membership, clone from CIEL, and create or edit PIH concepts and mappings.", "author": { "name": "Partners In Health" diff --git a/plugins/ocl/README.md b/plugins/ocl/README.md index 1aa207b..2206c16 100644 --- a/plugins/ocl/README.md +++ b/plugins/ocl/README.md @@ -86,7 +86,7 @@ Each check also watches for OCL fixing the clone bugs it works around (ocl_issue **The same check also runs automatically** when the PIH/pihemr "Update OCL export" GitHub Action puts a new release into the distro. If the release has errors, the Action stops and doesn't open a pull request, so the release never reaches servers. -**Then it test-loads the release on a real OpenMRS database.** The release check only catches problems we already know about, so the Action (and Claude, when you ask it to put a release into the distro) also starts the ZL EMR with the new export on a copy of the nightly ZL seed database and checks that the import finished without errors. It takes about 15–30 minutes in the Action (10–20 when Claude runs it on your machine); tick *Skip the load test* in the Action, or tell Claude to skip it, when you can't wait. The PR says when it was skipped. The test is pihemr's `scripts/ocl-load-test.sh`. +**Then it test-loads the release on a real OpenMRS database.** The release check only catches problems we already know about, so the Action (and Claude, when you ask it to put a release into the distro) also starts the ZL EMR with the new export on a copy of the nightly ZL seed database and checks that the import finished without errors. It takes about 5–10 minutes; tick *Skip the load test* in the Action, or tell Claude to skip it, when you can't wait. The PR says when it was skipped. The test is pihemr's `scripts/ocl-load-test.sh`. Developers can run the check directly: `python3 -I plugins/ocl/skills/ocl-search/scripts/ocl_release_check.py --unreleased`. Add `--since ` to check against an older release (e.g. `--since 1.8.46` reproduces the 1.8.47 failure), or use `--export --baseline ` to check an export the way the Action does. `--list-checks` lists the checks; the script's header explains how to add or retire one. diff --git a/plugins/ocl/skills/ocl-search/SKILL.md b/plugins/ocl/skills/ocl-search/SKILL.md index 0a81119..53c9010 100644 --- a/plugins/ocl/skills/ocl-search/SKILL.md +++ b/plugins/ocl/skills/ocl-search/SKILL.md @@ -235,7 +235,7 @@ OpenMRS servers load the PIH dictionary from an export zip committed to the dist 1. **Get the download URL.** `GET …/PIH//export/` with the token returns `302` once the export is built (204 or 208 mean it isn't ready yet; see workflow 5), redirecting to a signed S3 URL such as `https://ocl-production-s3.s3.amazonaws.com/orgs/PIH/PIH_PIH_v1.8.43.2026-10-29_212531.zip?…`. Read the `Location` header (`curl -s -D - -o /dev/null …`), then download that URL in a separate curl *without* the token header. It's already signed, and this keeps the token from going to S3. 2. **Check the zip** before using it. It holds a single `export.json`. Confirm its `id` is the version you wanted, and note how many `concepts` and `mappings` it has, so you can tell the user. -3. **Load-test it on a real OpenMRS database** before creating any branch. The release check only catches the problems we know about; this runs the actual import. Ask the user first whether to run it, since it takes about 10–20 minutes. If they skip it, say so in the PR description. +3. **Load-test it on a real OpenMRS database** before creating any branch. The release check only catches the problems we know about; this runs the actual import. Ask the user first whether to run it, since it takes about 5–10 minutes. If they skip it, say so in the PR description. - It uses pihemr's `scripts/ocl-load-test.sh`, the same script the GitHub Action runs. If `origin/master` doesn't have it yet, say the load test isn't available and carry on. - Don't touch the user's pihemr checkout. Make a throwaway worktree from master: `git -C fetch`, then `git -C worktree add --detach /pihemr-load-test origin/master`. In it, replace the zip in `content/configuration/backend_configuration/ocl/` with the new one, named as in step 6. - Run `scripts/ocl-load-test.sh --summary-md /load-test.md --openmrs-log /openmrs.log` there, in the background (Java 8, Maven and Docker are needed). It builds pihemr and the ZL EMR distribution with the new export, restores the nightly ZL seed database (`partnersinhealth/zl-emr-seed-haiti`, which already has master's export loaded) into a new `openmrs-docker` instance, starts it, and checks that the OCL import finished with no errors. It clones zl-emr and distro-tools itself; pass `--distro-tools-dir` to use the user's checkout.