Skip to content

test: enforce 100% coverage - #49

Merged
unohee merged 4 commits into
mainfrom
agent/complete-test-coverage
Jul 18, 2026
Merged

test: enforce 100% coverage#49
unohee merged 4 commits into
mainfrom
agent/complete-test-coverage

Conversation

@unohee

@unohee unohee commented Jul 18, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added behavior-focused tests for authentication, CLI, futures, investor APIs, stock facades, and WebSocket processing paths.
  • Stabilized time-dependent cache tests and credential-gated integration collection.
  • Removed dead defensive branches instead of excluding them with pragma: no cover.
  • Corrected stock investor/holiday endpoint mappings and WebSocket logging/subscription handling found while exercising uncovered paths.
  • Enforced 100% statement coverage in local pytest configuration and both CI workflows.

Why

The package had 306 uncovered statements at the initial measurement and the coverage workflow still targeted the old pykis package at a 70% threshold. The new tests exercise the actual behavior and the CI configuration now measures the current kis_agent package consistently.

Validation

  • pytest tests/ --cov=kis_agent --cov-fail-under=100 --cov-report=json:/tmp/kis-agent-coverage-workflow.json --cov-report=term-missing:skip-covered -q --tb=no
    • 2084 passed, 89 skipped
    • 9974 / 9974 statements covered, 100.00%, 0 missing
  • Ruff passed for every changed Python file.
  • Black passed for all changed production files.
  • git diff --check passed.
  • Both GitHub Actions workflow files parsed successfully as YAML.

OpenSwarm review

OpenSwarm returned REVISE. Its valid findings about pragma: no cover, incomplete untracked-test visibility, import ordering, and missing endpoint assertions were addressed. The final review's claimed --cov-fail-und typo is a false positive: the committed workflow contains the valid --cov-fail-under="${TARGET_COVERAGE}" option. The exact workflow-equivalent command above passes locally at 100%.

@github-actions

Copy link
Copy Markdown

📊 Coverage Analysis Report

Metric Value
Total Coverage 100.0%
Target Coverage 100%
Files Below Target 0

✅ All files meet the target coverage of 100%!

@unohee
unohee merged commit 084e2bb into main Jul 18, 2026
7 checks passed
@unohee
unohee deleted the agent/complete-test-coverage branch July 18, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant