test: raise integration coverage to 75%#1788
Merged
danielmeppiel merged 7 commits intoJun 16, 2026
Merged
Conversation
Add 1116 hermetic integration tests across 6 new test files targeting modules that were dragging overall coverage below the CI gate: - test_deps_registry_coverage.py (112 tests): registry client, resolver, auth, extractor, outdated, revision pins - test_commands_config_coverage.py (177 tests): config get/set/unset, update, self-update, publish commands - test_marketplace_adapters_coverage.py (114 tests): marketplace client, audit, PR integration, adapters (codex/kiro/hermes), archive utils - test_integration_runtime_coverage.py (179 tests): kiro hook integrator, LSP integrator, copilot app WS, instruction integrator, runtime manager - test_wave2_commands_coverage.py (111 tests): cache, runtime, policy, run commands, compile watcher, MCP registry, insecure policy, shared clone - test_wave2_adapters_coverage.py (423 tests): adapter base/claude/gemini, LSP models, marketplace migration/version-check, bundle packer, TUI, HTTP cache, reflink utils Integration coverage: 69.09% -> 75.67% Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds large hermetic integration-test suites intended to raise integration coverage without touching runtime code, primarily by exercising CLI commands and marketplace/registry helper logic via mocks.
Changes:
- Adds broad integration coverage for
apm cache,apm runtime,apm policy status,apm run,apm update, watcher debounce logic, and several deps/install helpers. - Adds coverage for marketplace client/audit/PR-integration and adapter config I/O behavior.
- Adds coverage for registry auth/client/resolver/outdated/extractor and revision-pin helpers.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
tests/integration/test_wave2_commands_coverage.py |
New hermetic integration tests for multiple CLI command paths + watcher + deps/install helpers. |
tests/integration/test_marketplace_adapters_coverage.py |
New hermetic integration tests for marketplace client/audit/PR integration, adapters, and archive utilities. |
tests/integration/test_deps_registry_coverage.py |
New hermetic integration tests for registry auth/client/resolver/outdated/extractor and revision-pin update helpers. |
- Replace non-ASCII arrows and section symbols with ASCII equivalents - Rewrite URL substring assertions to use urllib.parse hostname equality - Fix test exit code assertions per copilot-reviewer feedback - Use any(h == x for h in result) instead of 'x in result' for host lists Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI ruff version treats inline section comments as import-block separators, causing I001 isort violation. Consolidate all imports into a single sorted block. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CI lint fails with I001 because ruff cannot detect apm_cli as first-party on the merge commit (package not installed editable). Explicit known-first-party config makes detection deterministic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rewrite URL assertions in test_commands_config_coverage.py and test_wave2_adapters_coverage.py to use urllib.parse component equality instead of substring matching. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
danielmeppiel
added a commit
that referenced
this pull request
Jun 16, 2026
The merge queue surfaced two integration-test failures caused by semantic merge conflicts between #1766 (removed marketplace publish/pr_integration and the marketplace doctor alias) and #1788 (added a coverage test). - test_doctor_integration.py imported the doctor *module* (apm_cli.commands.marketplace.doctor) instead of the click command, which no longer exists as an alias after #1766. Point it at the top-level command apm_cli.commands.doctor.doctor, which wraps run_doctor. - test_marketplace_adapters_coverage.py imported the removed marketplace.pr_integration and marketplace.publisher modules (a collection-time ImportError). Drop those imports, their helper factories, and the pr_integration test section; the remaining adapters/ audit/client/archive coverage is unaffected. Co-authored-by: danielmeppiel <danielmeppiel@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raises integration test coverage from 69.09% to 75.67%, unblocking the merge queue which was gated at 70% (now targeting 75%).
Changes
Adds 1116 hermetic integration tests across 6 new test files:
test_deps_registry_coverage.pytest_commands_config_coverage.pytest_marketplace_adapters_coverage.pytest_integration_runtime_coverage.pytest_wave2_commands_coverage.pytest_wave2_adapters_coverage.pyKey improvements by module
deps/registry/outdated.pyintegration/kiro_hook_integrator.pydeps/registry/auth.pydeps/registry/client.pydeps/registry/resolver.pycommands/config.pycommands/publish.pyintegration/copilot_app_ws.pyruntime/copilot_runtime.pymodels/dependency/lsp.pyDesign principles
pytestmarkneeded (hermetic tests skip no gates)urllib.parse(never substring matching)