Skip to content

OpenConceptLab/ocl_issues#3003 | Concept- and mapping-version references are information in expansion health, not a problem - #1106

Merged
snyaggarwal merged 2 commits into
masterfrom
issues-3003-concept-version-references-information
Dec 2, 2026
Merged

snyaggarwal merged 2 commits into
masterfrom
issues-3003-concept-version-references-information

Conversation

@snyaggarwal

@snyaggarwal snyaggarwal commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Ticket: OpenConceptLab/ocl_issues#3003 · Epic: OpenConceptLab/ocl_issues#2942 · Decision: OQ-39 on OpenConceptLab/ocl_online#549

References that name a concept or mapping version count as information in expansion health. They no longer make an expansion unhealthy.

What changes

  • State: resource_versioned_references is still listed in reasons, with its count, but it doesn't set the state. An expansion with only that reason is healthy, or head_resolved if a repository resolves to HEAD.
  • Only HEAD holds it: if a reference names a concept or mapping version that HEAD holds and no release does, the expansion is head_resolved, and its repository is in head_resolved_repositories.
  • What each reader sees: get_health_for follows the same rule when it hides value sets from a reader.
  • rules_version is 3, so backfill_expansion_health picks up health stored under the old rule.

What doesn't change

  • Every other reason is still a problem. A reference to an old concept version that no release or HEAD holds still gives interim_resource_versions.
  • No members, references or expansions change.

After deploying

Run backfill_expansion_health --all --apply to recompute stored health. Without --apply it is a dry run. Until it runs, health stored earlier keeps its old state: the nightly recheck doesn't look at the rules version.

Tests

  • A resource-versioned reference alone gives healthy; with an interim member it's still unhealthy.
  • A reader who can't view a value set, with only this reason left, sees healthy or head_resolved.
  • A named version only HEAD holds gives head_resolved, and healthy once a release holds it.
  • tests_health, tests_health_backfill, tests_deleted_locks and tests_version_lists pass (205). pylint is clean on the changed files. The full suite wasn't run locally.

Related

OpenConceptLab/oclweb3#113 shows the chip as neutral. It doesn't depend on deploy order.

🤖 Generated with Claude Code

…ces are information in expansion health, not a problem

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyaggarwal

snyaggarwal commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Review at 22155dc: the code does what it says; one decision is needed before merge. Update: @snyaggarwal decided 1 (head_resolved). 1, 2 and the rules_version part of 3 are fixed in 6f22d82 and the description, so only nits are left: approve with nits. The fix hasn't had a second review.

An independent pass over the diff. I checked the findings below against the code.

# Severity Finding
1 decision A pinned version that only HEAD holds now reads healthy. Say a reference names a concept version that no release holds. Its member is classed head, which is in no reason, and get_head_resolved_repositories skips references that name a concept or mapping version. resource_versioned_references used to hide this. The same member from a reference without a version gives head_resolved. Should this be head_resolved, or is healthy right because a pinned version doesn't move with HEAD? No test covers it. Fixed in 6f22d82: it's head_resolved, with a test.
2 nit The backfill must be run with --all --apply. The nightly recheck only takes rows whose health isn't current, so it never picks up older rules. Please say --apply in the description, as the default is a dry run. Fixed in the description.
3 nit Test gaps. Nothing covers a pinned reference beside a HEAD-resolved one through compute(). The rules_version asserts compare the constant with itself, so a missed bump would pass. Partly fixed in 6f22d82: the version assert is a literal. A pinned reference beside a HEAD-resolved one is still untested.
4 nit OpenConceptLab/ocl_issues#2942 still says healthy means no references to a concept or mapping version.

Fine: every place that sets the state, the order of the states, the other reasons, staleness, the version list (read live from the expansion), and no new queries. tests_health, tests_health_backfill, tests_deleted_locks and tests_version_lists pass (204 at 22155dc, 205 at 6f22d82). Pylint and Tests passed in CI at 22155dc.

…ence names that only HEAD holds makes the expansion head_resolved

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyaggarwal
snyaggarwal merged commit f639acf into master Dec 2, 2026
3 checks passed
@snyaggarwal
snyaggarwal deleted the issues-3003-concept-version-references-information branch December 2, 2026 12:58
paynejd added a commit that referenced this pull request Dec 2, 2026
Brings in the squash merge of #1089, whose original
commits this branch already holds, and #1109 and
#1106. The conflicts are where
#1109 changed #1089's lines:
models.py keeps this branch's side, and the toggle and its test are
master's, so REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every environment. The
squash matches the original commits byte for byte, and this branch's diff
against master is the same as before. No change to this branch's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
Brings in #1089, #1109 and
#1106. The one conflict is the constants import in
core/collections/models.py, where both sides add a name: both are kept. The
toggles are master's, so REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment. No change to this branch's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…into fhir-452-b-apart

Takes #1087's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…o fhir-452-c-storage

Takes #1090's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…nto fhir-452-b-imports

Takes #1103's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. The one conflict is the constants import in
core/collections/models.py, where both sides add names: all are kept. No
change to this branch's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…nto fhir-452-b-codes

Takes #1088's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…o fhir-452-c-core

Takes #1094's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…nto fhir-452-b-codes

Takes #1091's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. The one conflict is an import line in
core/collections/models.py, next to one this branch changed: this branch's
is kept. No change to this branch's own code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
… fhir-452-b9-valueset

Takes #1104's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
… into fhir-452-capabilities

Takes #1102's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…d into fhir-452-stored-ops

Takes #1083's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…into fhir-452-b-engine

Takes #1084's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…to fhir-452-b-workspace

Takes #1095's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
… into fhir-452-b-expand

Takes #1096's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…to fhir-452-b-validate

Takes #1097's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…into fhir-452-b-ops

Takes #1098's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
paynejd added a commit that referenced this pull request Dec 2, 2026
…fhir-452-c-fhir

Takes #1099's new head, which brings in master
(#1089, #1109 and
#1106): REFERENCE_SEARCH_OPTIONS_TOGGLE is on in every
environment, as on master. Merged cleanly; no change to this branch's own
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qVQviVc1p6MQwqUUed
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