Skip to content

[P6.8.1] Add tests for untested core modules: artifacts.py, review.py, api_key_service.py #654

Description

@frankbria

Problem

Three sizeable core modules have no direct test coverage, two of them on the Ship path and one security-adjacent:

Module LOC Used by Risk
core/api_key_service.py 211 cli/auth_commands.py, auth/api_key_router.py High — security-adjacent (note: the platform_store API-key path is well covered; this core service is the untested duplicate)
core/artifacts.py 428 cli/app.py (cf patch export) Medium — largest untested module, on the Ship path
core/review.py 285 ui/routers/review_v2.py Medium — cf review surface

core/prd_stress_test.py (499 LOC) is also under-covered relative to size (single thin referencing test).

Fix

  • Add direct unit tests for api_key_service.py, artifacts.py, review.py (MockProvider, no live API calls); expand prd_stress_test.py coverage.

Acceptance criteria

  • api_key_service.py, artifacts.py, review.py have direct tests covering main paths + error cases.
  • New tests carry the @pytest.mark.v2 marker.

Source: release-readiness audit 2026-06-13 (test/CI agent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-medium-betaMedium priority - nice to have for betaphase-6.8Phase 6.8: Test coverage hardeningtesting

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions