Skip to content

build_dist.py --check Renders the Include Walk Twice #1379

Description

@ptr727

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions