Skip to content

superseded flag does not correctly identify LIDVIDs superseded by versions already in registry #493

Description

@jordanpadams

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

The superseded column in the missing products CSVs is computed by comparing versions only among the missing LIDVIDs themselves. The OpenSearch query filters on found_in_registry: false before returning results, so annotate_version_status never sees LIDVIDs that are already present in the registry.

As a result, a missing LIDVID (e.g. urn:nasa:pds:foo::1.0) is incorrectly labeled superseded=false even when a newer version (e.g. urn:nasa:pds:foo::2.0) already exists in the registry.

🕵️ Expected behavior

The superseded flag should reflect whether a newer version of the same LID exists anywhere (in the registry or among the missing products). A missing LIDVID should be marked superseded=true if any higher-versioned LIDVID for the same LID is present in the registry.

Correct approach: query all LIDVIDs for a given product type (regardless of found_in_registry) to determine version ordering, then filter the output rows to only those where found_in_registry=false.

📜 To Reproduce

  1. Identify a LID that has an older version missing from the registry and a newer version already loaded.
  2. Run scripts/generate_registry_status_reports.py --no-commit
  3. Check the superseded column for the older LIDVID — it will show false instead of true.

🖥 Environment Info

  • Script: scripts/generate_registry_status_reports.py
  • Query files: conf/status/missing_bundles_per_node.json, conf/status/missing_collections_per_node.json

📚 Version of Software Used

Current develop branch

🩺 Test Data / Additional context

The fix requires:

  1. Removing the found_in_registry: false filter from the missing products queries (or adding a separate all-LIDVIDs query for each type)
  2. Running annotate_version_status across the full result set
  3. Filtering output rows to only those where found_in_registry=false before writing CSVs

For Internal Dev Team To Complete

⚙️ Engineering Details

🎉 Integration & Test

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
ToDo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions