Skip to content

feat(forkdiff): describe the whole fork, gate the analysis in CI, deploy on every push - #148

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

This repo already had a forkdiff page, but the analysis had drifted the way fork-diff pages do: fork.yaml pinned fork.hash to a May commit (8d1cbcd), described 6 of the 825 files this fork changes relative to upstream, carried stale ignores (.git, *.sum), and its pages.yml only re-rendered when fork.yaml itself changed. Nothing checked any of it.

Rewritten fork.yaml (op-geth style, matching the harness setup): the fork ref is refs/heads/main (not a hash pin), base.hash is the real merge-base with upstream — 7e2b7107 (upstream main, 2026-04-17; the fork never rebased, upstream fixes were selectively ported) — and every one of the 829 changed files is described under:

  • ContinuousBatchingV2 engine — core runtime/scheduler/sampling/output · paged KV backend · prefix checkpoints · MTP (engine side) · engine v2 contract docs · engine tests
  • Core library changes (MLXLMCommon) · Tool calling and parsers
  • Models — Gemma 4 (dense, MoE, MTP) · GPT-OSS 20B · Qwen 3.5/3.6/3.8 (hybrid DeltaNet MoE, MTP) · Nemotron-H 3.5 / DeepSeek V4 / Laguna / LFM2-MoE · quantized MoE kernels and SwitchGLU
  • Vision-language models · Selective upstream port (PR feat: inherit upstream SSM/VLM/KV-quant/tools/MoE/Gemma4 fixes (selective port) #50 — stated honestly as cherry-picked/hand-ported upstream work)
  • OpenAI-compatible server · Benchmarks and measurement · Design plans and specs · Build and dependencies · Fork tooling

Enforcement gate. scripts/check_forkdiff.py runs on every PR and push to main (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.

Deploy. pages.yml → forkdiff-pages.yml: runs the gate first, triggers on every push to main (not just fork.yaml edits), renders with go run github.com/protolambda/forkdiff@v0.1.1, and deploys to https://layr-labs.github.io/mlx-swift-lm/.

One-time admin step

GitHub Pages is not enabled on this repo (has_pages: false) and the workflow token cannot enable it. A repo admin needs to set Settings → Pages → Source: GitHub Actions once. Until then the deploy workflow builds the page, keeps it as the forkdiff-page run artifact, and exits with a notice rather than failing.

Verification

  • Gate on this branch against fetched upstream main: changed files 829 described 829, exit 0.
  • Page rendered locally: 28.7 MB, all 24 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.

Docs: FORKDIFF.md (day-to-day, what to do after a rebase); README links the page.

🤖 Generated with Claude Code

… on every push

The fork-diff page had gone stale in the way fork-diff pages do: fork.yaml
pinned `fork.hash` to a May commit (8d1cbcd) and described 6 of the 825
files this fork changes, its pages workflow only re-rendered when
fork.yaml itself changed, and its global ignores (`.git`, `*.sum`) matched
nothing. Nothing checked any of that.

Rewrite fork.yaml as an op-geth style overview of the fork as it is:
ContinuousBatchingV2 (core runtime/scheduler, paged KV backend, prefix
checkpoints, engine-side MTP, contract docs, tests), core library changes,
tool calling and parsers, models (Gemma 4, GPT-OSS, Qwen 3.5/3.6/3.8,
Nemotron-H 3.5 / DeepSeek V4 / Laguna / LFM2-MoE, quantized MoE kernels),
VLMs, the selective upstream port, the OpenAI-compatible server,
benchmarks and measurement, plans and specs, build and dependencies. The
fork ref is `refs/heads/main`, not a hash pin; base.hash stays the real
merge-base with upstream (7e2b710, 2026-04-17 — the fork never rebased).

Add `scripts/check_forkdiff.py` and run it on every PR and push
(forkdiff-check.yml): base.hash must equal merge-base(HEAD, upstream/main),
every changed file must be described by a section, and no section may
name files the fork no longer changes. Replace pages.yml with
forkdiff-pages.yml, which runs the same gate before rendering, deploys on
every push to main, and — since Pages is not yet enabled on this repo and
the workflow token cannot enable it — keeps the page as an artifact with a
notice instead of failing until an admin turns Pages on.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ethenotethan
ethenotethan merged commit a84225c into main Sep 14, 2026
4 checks passed
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