Skip to content

warning.integrity.member_not_found should be an ERROR by default, with new flag to downgrade to warning #1601

@jordanpadams

Description

@jordanpadams

Checked for duplicates

Yes - Related to #308 (which originally set this as a warning) and #1156 (accumulating bundles use case)

🐛 Describe the bug

When a collection inventory lists member products that cannot be found within the validating target, validate reports warning.integrity.member_not_found — a WARNING. This is incorrect default behavior.

A collection inventory explicitly declares its primary member products. Those products must be present within the target being validated. A missing member is a data integrity failure, not merely advisory. The warning severity was originally chosen in #308 to accommodate cross-bundle and accumulating bundle scenarios, but that accommodation should require an explicit user opt-in, not be the default.

🕵️ Expected behavior

By default, member_not_found should be reported as an ERROR.

A new CLI flag (e.g., --allow-unlisted-members) should be introduced to downgrade this condition back to a WARNING for users who are intentionally validating partial/incremental bundles where prior-release products are legitimately absent. This preserves the use cases documented in #308 and #1156 without masking real data errors for everyone else.

Proposed behavior summary:

  • Default (no flag): member_not_found → ERROR
  • With --allow-unlisted-members: member_not_found → WARNING (for accumulating/incremental bundle use cases)

📜 To Reproduce

  1. Create or obtain a bundle where a collection inventory references one or more member products that are not present in the local target directory
  2. Run: validate --rule pds4.bundle <path/to/bundle>
  3. Observe that missing members are reported as WARNING [warning.integrity.member_not_found] instead of ERROR

Example output that should be an ERROR:

PASS: collection_context_inventory.xml (urn:isro:isda:ch2_cho:context::1.0)
    WARNING  [warning.integrity.member_not_found]   The member 'urn:isro:isda:ch2_cho:context:mission::1.0' could not be found in any product within the given target.
    WARNING  [warning.integrity.member_not_found]   The member 'urn:isro:isda:ch2_cho:context:instrument_host_spacecraft::1.0' could not be found in any product within the given target.

🖥 Environment Info

  • Affects all current validate versions
  • Reproduced with a PDS4 bundle using pds4.bundle validation rule

📚 Version of Software Used

All versions (behavior inherited from original #308 implementation)

🩺 Test Data / Additional context

Prior art and rationale for original warning level:

The fix requires:

  1. Changing ProblemType.MEMBER_NOT_FOUND severity from WARNING to ERROR (or introducing a parallel ERROR type)
  2. Adding a new CLI flag (e.g., --allow-unlisted-members) that restores WARNING behavior when set
  3. Updating documentation and help text to describe the flag and its use case

🦄 Related requirements


For Internal Dev Team To Complete

⚙️ Engineering Details

🎉 Integration & Test

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

ToDo

Status

Review/QA

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions