feat(tcfeed): bound the search at 1k..10k stars - #115
Merged
Conversation
An upper bound, and the `a..b` form to express it.
Two traps live in that one string and both produce a *result* rather
than an error, so both are now written down beside the default:
starts:1000..10000 the qualifier is `stars`. Misspelt, GitHub
does not reject it - it becomes a free-text
search for the word and returns repositories
with no stars at all.
stars:>1000 stars:<10000 two range qualifiers on one field do not
AND. This form was tried first and returned
meilisearch at 58,955 stars, comfortably
outside the bound it appears to state.
The upper bound earns its place rather than just narrowing for its own
sake. Without it the band is dominated by monorepos that TOO_BIG_KB
throws away only after a clone has decided they are too large. Measured
over twenty results each: `stars:>1000` yields twelve scannable against
eight discarded, `stars:1000..10000` yields fourteen against six -
supabase at 2371MB, openclaw at 2458MB and metabase at 2122MB drop out
of the band entirely.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan67 finding(s) HIGH/CRITICAL: 11 | MEDIUM: 55 | LOW: 1
…and 17 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Adds an upper bound to the search source, and uses the
a..bform to express it.Two traps, both of which return results rather than errors
This is the part worth keeping.
stars:>1000 stars:<10000is the obvious way to write "between 1k and 10k" and it is wrong:Two range qualifiers on one field do not AND. The
a..bform does:The other trap, from the previous PR and still live: the qualifier is
stars, andstarts:is not rejected — GitHub treats it as a free-text search for the word and returns repositories with no stars at all. Both are now documented beside the default, because a query that is wrong in either direction looks like it worked.The upper bound earns its place
It is not just narrowing for its own sake. Without it the band is dominated by monorepos that
TOO_BIG_KBthrows away only after a clone has decided they are too large. Measured over twenty results each:stars:>1000stars:1000..10000supabase (2371MB), openclaw (2458MB) and metabase (2122MB) drop out of the band entirely rather than being cloned and rejected.
Verified
tsc --strictclean, and run end to end against the live API withTCFEED_MAX=0so nothing was cloned — 10 from search, all inside the band, merged and deduped with the 40 from reddit.🤖 Generated with Claude Code