Skip to content

Upgrade member_not_found integrity check from warning to error by default#1608

Open
jordanpadams wants to merge 3 commits into
mainfrom
issues/1601-member-not-found-error
Open

Upgrade member_not_found integrity check from warning to error by default#1608
jordanpadams wants to merge 3 commits into
mainfrom
issues/1601-member-not-found-error

Conversation

@jordanpadams
Copy link
Copy Markdown
Member

🗒️ Summary

  • Upgrades warning.integrity.member_not_found to error.integrity.member_not_found (ERROR severity) by default in both BundleReferentialIntegrityRule and CollectionReferentialIntegrityRule
  • Adds new CLI flag --allow-unlisted-members (and config key validate.allowUnlistedMembers) that downgrades the condition back to a WARNING for users validating partial/accumulating bundles where prior-release products are intentionally absent
  • Updates user documentation with guidance on when to use --allow-unlisted-members

🤖 AI Assistance: This PR was substantially developed with Claude Code assistance (~90% of changes).

⚙️ Test Data and/or Report

The behavior change can be verified manually:

  • Run validate --rule pds4.bundle against a bundle where a collection inventory references products not present in the target → previously produced WARNING [warning.integrity.member_not_found], now produces ERROR [error.integrity.member_not_found]
  • Same run with --allow-unlisted-members → restores the original WARNING [warning.integrity.member_not_found] behavior

Automated test coverage should be added as a follow-on (test data scaffolding for github1601/).

♻️ Related Issues

Fixes #1601

Background context:

🤓 Reviewer Checklist

  • Documentation has been updated (operate/index.md — new --allow-unlisted-members section added)
  • Security — no security implications
  • Tests — behavior change verified manually; automated test data to be added
  • MaintenanceFlagsUtil.initialize() resets the new flag to false, ensuring clean state between runs

Add --allow-unlisted-members flag to downgrade back to warning for
accumulating/incremental bundle validation use cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jordanpadams jordanpadams requested a review from a team as a code owner May 19, 2026 07:28
@jordanpadams jordanpadams added the bug Something isn't working label May 19, 2026
jordanpadams and others added 2 commits May 19, 2026 01:39
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lt ERROR behavior

- Add src/test/resources/features/4.2.x.feature with two scenarios:
  subtest 1: default run expects error.integrity.member_not_found=1
  subtest 2: with --skip-strict-collection-membership expects warning.integrity.member_not_found=1
- Add minimal PDS4 bundle test data in src/test/resources/github1601/ to trigger
  member_not_found (collection inventory references a non-existent primary member)
- Update pre.3.6.x.feature: add --skip-strict-collection-membership to four existing
  tests (github408/1, github401/1, github368/1, github6/2) that expected the old
  WARNING behavior, so they continue to pass with the new ERROR default

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants