[BUG]: list_contribution_summaries() splits contributor metrics across username casing variations
Maintainers usually reply within 4 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start in src/ghdcbot/adapters/storage/sqlite.py, especially list_contribution_summaries() at lines 296-335. Read how contribution rows are grouped and check any related storage tests for summary aggregation. Done means case variants of one GitHub username produce one combined ContributionSummary; issue #241 already has an open pull request.
Written by the indexing model from the issue text.
Description
Bug Description
In src/ghdcbot/adapters/storage/sqlite.py:296-335, list_contribution_summaries(start_utc, end_utc) groups contribution events from the contributions table using the raw dictionary key user = row["github_user"].
Because GitHub usernames are case-insensitive (e.g. Octocat and octocat refer to the same user), any difference in casing between event ingestion records causes list_contribution_summaries to create separate buckets for the same contributor. This splits their metrics (issues opened, PRs opened, comments, scores) across multiple records instead of aggregating them into a single unified ContributionSummary.
Steps to Reproduce
- Record contribution events in SQLite for user
"OctoCat"(e.g., 2 PRs opened). - Record contribution events for user
"octocat"(e.g., 3 comments). - Call
storage.list_contribution_summaries(start_utc, end_utc). - Observe that two separate
ContributionSummaryobjects are returned instead of one combined summary with 2 PRs and 3 comments.
Logs and Screenshots
# src/ghdcbot/adapters/storage/sqlite.py:296-302
summaries: dict[str, dict[str, int]] = {}
for row in rows:
user = row["github_user"] # Raw casing used as dict key!
event_type = row["event_type"]
bucket = summaries.setdefault(
user,
{ ... }
)
Environment Details
- OS: Independent (Windows / Linux / macOS)
- Python: 3.11+
- Package: ghdcbot
Impact
Medium - Feature works but has issues
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- Python
- Stars
- 30
- Forks
- 58
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 14
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/Gitcord-GithubDiscordBot
-
[BUG]: scheduled-run-once.sh flock only wraps preflight-sync, so concurrent runs can overlap run-oncePossibly taken A pull request linked to this issue is open or already merged. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/Gitcord-GithubDiscordBot#248 · 1 comment ·
Maintainers usually reply within 4 days
-
fix(storage): social profile verification status persists when changing to an unverified handlePossibly taken @AyushSrivastava1818 claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AOSSIE-Org/Gitcord-GithubDiscordBot#245 · 3 comments ·
Maintainers usually reply within 4 days
-
fix(audit): prevent unhandled AttributeError when audit events contain context: NonePossibly taken @udbhav968-creator claimed this 5 days ago. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AOSSIE-Org/Gitcord-GithubDiscordBot#221 · 4 comments ·
Maintainers usually reply within 4 days
-
[BUG]: /open-prs and /pr require specifying `contributor` instead of defaulting to the invoking userPossibly taken @udbhav968-creator claimed this 7 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
AOSSIE-Org/Gitcord-GithubDiscordBot#214 · 1 comment ·
Maintainers usually reply within 4 days
-
[BUG]: /create-issue writes unstructured audit events, breaking `export-audit` and event filteringPossibly taken @dushyantrajotia claimed this 11 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/Gitcord-GithubDiscordBot#198 · 2 comments · 1 assignee ·
Maintainers usually reply within 4 days
All issues in AOSSIE-Org/Gitcord-GithubDiscordBot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
cofade/open-garden-planner#1044 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
codecrafters-io/build-your-own-x#2126 ·
Maintainers usually reply within 5 days
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
julianleno/cortai#10 ·
-
difficulty:easy func:python os:windows prio:high type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NatronGitHub/Natron#2029 ·
Maintainers usually reply within 1 day