Fix cleanly-passing products not counted, triggering false no_products_found error#1558
Merged
jordanpadams merged 1 commit intomainfrom Apr 1, 2026
Merged
Conversation
…s_found error In Report.java, numPassedProds was only incremented when problems.size() - ignoreFromTotalCounts > 0. A product validating with zero errors/warnings has all its problems classified as GENERAL/EXECUTION (incrementing ignoreFromTotalCounts), so the net count was <= 0 and the product was never tallied. getTotalProducts() returned 0, causing ValidateLauncher to fire the false no_products_found error. Remove the spurious problems count condition so any non-directory target that passes is correctly counted. Fixes #1557 Refs #1548, #1458 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
Author
|
Confirmed locally that this works for valid files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Summary
Fix
no_products_founderror incorrectly triggered when a product validates cleanly (zero errors, zero warnings).In
Report.java,numPassedProdswas only incremented whenproblems.size() - ignoreFromTotalCounts > 0. A cleanly-passing product has all its problems classified asGENERAL/EXECUTIONcategory (which incrementignoreFromTotalCounts), so the net count evaluated to<= 0and the product was never tallied.getTotalProducts()then returned 0, causingValidateLauncherto fire the falseno_products_founderror even though the product appeared asPASSin the report.Fix: Remove the spurious
problems.size() - ignoreFromTotalCounts > 0guard so any non-directory target that passes validation is correctly counted.🤖 AI Assistance Disclosure
Estimated % of code influenced by AI: 50%
⚙️ Test Data and/or Report
Manually verified with a valid PDS4 label and user-supplied schema/schematron:
Before fix:
After fix:
♻️ Related Issues
Fixes #1557
Refs #1548, #1458
🤓 Reviewer Checklist
Reviewers: Please verify the following before approving this pull request.
Documentation and PR Content
Security & Quality
Testing & Validation
Maintenance