Skip to content

ocl: general release check (ocl_release_check.py) for the skill and CI - #8

Merged
mogoodrich merged 2 commits into
mainfrom
ocl-release-check
Nov 6, 2026
Merged

mogoodrich merged 2 commits into
mainfrom
ocl-release-check

Conversation

@mogoodrich

Copy link
Copy Markdown
Member

Turns the OCL clone check into a general release check that can be added to over time, and makes it usable in CI. The PIH/pihemr "Update OCL export" Action (UHM-9643, PIH/pihemr#769) will download it from main and run it on each new export before opening a PR.

Changes

  • scripts/ocl_release_check.py replaces check_clone_mappings.py. Checks are registered by name in CHECKS, so they can be added or retired one at a time (--list-checks):
    • name-uuids (UHM-9656): name uuids that clash with a PIH DB snapshot (incl. voided names), or are shared by two PIH concepts. Known clashes that are already fixed on servers (HANDLED_NAME_CLASHES, e.g. the 21797 PAS name freed by pihemr#776) are reported as warnings.
    • clone-mappings (UHM-9636, ocl_issues#3012/#3013): the same logic as before, including the OCL fix watch.
  • Each finding has a severity: error (the import will fail, or wrong data reaches servers) or warning (OCL-only).
  • Modes:
    • --unreleased [--since V]: the pre-release check, as before.
    • --concept …: specific concepts, live.
    • New: --export NEW [--baseline OLD] takes an export zip or JSON. With a baseline, it only checks the concepts that changed.
  • CI options: --fail-on error|warning|never, --summary-md FILE, and exit status 0 OK / 1 findings / 2 couldn't run. The token can come from $OCL_API_TOKEN.
  • Tests: test_ocl_release_check.py has 9 tests, with no network needed.
  • New .github/workflows/test-scripts.yml: runs all plugin script tests on PRs and on main. This protects the options the pihemr Action relies on.
  • SKILL.md and README: updated for the new script, the GitHub Action, and how to add or retire a check.
  • Version: bumped to 0.4.0.

Testing

  • Unit tests: all 24 script tests pass (check_update and the release check).
  • Export check, 1.8.50 against 1.8.46 (what the Action will do): 16 changed concepts checked. It reports the 21797 PAS name clash as an error and exits 1.
  • Pre-release check: --unreleased on the live source (169 concepts changed since 1.8.50, the DICOM work) finds only warnings and exits 0.
  • Single concept: --concept 21797 now reports the clash as handled (a warning), since pihemr#776 fixes it on servers.

🤖 Generated with Claude Code

mogoodrich and others added 2 commits November 6, 2026 11:24
…I (UHM-9643, UHM-9656)

Replaces check_clone_mappings.py with ocl_release_check.py: named, pluggable checks
(name-uuids, clone-mappings), error/warning severities, --export/--baseline for CI,
--fail-on, --summary-md and exit codes. Adds unit tests and a workflow that runs plugin
script tests. Docs updated; plugin 0.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mogoodrich
mogoodrich merged commit d38884d into main Nov 6, 2026
1 check 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