Repository navigation
Leave incidental Mojo repos out of the rankings by default - #268
Merged
Merged
Conversation
A repo is incidental Mojo when it entered the census only through a pushed commit that changed a .mojo file (found_by's check is `push` and GitHub's search didn't give it) and its last commit has fewer than 50 lines of Mojo (INCIDENTAL_LINES in src/incidental.mojo). The Repos table, the Overview's numbers and top tables and MCP list_repos leave them out unless asked (?incidental=1, incidental: true); their pages, get_repo and /api/repos keep them and say they are incidental and why. A data check keeps them out of the top tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV
A `name` or `description` signal in found_by means the repository's name or description mentions Mojo, as rd4com/mojo-learning's does: it is a Mojo repository however little code it has, so it is no longer incidental. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV
Merged
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.
The rule
A repo counts as incidental Mojo when all of these hold:
found_byafter/, thehowofdetect.verify) ispush.found_bybefore/) include neithersearchnornamenordescription. GitHub's search path recordssearch / language, because a repo the search gives islanguage:Mojoandrepo_verdictaccepts it bylanguage, so it is never push-only. Anameordescriptionsignal means the repo's name or description says Mojo, so it is a Mojo repo however little code it has yet. A repo accepted bylanguageormanifest ...is never incidental, however small.INCIDENTAL_LINESinsrc/incidental.mojo). A repo whose history isn't read yet (0 commits) isn't marked, since its lines aren't known.howand the signals were already in the console:mojo.repos.found_byis inLibrary.found_by, so this needs no new column, no backfill and no deploy step.The counts (production's data)
These are production's numbers, from the public
https://mojourney.dev/api/reposon 2026-11-29 (1,965 repos). It hasfound_by,mojo_linesandstarsfor every repo, so beta wasn't needed.name/descriptionexception these would be 30, 39 and 52.push(127 had a push signal at all; the other 49 were accepted bylanguageor a manifest). None of the 78 has thesearchsignal.language(127) or a manifest (32) have fewer than 50 lines. The rule leaves these unmarked on purpose.At 50 lines, the
name/descriptionexception un-marks 12 repos: rd4com/mojo-learning (135 stars, 0 lines), jpaguilarc99/mojo-modular, llinauer/mojoGPT (35 lines), Brianoksoftware/learning-mojo (31), MartinStuwe/mojo_sklearn_logistic_regression, MartinStuwe/mojo_entropy, MartinStuwe/mojo_input_name, MartinStuwe/mojo_hello_world, tamakiii-sandbox/hello-mojo, K0210/mojo_test, rurumimic/mojo and faisalrdevv/mojo.The 10 most starred that are still marked at threshold 50 (all
push / push):All four repos named in the issue entered by
push. mouredev/retos-programacion-2023 and arjuncvinod/Hello-World-in-Different-Languages are multi-language collections with a Mojo file or two, and they stay marked. modular/max-agentic-cookbook stays marked: it has nonameordescriptionsignal and has no.mojofile at its last commit. rd4com/mojo-learning (name,description,push / push) is no longer marked.What it gets wrong
mojo) is still marked: topics aren't a detection signal, and neither its name nor its description triggered one.What is left out by default, and how to include it
/repos, under every sort and filter: there is a new "Incidental Mojo: left out / included (N)" row in the filters, and?incidental=1includes them. The lead line says "N incidental Mojo repos left out" and links to the other view. Every column-header and filter link keeps the choice, just asestimate=1is kept./repos?incidental=1. Its JSON (/api/overview) and the MCPoverviewtool addincidental_repos_left_out.list_reposgainsincidental(boolean, default false),incidental_left_outin its answer andincidentalon each result.risingnever has them.These still have them:
/repos/<owner>/<name>says "Counted as incidental Mojo." and why.get_repoaddsfound_by,incidentalandincidental_why./search,search_reposandsimilar_reposstill find them./api/reposstays the complete table, with"incidental": true|falseon each repo. It is a dump rather than a ranking, and it is what this count was made from.Totals
I excluded incidental repos from the totals rather than leaving them alone.
Builder.finishtakes the names to skip and leaves them out of every total, bucket and series. A small per-repo, per-month commit count (cell_commits) lets it take their commits out of the commits-per-month curve. The Overview's repos then equal the Repos table's default count. The Migrations page (mojo.migrations) and/llms.txt's repo count are unchanged.Data checks
RepoFactshasincidentalandTopshas Most stars and the Overview's two counts. A new check,incidental_left_out, fails a build if an incidental repo is in Rising, Most stars, Most active or Most depended on, or if the Overview's repos plus the incidental repos it left out don't equal the repos. The existing checks still compare every repo, incidental ones included, against its page.Tests
tests/test_incidental.mojocovers the rule:how, the signals, push-only and thesearch,nameanddescriptionsignals (each and together), the threshold edge (49 and 50),languageand manifest repos, unread histories, the sentence, and the top-table keys.tests/test_overview.mojocoversfinishwith a skipped repo (totals, buckets, the commits and lines series) andselect_reposand the URLs with and withoutincidental=1.tests/test_checks.mojocovers the new check: tops and counts that pass, and ones that fail.tests/test_mcp.mojocoverslist_reposwith and withoutincidental, andget_repo,search_repos,overviewand tools/list.tests/test_console_routes.mojocovers/reposwith and without?incidental=1, the repo page,/api/repos,/and/api/overview.pixi run build-consoleandpixi run testpass on macOS arm64.🤖 Generated with Claude Code
https://claude.ai/code/session_017TycsyUqdnuDeZrYc3z6wV