APO-12488: Credit Support team issues on person metrics - #526
Conversation
Person-card metrics (All Work Done, Time to Completion, Priority Bugs Fixed, Priority Bug Time to Fix) only ever read the single team in `linear_team_key`, so work tracked on the Support team (SUP-*, used for EASE) was invisible. Separately, "priority bug" required a label named exactly `Bug`, but Support's equivalent label is `Issue`. - Add `linear_team_keys` (list, primary team always first) and switch the two person-scoped queries to `team.key in $team_keys`. Team-wide pages (homepage stats, leaderboard, projects, regressions) still use the primary team. - Add `bug_labels` (default `[Bug]`) and a shared `is_priority_bug` helper used by both the person context and `issue_card_values`. - Configure `[APO, SUP]` and `[Bug, Issue]`; document both keys. Closes APO-12488 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ Mary PR Poppins — Approve
This PR updates person-scoped Linear metrics to include configured team keys and configurable bug labels, with focused tests covering the new config helpers, query filters, and priority-bug classification behavior. Looks clean across security, correctness, maintainability, and repo-history context — no high-conviction issues found.
redreceipt
left a comment
There was a problem hiding this comment.
this tool is my dashboard for apollos only, I have intentionally kept out other teams. I don't want ease or legacy stuff in here
There was a problem hiding this comment.
🔵 Needs a closer look
It changes the live Linear GraphQL filter semantics (team.key in [...]) without an integration run against Linear, so there’s residual risk of runtime query incompatibility despite unit-test coverage.
Pull request overview
This PR extends Bug Board’s person-scoped Linear issue queries to include multiple teams (e.g., APO + SUP) so Support-team work contributes to person metrics, and it makes the “priority bug” label(s) configurable to account for Support’s Issue label.
Changes:
- Add
linear_team_keys(list) andbug_labelsto configuration, with helpers inconfig.py. - Update
linear/issues.pyperson-scoped queries to filter byteam.key in $team_keysinstead of a single team key. - Centralize “priority bug” logic via
person_stats.is_priority_bug()and add unit tests for the new config-driven behavior.
File summaries
| File | Description |
|---|---|
app.py |
Switches person-context “priority bugs” computation to use shared helper. |
config.py |
Adds get_linear_team_keys() and get_bug_label_names() helpers. |
config.yml |
Configures linear_team_keys: [APO, SUP] and bug_labels: [Bug, Issue]. |
linear/issues.py |
Updates person-scoped Linear queries to include multiple teams via in filter. |
person_stats.py |
Adds is_priority_bug() and reuses it from issue_card_values(). |
README.md |
Documents the new config keys and their intended scope. |
tests/test_config.py |
Adds unit coverage for new config helpers. |
tests/test_linear_issues.py |
Updates query assertions/variables for team_keys and adds open-issues coverage. |
tests/test_linear_issue_state_filters.py |
Updates patches to use get_linear_team_keys(). |
tests/test_person_stats.py |
Adds tests ensuring configurable bug labels affect metrics as intended. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if issue.get("priority", 5) <= 2 | ||
| and any(lbl.get("name") == "Bug" for lbl in issue.get("labels", {}).get("nodes", [])) | ||
| ] | ||
| priority_bugs = [issue for issue in completed_items if is_priority_bug(issue)] |
Are they not also being used to generate the metrics on the people pages? Basically what I'm taking away from this is that if an urgent EASE bug comes up (as it did yesterday) that it should not factor in to the priority bugs fixed metric. Is that correct? |
|
Correct. This is apollos and I don’t manage legacy support stuff. It’s the same for me and amplo and goodsense. Priority bugs fixed metric is not that important.
… On Sep 4, 2026, at 1:29 PM, Brandon Kraeling ***@***.***> wrote:
bkraeling
left a comment
(ApollosProject/bug-board#526)
<#526 (comment)>
this tool is my dashboard for apollos only, I have intentionally kept out other teams. I don't want ease or legacy stuff in here
Are they not also being used to generate the metrics on the people pages? Basically what I'm taking away from this is that if an urgent EASE bug comes up (as it did yesterday) that it should not factor in to the priority bugs fixed metric. Is that correct?
—
Reply to this email directly, view it on GitHub <#526?email_source=notifications&email_token=AAUJJFTONQ3TDAIHR4YA2KL5NL3ZPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNJUGQYTOOBSGU3KM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5544178256>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAUJJFQBEK5SERCT42TCJU35NL3ZPAVCNFSNUABFKJSXA33TNF2G64TZHM4TENZTGQ2DSNZSHNEXG43VMU5TKMZTHAZDKNBSHE42C5QC>.
You are receiving this because you modified the open/close state.
|


🐛 Issue
Closes APO-12488.
Every Linear query in Bug Board filters on the single team in
linear_team_key(APO). Work tracked on the Support team (SUP-…, where EASE issues live) never reaches any person-card metric — All Work Done, Time to Completion, Priority Bugs Fixed, Priority Bug Time to Fix, or the σ comparisons built from them. An engineer who fixes an Urgent EASE issue gets the same credit as one who did nothing.Separately, a "priority bug" is defined as priority ≤ 2 and a label named exactly
Bug. Support's equivalent label isIssue, so even with the team filter widened, an UrgentSUPissue would count toward All Work Done but not Priority Bugs Fixed.Concrete case: SUP-708 (Urgent, label
Issue, assigned to brandon) will earn zero credit when it moves to Done.✏️ Solution
linear_team_keys(list) toconfig.yml.get_linear_team_keys()always puts the primarylinear_team_keyfirst and de-duplicates. Only the two person-scoped queries (get_open_issues_for_person,get_completed_issues_for_person) switch toteam: { key: { in: $team_keys } }.bug_labels(default["Bug"]) and a sharedis_priority_bug()helper inperson_stats.py, used by both_build_person_contextandissue_card_valuesso the two copies of the filter can't drift. Priority semantics are unchanged (priority <= 2); only the label set is configurable.linear_team_keys: [APO, SUP]andbug_labels: [Bug, Issue]. Because the person queries run for every engineer, this credits everyone's Support work, not just one person's.🔬 To Test
ruff check . && mypy . && python -m unittest discover -s tests -p 'test_*.py'→ all green.python -c "import config; print(config.get_linear_team_keys(), config.get_bug_label_names())"→['APO', 'SUP'] ['Bug', 'Issue'].LINEAR_API_KEY), open/team/brandon?days=30. The All Work Done header link should open a Linear list that includes anySUP-…issues brandon completed in the window alongside theAPO-…ones. Before this change that list wasAPO-only.Issue), reload/team/brandon: All Work Done and Priority Bugs Fixed each increase by 1, and SUP-708 appears in both header links./and/team: homepage priority stats and the team table are unchanged (they still queryAPOonly).Automated result: 217 tests pass (9 new), ruff and mypy report 0 issues. Steps 1–2 verified locally. Steps 3–5 need a review app or a local
LINEAR_API_KEY— none was available in this environment, so the liveteam.key in [...]query has not been exercised against Linear yet.📸 Screenshots
Not applicable — no visible UI change; the existing cards show larger numbers.