Skip to content

Add tests: cover docstring_sync.py at 17% coverage #328

Description

@neuromechanist

Summary

src/knowledge/docstring_sync.py has only 17% test coverage (46-136, 156-195, 213-222 are uncovered). This is a critical module for extracting Python docstrings from external repos — if it fails silently, the knowledge base will have gaps.

Current Coverage

src/knowledge/docstring_sync.py    93 lines,   17% covered

Uncovered code:

  • Core sync logic (lines 46-136): repo cloning, docstring extraction
  • Multi-language handling (lines 156-195)
  • Error handling path (lines 213-222)

Acceptance Criteria

  • Coverage for docstring_sync.py reaches >=70%
  • Tests cover: valid repo clone, empty repo, invalid repo URL
  • Multi-language branch (python) tested with real repo
  • Error paths (network failure, git clone failure) covered
  • Follow NO-MOCKS policy — use real repos or skip

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1: Critical, fix as soon as possibleenhancementNew feature or requesttestingTesting and quality assurance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions