Skip to content

Record what each repo's own CI said of its Mojo version moves - #270

Open
winding-lines wants to merge 3 commits into
mainfrom
migration-ci
Open

winding-lines wants to merge 3 commits into
mainfrom
migration-ci

Conversation

@winding-lines

Copy link
Copy Markdown
Contributor

The census knows when a repo moved to another Mojo version (mojo.migrations), but not whether the move worked. Many repos already answer that themselves: their own GitHub Actions ran on the commit that moved the version. This PR records that answer. It builds nothing and costs one GitHub API request per commit.

What it adds

  • pipelines/mojo_ci.mojo, daily at 09:00 UTC. For each mojo_version migration it asks GET /repos/{repo}/actions/runs?head_sha={sha} and writes one row per commit to the new mojo.migration_ci table.
  • A state per commit (src/ci.mojo): failed if any of the repo's workflows failed, else running, else passed, else none (no workflow ran). gone and blocked are for a repo or commit GitHub no longer serves. Runs GitHub starts itself, such as CodeQL's default setup (path under dynamic/), are not counted.
  • Repo page: a CI column in the Migrations table, linking to the commit's checks. The column appears only when the repo has an answer.
  • /migrations: a "What their CI said" table per Mojo version: repos moved, how many ran CI, passed, failed, and which failed. A repo counts once per version, by its latest commit with an answer.
  • /api/repos/<owner>/<name>: each migration gains "ci": {"state", "runs", "passed", "failed", "checked_at"} or null.

Which commits it asks about

Commits of the last 270 days without a settled answer, newest first, at most 1,500 a run (MOJO_CI_MAX_REQUESTS). An answer is settled three days after the commit, once nothing is still running. A request that fails for another reason writes no row and is asked again the next day.

GitHub drops run records after some months: bgreni/EmberJson's runs from before about mid-January 2026 are no longer listed. So older migrations get none, and the history can't be filled in later.

How much it covers

Measured with the same rules against the live census on 2026-11-30, over 227 repos that use pixi and are on Mojo 1.2 or 1.3 (one owner's 261 bulk repos left out):

Repos Count CI ran on the latest move Passed Failed
All 227 127 (56%) 109 18
Used by another owner 39 34 (87%) 32 2
5 stars or more 49 32 (65%)

Checked

  • pixi run test: 42 test files, 286 tests, none failed. tests/test_ci.mojo is new (5 tests), and tests/test_console_routes.mojo gains 2.
  • pixi run build, pixi run test-register (registers mojo_ci under both morca.toml and morca.dev.toml) and pixi run test-upgrade.
  • The pipeline against GitHub, on a scratch lake seeded with the 177 migrations of 5 repos: a first run capped at 12 wrote 12 rows, a second wrote the other 31, and a third found nothing to ask and committed nothing. 43 is the number of mojo_version migrations within 270 days.

Not checked

The site against a real lake: the pages are covered by route tests only. Beta will show them once mojo_ci has run.

Deploying

No step is needed. mojo_ci uses the GitHub token secret that mojo_stats and mojo_issues use. The first backfill is about 2,700 commits, so the table fills over the first two daily runs.

Not in this PR

  • The MCP get_repo tool does not carry ci yet.
  • There is no /api endpoint for the per-version table.

🤖 Generated with Claude Code

https://claude.ai/code/session_017TycsxF3PkSX49fnv7cSZd

winding-lines and others added 3 commits November 30, 2026 17:25
A new daily pipeline, mojo_ci (09:00 UTC), asks GitHub for the workflow
runs on each commit that moved a repo to another Mojo version and keeps
the answer in mojo.migration_ci: passed, failed, running, none, gone or
blocked, with the counts of the repo's own workflows. Runs GitHub starts
itself (paths under dynamic/) are left out.

It asks about commits of the last 270 days that have no settled answer
yet, newest first, at most 1,500 a run, and stops asking about a commit
three days after it, once its runs have finished. GitHub drops run
records after some months, so older commits have nothing to give.

The site shows it in three places: a CI column beside each migration on
a repo page, a "What their CI said" table per Mojo version on
/migrations, and a "ci" object on each migration in
/api/repos/<owner>/<name>.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TycsxF3PkSX49fnv7cSZd
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TycsxF3PkSX49fnv7cSZd
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017TycsxF3PkSX49fnv7cSZd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant