Skip to content

0.10.0 Issue #1b — Repo-Resolution extrahieren (ein Script nutzt es) #470

Description

@SaJaToGu

0.10.0 Issue #1b — Repo-Resolution extrahieren (ein Script nutzt es)

Part of #468
Release 0.10.0 — AIS Tooling Interface (CLI + Contracts).
Wave: 1b (Library-Extractor).

Goal

Extract repo-resolution logic from scripts/solve_issues.py into
ais_core/repo_resolve.py (real implementation, not a stub). Have
solve_issues.py import and call the library. Prove the library-
extraction pattern works BEFORE migrating additional scripts.

Why separate

Establishes the refactor pattern (Library-Extractor) before doing it
across many scripts. If the pattern fails for one script, we catch it
here with minimal blast-radius.

Dependencies

  • #1a (Skeleton)

Acceptance Criteria

  • ais_core/repo_resolve.py implements the actual repo-resolution
    logic (no longer a stub)
  • Functions like resolve_repo_hint(hint: str) -> ResolvedRepo,
    resolve_from_owner_repo(owner: str, repo: str) -> ResolvedRepo,
    resolve_from_git_remote(path: str) -> ResolvedRepo
  • scripts/solve_issues.py imports from ais_core.repo_resolve
    and delegates repo-resolution
  • solve_issues.py behaviour is identical to before
    (regression-tested)
  • All new code is type-hinted and has docstrings

Files

New:

  • ais_core/repo_resolve.py (full implementation)
  • tests/test_ais_core/test_repo_resolve.py (≥90% line coverage)

Modified:

  • scripts/solve_issues.py (REFACTOR ~50 LOC; calls ais_core.repo_resolve)

Tests

  • Unit tests with mocked git and remote
  • Regression: solve_issues.py --owner X --repo Y --issue N produces
    same result as before refactor (golden-file test or behaviour parity
    check)

Risk

MEDIUM (first real Script-Migration with side-effect init).

LOC-Budget

< 400 net.

Recommended Model

Strong coding model (gpt-4o paid OpenRouter) — first Script-Refactor
warrants higher quality bar.

Parallelizable

No (Wave 1b; runs after #1a, parallel with #1c and #1d).

Reference

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions