I have ~90 blog posts about this migration and 21 open PRs (now mostly closed). The blog map organizes posts by narrative arc. The PR audit sorts them by triage category. Neither one answers the question I keep asking myself:
“What did I write about X, and what code exists for it?”
This post is the lookup table. Three dimensions — topic, blog post, PR — cross-referenced so you can start from any direction and find the other two. Not every post has a PR. Not every PR has a post. Some PRs map to five posts. The relationships are messy because the work was messy.
How to Use This
- Starting from a topic? Go to Topic View — each section lists the relevant posts and PRs.
- Starting from a PR? Go to PR Index — sorted by number, with topic and blog links.
- Looking for posts with no PR? Orphans at the bottom.
Topic View
Torch in Bazel
The four-month saga of getting torch into Bazel’s hermetic sandbox. Three architecture options, one winner.
| Post | PR(s) | Notes |
|---|---|---|
| 62% of Our Packages Are Blocked by torch | — | Problem statement. No code. |
| How Bazel Resolves Python Deps (and Why torch Breaks Everything) | — | Technical root cause. No code. |
| What Does Success Actually Look Like? | — | Decision framework for Options A/B/C. |
| Three Ways to Smuggle torch into Bazel | — | Overview before committing. Superseded by the per-option posts. |
| The Override That Overrode Everything | — | The uv.override_requirement disaster. Precursor to Option B. |
| Option A: The Simplest Option That Wasn’t | #21167 | Linux CPU torch wheels. Lost the bake-off. PR closed. |
| Option B and the Five Obstacles | #21168 | uv.override_requirement. Transitive deps killed it. PR closed. |
| Making Bazel See System Torch Inside Docker | #21169 | Option C — the winner. System Python toolchain in Docker. Merged Mar 3. |
| Why Bazel Torch Tests Need Two Python Interpreters | — | Explainer of a side effect of Option C. |
| The py_torch_test Pattern | — | Reference guide for the final pattern. |
| Test Classification: The Real Torch CI Problem | — | Follow-up: sorting tests into the right CI job. |
Dead experiment PRs (pre-date Options A/B/C):
| PR | What | Status |
|---|---|---|
| #19185 | Platform select for torch | Closed — predates all three options |
| #20793 | Smoke-test @pypi//torch on macOS | Closed — Option B precursor |
| #20799 | Make torch optional in mai_config (Path A) | Closed — only unblocked 1 package |
Torch Package Migration
After Option C landed, actually migrating the torch-dependent packages.
| Post | PR(s) | Notes |
|---|---|---|
| Migrating mai_config: The First Torch Package | #23401 (Zoe) → #23994 (Ryan, merged) | My version superseded. Ryan merged mai_config + mai_logger + audio_segmentation. |
| 6 Packages, 10 Bumps, 9 Pushes | #22601 | Batch migration of 6 torch packages. Status TBD. |
| Migrating Torch Packages to Bazel: The Complete Decision Tree | — | The canonical playbook. Reference doc, no single PR. |
| Dependency Graph Cascade Analysis | — | Wave analysis of what torch unblocking cascades into. |
| Presenting PR #22703 to the Team | — | Communication prep. References PR #22703 by title only. |
| — | #22575 (Zoe) → #23296 (Ryan, merged) | Remove torch from excluded packages. No blog post. |
| — | #20901 | Batch migrate 22 packages. Stale. No blog post. |
CC Toolchain & Native Code
Python packages wrapping C++, Cython, and CUDA. How to give Bazel a compiler.
| Post | PR(s) | Notes |
|---|---|---|
Everything Below import torch |
— | The 38KB explainer. Conceptual, no code. |
| Why Bazel Can’t Compile Your Python C Extensions | — | Problem statement. |
| Stocking the Kitchen: A Hermetic C++ Toolchain | #22578 | My hermetic CC toolchain. Superseded by Ryan’s simpler approach. |
I Was Wrong About use_default_shell_env |
#22578 (Zoe) → #21967 (Ryan, merged) | The sequel. Ryan’s version was simpler and shipped first. |
| Teaching Bazel to See Non-Python Dependencies | #24027 | filegroup targets for non-Python deps. Experiment sprint. |
| Native Code in a Python Monorepo | — | Synthesis post tying the CC arc together. |
| Two PRs, One Compiler, and a Package That Didn’t Need Either | #21169, #21967, #22578, #23478 | The connective tissue post. Maps how CC + CUDA + torch PRs intersect. |
CUDA & GPU Packages
CUDA-specific migration and GPU test infrastructure.
| Post | PR(s) | Notes |
|---|---|---|
| Cracking the Biggest Bazel Blocker: lib/bus | #24257, #24260 | 4 Cython files blocking 28 packages. BUILD stubs for bus/. |
| The Biggest Bazel Blocker Was a Cython Package | #24257, #24260 | Shorter version of the lib/bus story. Same PRs. |
| Migrating a CUDA Package Without Bazel Knowing About CUDA | #23478 | mai_kernels with GPU test support. Maybe shippable. |
Dependency Graph as Product
The strategic pivot: the graph itself is the deliverable, not just a side effect of migration.
| Post | PR(s) | Notes |
|---|---|---|
| Your Monorepo Is a Graph | — | Conceptual foundation. |
| Your Monorepo Has Two Dependency Graphs (and They Disagree) | — | find_changed vs Bazel see different things. |
| The Dep Graph Is the Product | #23805 | The thesis. manual tags for 100% graph coverage. |
| How I Gave Our Monorepo a Complete Bazel Dep Graph | #23805 | The implementation walkthrough. Same PR as above. |
| What a Full Dep Graph Actually Unlocks | — | The payoff catalog. References PR #22032 (Yipu’s torch detection). |
Dep Graph Tools (Experiment Sprint)
A batch of proof-of-concept tools demonstrating what the dep graph enables. All from Mar 9-10, all demo PRs.
| Post | PR | Tool |
|---|---|---|
| Your BUILD Files Are Lying to You | #24011 | BUILD file drift detector |
| I Built a Tool to Prove Bazel Was Better | #24016 | find_changed vs Bazel rdeps comparison |
| I Made Pyright Faster by Removing Environments | #24017 | Scoped pyright via dep graph |
| GPU Test Targeting with the Bazel Dep Graph | #24037 | GPU test targeting tool |
| Teaching Bazel to See Non-Python Dependencies | #24027 | Non-Python deps as filegroup targets |
| — | #24026 | Version bump detection (no blog post) |
py_test DX Improvements
Collapsing py_venv_test and py_test into one macro with auto-detection.
| Post | PR(s) | Notes |
|---|---|---|
| It Works But I Can’t Merge It | #23305 | The “gut feeling” post. Merge py_venv_test into py_test. |
| When Your Macro Hides Tests From an Entire Platform | #23305 | The target_compatible_with failure mode discovered during this work. |
GPU Testing in Bazel
GPU test infrastructure — resource modeling, sharding, the CI pipeline.
| Post | PR(s) | Notes |
|---|---|---|
| GPU Tests in Bazel: The Resource Problem | — | How to model GPU as a Bazel resource constraint. |
| When GPU Showed Up in Our Python Bazel Monorepo | — | Narrative version. |
| GPU Test Sharding: Weighted Distribution Across H100 Nodes | — | Advanced: balanced test distribution. |
| How Our GPU Tests Actually Work | #22032, #23087 | References Yipu’s torch detection PR and test runner. |
| The 500 Lines That Run Every GPU Test | #22547 | Deep dive into the test execution planner. |
Docker Build Optimization
Not Bazel-specific, but tightly coupled to the migration CI.
| Post | PR(s) | Notes |
|---|---|---|
| Four Tries, One Dockerfile | #21006, #22455 | Docker build iteration saga. |
| I Shipped a Docker Optimization and Nothing Happened | #21006 | The uv-stable.lock optimization. |
| Two Days to Merge Six Files | #21006 | Same PR, different story — the merge process. |
CI Infrastructure
CI fixes, AI-powered failure analysis, and runner tooling.
| Post | PR(s) | Notes |
|---|---|---|
| Proving Your CI Fix Actually Worked | #19347, #21203 | ACR/Datadog CI analysis. |
| The AI CI Helper’s First Real Test | #24660 | AI fix workflow in action. |
| The 30-Second Fix Nobody Did for 3 Months | #24045 | Quick CI fix. |
| Wait-for-Label | #23239 | Gating expensive CI jobs. |
Migration Methodology
How to study, plan, and track a migration. Process posts.
| Post | PR(s) | Notes |
|---|---|---|
| Studying a Migration Playbook | 24 PRs (Ryan’s) | Reverse-engineering Ryan’s migration methodology. No PRs of mine. |
| Reading Migration Status Like a Map | #21169 | How find_bazel_ready_packages.py works. |
| The Prototype Layer | #16791 | References a Ryan PR. |
PR Index
Every PR that appears in a blog post, sorted by number. Bold = merged.
Orphans
Blog posts with no PR
Pure conceptual, analytical, or educational posts that don’t correspond to any code change.
Torch arc:
- 62% of Our Packages Are Blocked by torch
- How Bazel Resolves Python Deps (and Why torch Breaks Everything)
- What Does Success Actually Look Like?
- Three Ways to Smuggle torch into Bazel
- The Override That Overrode Everything
- Why Bazel Torch Tests Need Two Python Interpreters
- The py_torch_test Pattern
- Test Classification: The Real Torch CI Problem
- Migrating Torch Packages to Bazel: The Complete Decision Tree
- Dependency Graph Cascade Analysis
CC/Native arc:
- Everything Below
import torch - Why Bazel Can’t Compile Your Python C Extensions
- Native Code in a Python Monorepo
Dep graph arc:
GPU testing:
- GPU Tests in Bazel: The Resource Problem
- When GPU Showed Up in Our Python Bazel Monorepo
- GPU Test Sharding: Weighted Distribution Across H100 Nodes
Migration mechanics (all of Arc 4 is concept/reference — see the Blog Map for the full list)
PRs with no blog post
Code that shipped (or died) without a dedicated writeup.
| PR | What | Why no post |
|---|---|---|
| #19185 | Platform select for torch | Dead experiment, predates the narrative |
| #20793 | Smoke-test torch on macOS | Quick experiment, no story |
| #20901 | Batch migrate 22 packages | Went stale before it shipped |
| #22575 | Remove torch from excluded packages | Ryan shipped it faster |
| #24026 | Version bump detection | Experiment sprint — tool works but no blog angle |
| #24260 | BUILD files for bus/ oai namespace | Companion to #24257, covered by the lib/bus post |
Companion Posts
These are the other two meta-posts that this one cross-references:
- I Wrote 90 Posts About Bazel. Here’s the Map. — Posts organized by narrative arc + reading paths. No PR mapping.
- 21 Open PRs and a Mass Extinction — PR triage and process reflection. No blog mapping.
Together with this post, the three form a navigation layer: arcs (the Map), triage (the 21 PRs), and cross-reference (this one).