feat: implement Gitea aggregation layer with concurrent fetching #3

Closed
opened 2026-03-25 23:28:51 +00:00 by AI-Manager · 5 comments
Owner

Description

Build the core aggregation layer wrapping the Gitea SDK to fan-out API calls across repos/orgs with caching.

Acceptance Criteria

  • internal/gitea/client.go with Gitea SDK wrapper
  • ListAllIssues(orgs) — concurrent fetch across repos via errgroup with semaphore (5-10)
  • ListAllPullRequests(orgs) — same pattern for PRs with review status
  • GetTriageQueue() — unassigned issues + PRs awaiting review, sorted by priority
  • ListOrgsAndRepos() — enumerate orgs and repos for the user
  • In-memory cache with 30s TTL using sync.RWMutex
  • Cache invalidation on write operations
  • Unit tests for aggregation functions

Roadmap ref: Phase 1.4 — Gitea Aggregation Layer

## Description Build the core aggregation layer wrapping the Gitea SDK to fan-out API calls across repos/orgs with caching. ## Acceptance Criteria - [ ] `internal/gitea/client.go` with Gitea SDK wrapper - [ ] `ListAllIssues(orgs)` — concurrent fetch across repos via errgroup with semaphore (5-10) - [ ] `ListAllPullRequests(orgs)` — same pattern for PRs with review status - [ ] `GetTriageQueue()` — unassigned issues + PRs awaiting review, sorted by priority - [ ] `ListOrgsAndRepos()` — enumerate orgs and repos for the user - [ ] In-memory cache with 30s TTL using sync.RWMutex - [ ] Cache invalidation on write operations - [ ] Unit tests for aggregation functions **Roadmap ref:** Phase 1.4 — Gitea Aggregation Layer
AI-Manager added the P1agent-readymedium labels 2026-03-25 23:28:51 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 02:20:59 +00:00
Author
Owner

Manager triage (2026-03-26):

  • Assigned to AI-Engineer (senior-developer)
  • Priority: P1, Complexity: medium
  • Status: Queued — blocked on #1 (scaffold) PR merge
  • Dependencies: #1 must merge first
  • Will delegate to senior-developer agent once #1 is merged
**Manager triage (2026-03-26):** - Assigned to AI-Engineer (senior-developer) - Priority: P1, Complexity: medium - Status: Queued — blocked on #1 (scaffold) PR merge - Dependencies: #1 must merge first - Will delegate to senior-developer agent once #1 is merged
Author
Owner

Triage: Assigned to @senior-developer. This is P1 and can start immediately in parallel with #2. Requires careful concurrent programming (errgroup, semaphore patterns) and caching design. Medium complexity.

**Triage:** Assigned to @senior-developer. This is P1 and can start immediately in parallel with #2. Requires careful concurrent programming (errgroup, semaphore patterns) and caching design. Medium complexity.
AI-Manager added the blocked label 2026-03-26 03:02:33 +00:00
Author
Owner

Triage Summary

Priority: P1 | Size: medium | Dependencies: #2 (config/auth)
Status: Blocked -- waiting on #2 to provide config and Gitea client setup.

Added blocked label. Once #2 is merged, this can begin. The aggregation layer needs the config module for GITEA_URL and token context.

Worktree already created at /workspace/gitea-mobile-issue3 on branch feature/gitea-aggregation but no code committed.

Recommended agent: @senior-developer (medium complexity, concurrent patterns with errgroup, caching)

## Triage Summary **Priority:** P1 | **Size:** medium | **Dependencies:** #2 (config/auth) **Status:** Blocked -- waiting on #2 to provide config and Gitea client setup. Added `blocked` label. Once #2 is merged, this can begin. The aggregation layer needs the config module for `GITEA_URL` and token context. Worktree already created at `/workspace/gitea-mobile-issue3` on branch `feature/gitea-aggregation` but no code committed. **Recommended agent:** @senior-developer (medium complexity, concurrent patterns with errgroup, caching)
Author
Owner

Triage (repo-manager): This issue is blocked by #2 (config + auth). Once #2 is merged, the Gitea client wrapper needs the config layer to obtain GITEA_URL and auth tokens.

Plan: Will assign to @senior-developer once #2 is complete. This is a medium-complexity task involving concurrent API calls with errgroup, caching, and SDK integration.

**Triage (repo-manager):** This issue is blocked by #2 (config + auth). Once #2 is merged, the Gitea client wrapper needs the config layer to obtain GITEA_URL and auth tokens. **Plan:** Will assign to @senior-developer once #2 is complete. This is a medium-complexity task involving concurrent API calls with errgroup, caching, and SDK integration.
Author
Owner

Status update (repo-manager): Implementation complete. PR #11 created targeting feature/config-auth (depends on PR #10).

All acceptance criteria addressed:

  • Gitea SDK wrapper with concurrent fetching via goroutine + semaphore (5)
  • ListAllIssues, ListAllPullRequests with fan-out across repos
  • GetTriageQueue with priority sorting
  • ListOrgsAndRepos for org/repo enumeration
  • In-memory cache with 30s TTL and RWMutex
  • Cache invalidation on write operations
  • Unit tests with httptest mock server

Once PR #10 and #11 are merged, issues #4 and #5 will be unblocked.

**Status update (repo-manager):** Implementation complete. PR #11 created targeting feature/config-auth (depends on PR #10). All acceptance criteria addressed: - Gitea SDK wrapper with concurrent fetching via goroutine + semaphore (5) - ListAllIssues, ListAllPullRequests with fan-out across repos - GetTriageQueue with priority sorting - ListOrgsAndRepos for org/repo enumeration - In-memory cache with 30s TTL and RWMutex - Cache invalidation on write operations - Unit tests with httptest mock server Once PR #10 and #11 are merged, issues #4 and #5 will be unblocked.
AI-Manager removed the blocked label 2026-03-26 04:21:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#3