Fix: reconciliation script should create groups with requires_approval=false #159

Closed
opened 2026-03-24 09:41:39 +00:00 by forgejo_admin · 2 comments

Type

Bug

Lineage

project-groupme-westside → discovered during E2E test (2026-03-24)

Repo

forgejo_admin/basketball-api

User Story

As a parent clicking a GroupMe share link
I want to join the group immediately
So that I don't have to wait for manual admin approval

What Broke

Groups created by scripts/create_groupme_groups.py default to requires_approval=true. Parents click the share link and get stuck waiting for admin approval instead of auto-joining. Had to manually update all 9 groups via API.

Repro Steps

  1. Run scripts/create_groupme_groups.py to create groups
  2. Click a share link for any created group
  3. GroupMe shows "Request to join" instead of auto-joining
  4. Admin must manually approve each join request

Expected Behavior

Share link click → instant join. No approval step.

Environment

GroupMe API POST /groups defaults requires_approval=true. Must explicitly set to false after creation via POST /groups/{id}/update.

File Targets

  • scripts/create_groupme_groups.py — after client.create_group(), call client.update_group(group_id, requires_approval=False)
  • Also fix the add_member calls (missing nickname kwarg — use team name as fallback)

Acceptance Criteria

  • New groups created with requires_approval=false
  • add_member calls include nickname parameter
  • Script is idempotent (existing groups with correct settings are skipped)

Test Expectations

  • Unit test: verify update_group called with requires_approval=False after creation
  • Run command: pytest tests/ -k reconciliation

Constraints

  • Don't change the SDK — this is a script-level fix
  • Keep the script idempotent

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-groupme-westside — project page
  • Issue #156 — parent ticket (GroupMe integration)
### Type Bug ### Lineage `project-groupme-westside` → discovered during E2E test (2026-03-24) ### Repo `forgejo_admin/basketball-api` ### User Story As a parent clicking a GroupMe share link I want to join the group immediately So that I don't have to wait for manual admin approval ### What Broke Groups created by `scripts/create_groupme_groups.py` default to `requires_approval=true`. Parents click the share link and get stuck waiting for admin approval instead of auto-joining. Had to manually update all 9 groups via API. ### Repro Steps 1. Run `scripts/create_groupme_groups.py` to create groups 2. Click a share link for any created group 3. GroupMe shows "Request to join" instead of auto-joining 4. Admin must manually approve each join request ### Expected Behavior Share link click → instant join. No approval step. ### Environment GroupMe API `POST /groups` defaults `requires_approval=true`. Must explicitly set to `false` after creation via `POST /groups/{id}/update`. ### File Targets - `scripts/create_groupme_groups.py` — after `client.create_group()`, call `client.update_group(group_id, requires_approval=False)` - Also fix the `add_member` calls (missing `nickname` kwarg — use team name as fallback) ### Acceptance Criteria - [ ] New groups created with `requires_approval=false` - [ ] `add_member` calls include `nickname` parameter - [ ] Script is idempotent (existing groups with correct settings are skipped) ### Test Expectations - [ ] Unit test: verify `update_group` called with `requires_approval=False` after creation - Run command: `pytest tests/ -k reconciliation` ### Constraints - Don't change the SDK — this is a script-level fix - Keep the script idempotent ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-groupme-westside` — project page - Issue #156 — parent ticket (GroupMe integration)
Author
Owner

Scope Review: READY

Review note: review-308-2026-03-27

Scope is solid. Both bugs verified in scripts/create_groupme_groups.py:

  • Line 125-128: create_group() never calls update_group() to set requires_approval=False. SDK method confirmed available.
  • Lines 136-138: add_member() missing required nickname param — this is actually a TypeError crash, more severe than described. SDK requires nickname as positional arg #2.

File targets, SDK methods, and acceptance criteria all verified. Single-file fix, single repo, under 5 minutes of agent work.

Minor suggestions (non-blocking):

  • Add story:X label to board item #308 for traceability
  • Clarify whether update_group should also run on MATCHED (existing) groups for full idempotency
## Scope Review: READY Review note: `review-308-2026-03-27` Scope is solid. Both bugs verified in `scripts/create_groupme_groups.py`: - **Line 125-128**: `create_group()` never calls `update_group()` to set `requires_approval=False`. SDK method confirmed available. - **Lines 136-138**: `add_member()` missing required `nickname` param — this is actually a **TypeError crash**, more severe than described. SDK requires `nickname` as positional arg #2. File targets, SDK methods, and acceptance criteria all verified. Single-file fix, single repo, under 5 minutes of agent work. **Minor suggestions (non-blocking):** - Add `story:X` label to board item #308 for traceability - Clarify whether `update_group` should also run on MATCHED (existing) groups for full idempotency
Author
Owner

Validation: PASS

Validation note: validation-159-2026-03-27
6 checks: 6 PASS, 0 FAIL

  • PR #195 merged at f26ec7c
  • update_group(group_id, requires_approval=False) present at line 136
  • add_member(group_id=group_id, user_id=user_id, nickname=name) present at lines 144-148
  • All 3 reconciliation tests pass (0.34s)
## Validation: PASS Validation note: `validation-159-2026-03-27` 6 checks: 6 PASS, 0 FAIL - PR #195 merged at `f26ec7c` - `update_group(group_id, requires_approval=False)` present at line 136 - `add_member(group_id=group_id, user_id=user_id, nickname=name)` present at lines 144-148 - All 3 reconciliation tests pass (0.34s)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#159
No description provided.