Repository navigation
add more tests, change one index case - #597
Merged
Merged
Conversation
ExtUtils::MakeMaker writes "no_index: { directory: [t, inc] }" into META
by default, so nearly every real upload has a no_index entry. Our fakes
didn't, which meant PAUSE::pmfile::filter_ppps always took its early "no
no_index, keep everything" exit, and its real logic went untested.
upload_author_fake now adds that default. A test can pass its own
no_index, or no_index => undef to get none.
Co-Authored-By: Claude <[email protected]>
These dists have no "provides", so they're indexed by scanning files, which is where PAUSE::pmfile::filter_ppps applies no_index rules. Nothing tested those rules before. Co-Authored-By: Claude <[email protected]>
These were clobbering the caller's $_. Sometimes, the caller had $_ aliased to a r/o value, which led to a crash. So: localize but also add a test that a readonly $_ doesn't break the indexer generally. Co-Authored-By: Claude <[email protected]>
PAUSE has skipped dists whose META says distribution_type is "script" since 2007. This just provides test coverage. Co-Authored-By: Claude <[email protected]>
Trial releases, files that aren't dists, and perl-like tarballs from non-pumpkings are never indexed. These tests record that none of them currently sends the uploader a report. Co-Authored-By: Claude <[email protected]>
Log::Dispatchouli's to_file argument is going away, but we use it both for showing the logfile to the public *and* for testing. Just reimplement it in PAUSE::Logger::_Logger, easy.
When a dist was skipped for a reason without its own special text, like an unstable release_status, mail_summary printed the reason, then fell through to its "nothing was indexed" cases. So the report went on to say that no indexable packages were found, or that META said the dist provided no packages, neither of which was why it was skipped. Now, when there's a skip reason, the report just gives that. Co-Authored-By: Claude <[email protected]>
Previously, a malformed package name in "provides" was skipped when its package came up for indexing, and the dist's other packages were indexed. If "provides" is wrong about package names, though, we have no reason to trust the rest of it, and indexing part of a dist is worse than indexing none of it. Now we check every name in "provides" before indexing anything, and reject the whole dist with a failure report if any is malformed. The name check moves into PAUSE::package->name_is_insane so it can be used without a package object. This is a change in behavior. The new t/bad-package-names.t checks that such a dist is rejected, and that other dists in the same run are still indexed. Co-Authored-By: Claude <[email protected]>
rspier
approved these changes
Oct 12, 2026
rspier
reviewed
Oct 12, 2026
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.
This is adding tests for things I touch in #405 so that it can be reviewed with more confidence.
It also changes one thing:
provideshas malformed package names, the whole dist is taken to be broken and rejectedprovidesis there to say "I know better than the indexer". If you fail too hard at the fundamentals, we just ask you to work it out yourself.