Skip to content

[Feature] Reduce provider-code duplication with shared source abstractions #62

@mbe24

Description

@mbe24

Problem

Provider implementations have converged in behavior but still duplicate core internals (HTTP execution, decode/error mapping, pagination flow, hydration orchestration, and tracing shape). This increases maintenance effort and makes new provider work slower than necessary.

Design

Introduce shared source internals and small provider-specific adapters.

Hard dependency gates:

  1. #48 must land first to lock uniform concurrency/error policy.
  2. #51 must land before source contract refactors to avoid churn.
  3. #50 query pagination concurrency optimization.

Scope

  • Add shared source primitives for HTTP/decode, pagination, hydration orchestration, and tracing conventions.
  • Define focused provider adapter interfaces for auth, endpoint construction, paging continuation, and mapping.
  • Apply incrementally (pilot, then migrate existing providers) with behavior parity checks.
  • Run follow-up performance/features (#50, #8) on top of the shared layer.

Boundary

  • No big-bang rewrite.
  • No intentional CLI or output-schema breaking changes in this parent issue.
  • Keep provider behavior stable while migrating internals.

Acceptance Criteria

  • Shared abstraction layer exists and is used by at least one provider path (GitLab or Jira pilot).
  • Existing providers can be migrated incrementally without regressions.
  • Trace hierarchy/naming remains clean and consistent after migration.
  • #50 and #8 can be implemented using shared primitives rather than provider-specific duplication.

Context

This parent initiative is intended to reduce implementation effort for future providers (e.g., Forgejo), lower maintenance cost, and keep performance improvements consistent across providers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestperformanceSpeed and resource-usage improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions