In --check mode, main() in scripts/build_dist.py calls include_drift() to name the files whose regions differ, then is_stale(), which calls include_drift() again as its first step. Every check run therefore renders and compares every include region twice. The walk is small today, the Markdown files of the skill directories, so the cost is a few dozen file reads, and the second pass exists only so the stale message can name the drifting files.
Raised by Copilot as a suppressed finding on #1378 and deferred from it under the maintainer's scope for that pull request's final round. The fix is to have is_stale() return or expose the drift list it already computed, or to call it first and render the list only on a stale result.
In
--checkmode,main()inscripts/build_dist.pycallsinclude_drift()to name the files whose regions differ, thenis_stale(), which callsinclude_drift()again as its first step. Every check run therefore renders and compares every include region twice. The walk is small today, the Markdown files of the skill directories, so the cost is a few dozen file reads, and the second pass exists only so the stale message can name the drifting files.Raised by Copilot as a suppressed finding on #1378 and deferred from it under the maintainer's scope for that pull request's final round. The fix is to have
is_stale()return or expose the drift list it already computed, or to call it first and render the list only on a stale result.