Repository navigation
fix(cli): skip unusable crowd-sniff base URL candidates and query scoped npm packages individually - #5199
Merged
mergify[bot] merged 3 commits intoOct 23, 2026
Conversation
…ped npm packages individually ResolveBaseURL returned the first non-blank candidate, so an SDK-source match like http://127.0.0.1:${port} won and runCrowdSniff failed with "base URL must use HTTPS". It now skips candidates that are not https, are loopback/private/localhost, contain template placeholders, or do not parse. npm's bulk downloads endpoint rejects the whole request when it includes a scoped package, so scoped packages are now requested one at a time. Fixes #4244
Contributor
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 require-ready-label-and-ci
🟢 🚦 Auto-queueWhen all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
|
Contributor
[Medium impact] The PR appears safe to merge; no blocking issues remain. Summary
Reviews (3) · Last reviewed commit: "fix(cli): address lint findings in crowd..." · Reviewed by Greptile |
56 of 96 tasks
Contributor
Merge Queue Status
This pull request spent 25 minutes 13 seconds in the queue, including 24 minutes 26 seconds running CI. Required conditions to merge
|
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.
Intent
Crowd-sniff fails fatally ("base URL must use HTTPS") when the first base URL harvested from SDK source is a local/templated one such as http://127.0.0.1:${port}, and npm download-count lookups silently lose the whole batch when it contains a scoped package.
Issue: Fixes #4244
Approach
Scope
Primary area: crowd-sniff (internal/crowdsniff, internal/cli/crowd_sniff.go tests)
Why this belongs in this repo: both defects are in the Printing Press crowd-sniff source aggregation and apply to any API, not to one printed CLI.
Risk
Candidates that were previously accepted and then rejected later (http, loopback) now fall through to the next candidate or to the existing "could not determine base URL; use --base-url" error. Valid https candidates behave as before. Scoped npm packages cost one extra request each (bounded by the existing 128-package cap); download failures remain non-fatal.
Output Contract
N/A (no templates, generated files, or output shape changes)
Verification
Follow-up, out of scope here: separating the exit code for "found nothing" from "could not look".
AI / Automation Disclosure