Skip to content

fix(security-tracker-stats): recognise the framework's own comment marker - #1130

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/stats-recognise-magpie-marker
Aug 29, 2026
Merged

fix(security-tracker-stats): recognise the framework's own comment marker#1130
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/stats-recognise-magpie-marker

Conversation

@potiuk

@potiuk potiuk commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

The default bot_prefixes does not list <!-- apache-magpie: — the canonical machine marker every framework skill writes on its status-rollup, hand-off and import comments. Those comments are therefore counted as human triage activity, pulling the time-to-triage median toward zero on any tracker the skills touch. The more the skills are used, the more wrong the metric gets.

Meanwhile the default does list <!-- airflow-s status rollup v — a marker specific to one adopter's tracker repo, meaningless to every other project. This swaps the leaked adopter marker for the framework's own.

Two things worth a reviewer's attention

1. Template-genericity residue. The airflow-s prefix is exactly what the upgrade flow's Step 6d audit exists to catch. #1123 removed the last apache-steward references; this one survived because it names an adopter, not the old framework.

2. The README's merge documentation was wrong, and that is what made this bug hard to notice downstream. It said the milestones and categories lists are replaced entirely — implying other lists merge. deep_merge replaces every list; its own docstring says "Lists are REPLACED, not concatenated." So an adopter who fixes the marker locally by overlaying one bot_prefixes entry silently discards all the defaults. Corrected to say every list replaces.

Test plan

  • The config still parses under the hand-rolled _minimal_yaml_load subset parser with the added comments — checked directly, since that parser handles only a YAML subset and comments were a real risk.
  • is_bot_body now classifies a real <!-- apache-magpie: status-rollup v3 --> comment as bot (True) while leaving a human triage comment alone (False).
  • The tool's full suite passes: 114 tests, uv run --project . pytest.
  • prek run --files passes on both files.

🤖 Generated with Claude Code

…rker

The default `bot_prefixes` did not list `<!-- apache-magpie: `, the
canonical machine marker every framework skill writes on its
status-rollup, hand-off, and import comments. Those comments were
therefore counted as *human triage activity*, pulling the
time-to-triage median toward zero on any tracker the skills touch — and
the more the skills are used, the more wrong the metric gets.

At the same time the default listed `<!-- airflow-s status rollup v`, a
marker specific to one adopter's tracker repo and meaningless to every
other project. That is the template-genericity residue the upgrade
flow's Step 6d audit exists to catch; apache#1123 removed the last
apache-steward references but this one survived.

Swaps the leaked adopter marker for the framework's own.

Also corrects the README's merge documentation. It said the `milestones`
and `categories` lists are replaced entirely, implying other lists
merge. `deep_merge` replaces *every* list — its own docstring says
"Lists are REPLACED, not concatenated" — so an overlay adding a single
`bot_prefixes` entry silently drops all the defaults. That is precisely
the trap that makes this bug hard to notice downstream: an adopter fixes
the marker locally and unknowingly discards the rest of the list.

Verified: the config still parses under the hand-rolled
`_minimal_yaml_load` subset parser with the added comments,
`is_bot_body` now classifies a real `<!-- apache-magpie: status-rollup
v3 -->` comment as bot while leaving a human triage comment alone, and
the tool's 114 tests pass.

Generated-by: Claude Code (Claude Opus 5)
@potiuk potiuk added family:security security-* skills capability:stats Read-only dashboards, metrics, governance evidence labels Aug 29, 2026
@potiuk
potiuk merged commit d751ffa into apache:main Aug 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:stats Read-only dashboards, metrics, governance evidence family:security security-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant