Skip to content

feat(forkdiff): fork-diff page on GitHub Pages + CI gate that a rebase must update it - #19

Merged
ethenotethan merged 1 commit into
mainfrom
feat/forkdiff
Sep 14, 2026
Merged

ethenotethan merged 1 commit into
mainfrom
feat/forkdiff

Conversation

@ethenotethan

Copy link
Copy Markdown

What

Fork-diff page (op-geth style, via protolambda/forkdiff). fork.yaml at the root names the upstream commit this fork sits on and groups every file the fork changes into a described section:

.github/workflows/forkdiff-pages.yml renders it on every push to main and deploys to GitHub Pages → https://layr-labs.github.io/mlx/.

Enforcement gate. scripts/check_forkdiff.py runs on every PR and push (forkdiff-check.yml) and fails when:

Drift Check
rebase onto newer upstream base.hash ≠ git merge-base HEAD upstream/main, or not an ancestor of upstream main
new fork change nobody described a path in git diff base.hash..HEAD matches no section glob / global ignore
section describing code the fork no longer carries a glob matches nothing

It also renders the page, so a fork.yaml forkdiff rejects can't merge; the deploy workflow runs the same check first, so a stale page is never published. FORKDIFF.md documents the day-to-day and how to bump after a rebase; the README links the page.

Base

77a0c1e8ae16eb781a79e2b7134ba84b2ee7b597 = upstream main at 2026-08-14 (the merge-base). Fork diff against it: 166 files (172 including this PR's own), all described.

One-time admin step

GitHub Pages is not enabled on this repo and the workflow token cannot enable it (configure-pages enablement needs an admin token). Until an admin sets Settings → Pages → Source: GitHub Actions, the deploy workflow builds the page, keeps it as the forkdiff-page artifact and exits with a notice rather than failing. The existing documentation.yml is workflow_dispatch-only, so nothing contends for the Pages site.

Verification

  • Gate on this branch against a real upstream/main fetch: changed files 172 described 172, exit 0.
  • Page rendered locally with go run github.com/protolambda/forkdiff@v0.1.1: 1.3 MB, all sections present, nothing unmatched.
  • This PR exercises the CI path itself: Fork Diff Check fetches upstream, runs the gate and renders the page as an artifact.

🤖 Generated with Claude Code

…staying true

Layr-Labs/mlx is a fork of ml-explore/mlx; nothing recorded what it changes
or which upstream commit it sits on. Adopt protolambda/forkdiff the way
op-geth does for go-ethereum: `fork.yaml` names the upstream base
(77a0c1e, upstream main 2026-08-14) and groups every changed file into a
described section — Metal eval use-after-free fix, sorted expert-tile
quantized matmul (E=128/E=256) with diagnostics, GPT-OSS MXFP4 masked-tail
decode, coherent allocator accounting, FP32 SDPA partials, declared-mutable
custom-kernel inputs, cross-thread compile-cache cleanup — plus one honest
section for the 131 files that are byte-identical to upstream v0.32.2 and
only look like fork changes because PR #10 applied them instead of merging.
`forkdiff-pages.yml` renders and deploys the page to GitHub Pages on push to
main (skipping the deploy with a notice until an admin enables Pages).

`scripts/check_forkdiff.py` runs on every PR and push (`forkdiff-check.yml`)
and fails when base.hash is not merge-base(HEAD, upstream/main) — which is
exactly what a rebase changes — or when a changed file is undescribed, or a
section names files the fork no longer changes. The same check runs before
publishing so a stale page is never served.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ethenotethan
ethenotethan merged commit 70d63a1 into main Sep 14, 2026
5 checks passed
davidtai added a commit that referenced this pull request Oct 5, 2026
The fork-diff gate from main (#19) failed after the merge: softmax.h,
steel_gemm_fused.h and steel_gemm_fused_nax.h were not described by any
section. Add one section for this PR that lists every file it changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants