Engine Internals
This page explains how gitquarry executes requests under the hood.Native Search Path
Native search is the default path. Pipeline:- resolve host
- resolve credential
- parse query and flags
- validate conflicts
- build one GitHub repository-search request
- fetch one result set
- apply post-filters like
updated-* - render output
- one repository search request
- native ordering
- no README fetching
- no local reranking
Discover Path
Discover mode is explicit:- resolve host and credential
- parse and validate flags
- build the seed search
- expand candidates using the selected depth
- dedupe by
full_name - enrich metadata used for scoring
- optionally fetch README content for a bounded top window
- compute rank mode
- apply limit
- render output
Discovery Depth
Supported values:quickbalanceddeep
quick
- one seed search only
- rerank only the returned pool
balanced
- seed search
- updated shard if the pool is too small
- one recent pushed shard if still needed
deep
- balanced behavior
- additional older pushed buckets
- star-bucket shards when the user did not already constrain stars
Candidate Pool Targets
Discover mode uses bounded target sizes:quick:max(25, limit * 3), cap100balanced:max(50, limit * 5), cap200deep:max(100, limit * 8), cap400
README Enrichment
--readme is enrichment-only.
It never changes retrieval mode by itself.
The engine:
- ranks using metadata first
- selects a bounded top candidate window
- fetches README content only for that window
- reranks again if needed
Rank Modes
Supported values:nativequeryactivityqualityblended
- non-native ranks require
--mode discover --mode discoverwithout--rankdefaults toblended--sortstill influences candidate retrieval, but not final order for non-native ranks
Blended Weights
Valid only with--rank blended:
--weight-query--weight-activity--weight-quality
- each weight must stay in
0.0..=3.0 - all-zero weight sets are invalid
HTTP Behavior
Gitquarry sends:Accept: application/vnd.github+jsonX-GitHub-Api-Version: 2026-03-10- a fixed
User-Agent
20 seconds.
Retry behavior:
- up to
3attempts total - retries on
403and429 - respects
retry-after - otherwise respects
x-ratelimit-reset - otherwise falls back to a small jittered delay
Non-Fatal Contributor Count Failures
Contributor count is intentionally tolerant. If GitHub says a repository is too large to list contributors through the API, gitquarry treats that as non-fatal and continues withcontributor_count = null.
That keeps inspect and discover enrichment from failing on large repositories.