Repository navigation
feat: keep a history of the rule count, not just the current number - #181
Merged
Merged
Conversation
The badge carries one number, so it answers how many rules there are and never how fast the pack is growing. Reporting growth meant reading the badge file's commit messages, which worked but is not a source anyone should have to use. Two paths now record it, both taking the count from the validator's own output so they cannot drift: validate.yml records a point whenever rules change on main, which captures every change but only when there is one. rule-count-history.yml runs weekly and fills the quiet weeks. Without it a week with no rule changes produces no push and therefore no point, and the series cannot then distinguish no rules were added from nothing was recorded. Counting rule ids directly in the new workflow would have avoided building the engine, and is exactly how the number went stale in three places before. There is one derivation on purpose. The history is seeded from the badge file's own commits, so it starts with real data from 4 September rather than from today: 208 rules then, 333 now. record_rule_count.py upserts by day, so several pushes in a day collapse to that day's final count, and a rerun after a merge is safe. It exits non-zero on an empty or unparsed count, because a silently skipped point leaves a flat line that reads as a quiet week rather than a failure.
trustabl
approved these changes
Oct 12, 2026
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 badge carries one number, so it answers how many rules there are and never how fast the pack is growing. Reporting growth meant reading the badge file's commit messages, which worked but is not a source anyone should have to use.
Two paths now record it, both taking the count from the validator's own output so they cannot drift:
validate.yml records a point whenever rules change on main, which captures every change but only when there is one.
rule-count-history.yml runs weekly and fills the quiet weeks. Without it a week with no rule changes produces no push and therefore no point, and the series cannot then distinguish no rules were added from nothing was recorded.
Counting rule ids directly in the new workflow would have avoided building the engine, and is exactly how the number went stale in three places before. There is one derivation on purpose.
The history is seeded from the badge file's own commits, so it starts with real data from 4 September rather than from today: 208 rules then, 333 now.
record_rule_count.py upserts by day, so several pushes in a day collapse to that day's final count, and a rerun after a merge is safe. It exits non-zero on an empty or unparsed count, because a silently skipped point leaves a flat line that reads as a quiet week rather than a failure.