What problem does it solve?
CI base venv builds for dd-trace-py become slow when native extensions (CMake, Cython, Rust) are recompiled unnecessarily on warm runs, defeating the ext_cache mechanism. This Skill helps you pinpoint which extensions rebuild, why the cache is not restoring, and how to verify hash stability.
Core Features & Use Cases
- Cold vs. warm build comparison: Runs a scripted two-pass build (cold then warm) and diffs per-extension timing metadata to expose unnecessary rebuilds.
- Rebuild root-cause analysis: Guides inspection of skip conditions, source file mtimes versus extension mtimes, and ext_cache restore warnings.
- Hash stability verification: Detects cases where
setup.py ext_hashes produces different hashes between save and restore, silently disabling the cache.
- Use Case: A CI base venv build that should take under 30 seconds warm is taking minutes; run the test script, inspect
debug_ext_metadata_warm.txt, and identify the extension whose sources appear newer than the cached artifact.
Quick Start
Ask the assistant to run the build cache diagnostic script for Python 3.13 and analyze the cold and warm extension metadata to find which native extensions are rebuilding unnecessarily.