Conversation
The existing total-bytes regression gate is too coarse: a 3% growth in mm/ that cancels out a 3% drop in drivers/ slips through unannounced. This wires a per-bucket gate on top, sourced from the diagnostic build's subsystem rollup, and surfaces the result as a PR comment so regressions are visible during code review rather than after merge. configs/subsystem-budget.txt pins ceilings for the four big top-level buckets (kernel, fs, lib, mm, <icf-merged>) plus depth-2 rules for the buckets the recent fair-tiny + time-prune patches drove down (kernel/sched, kernel/printk) so any future regression is bucket-scoped rather than hidden by a total-bytes cancellation. lib/zstd / lib/lz4 / lib/xz are pinned at zero -- olddefconfig re-enabling a decompressor selector breaks the gate immediately. scripts/check-subsystem-budget.py grows --deep-rollup support and merges depth-2 buckets after refusing any name present in both the top-level and deep tables (ambiguous input -> exit 2). The deep-rollup parser keys off " by 2nd-level subdirectory" and a regex-matched " top N source files" so file-row noise stays out of the budget namespace, decoupling the parser from the top_files default in subsystem-rollup.py. scripts/kernel-size-report.sh wipes subsystem-budget.txt before the run and only swallows exit 1 (warn-only breach); exit 2 logs an error and ensures no stale status survives a cached-workspace replay. --deep-rollup is passed conditionally so a top-level-only run still produces a useful status file. The CI flow splits along trust boundaries. The Build job stays at contents:read; a separate pr-rollup-comment.yml workflow triggers via workflow_run, downloads the artifact under its own scoped pull-requests:write token, and upserts a single bot comment per PR. The upsert filters strictly on the github-actions[bot] login, deletes older marker-bearing duplicates so a crashed prior run does not leave stale gate state visible, and reads the PR number through env (PR_NUMBER) instead of template interpolation. Fork PRs work via a head-SHA fallback because workflow_run.pull_requests is empty for forks. scripts/rollup-to-markdown.py (new) renders subsystem-rollup.txt and the budget status into the comment body. Bucket names go through md_cell() which substitutes pipe and backtick -- the two characters that break a GFM table inside a backtick code span, where backslash escapes are not processed. scripts/subsystem-rollup.py grows a styled Pareto-style HTML breakdown alongside the existing SVG bars; the left column ranks subsystems, the right column drills into the selected bucket.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing total-bytes regression gate is too coarse: a 3% growth in mm/ that cancels out a 3% drop in drivers/ slips through unannounced. This wires a per-bucket gate on top, sourced from the diagnostic build's subsystem rollup, and surfaces the result as a PR comment so regressions are visible during code review rather than after merge.
configs/subsystem-budget.txt pins ceilings for the four big top-level buckets (kernel, fs, lib, mm, ) plus depth-2 rules for the buckets the recent fair-tiny + time-prune patches drove down (kernel/sched, kernel/printk) so any future regression is bucket-scoped rather than hidden by a total-bytes cancellation. lib/zstd / lib/lz4 / lib/xz are pinned at zero -- olddefconfig re-enabling a decompressor selector breaks the gate immediately.
scripts/check-subsystem-budget.py grows --deep-rollup support and merges depth-2 buckets after refusing any name present in both the top-level and deep tables (ambiguous input -> exit 2). The deep-rollup parser keys off " by 2nd-level subdirectory" and a regex-matched " top N source files" so file-row noise stays out of the budget namespace, decoupling the parser from the top_files default in subsystem-rollup.py.
scripts/kernel-size-report.sh wipes subsystem-budget.txt before the run and only swallows exit 1 (warn-only breach); exit 2 logs an error and ensures no stale status survives a cached-workspace replay. --deep-rollup is passed conditionally so a top-level-only run still produces a useful status file.
The CI flow splits along trust boundaries. The Build job stays at contents:read; a separate pr-rollup-comment.yml workflow triggers via workflow_run, downloads the artifact under its own scoped pull-requests:write token, and upserts a single bot comment per PR. The upsert filters strictly on the github-actions[bot] login, deletes older marker-bearing duplicates so a crashed prior run does not leave stale gate state visible, and reads the PR number through env (PR_NUMBER) instead of template interpolation. Fork PRs work via a head-SHA fallback because workflow_run.pull_requests is empty for forks.
scripts/rollup-to-markdown.py (new) renders subsystem-rollup.txt and the budget status into the comment body. Bucket names go through md_cell() which substitutes pipe and backtick -- the two characters that break a GFM table inside a backtick code span, where backslash escapes are not processed.
scripts/subsystem-rollup.py grows a styled Pareto-style HTML breakdown alongside the existing SVG bars; the left column ranks subsystems, the right column drills into the selected bucket.