Skip to content

test: consolidate, classify and place the test corpus behind ratchet gates - #4137

Merged
Daniel Meppiel (danielmeppiel) merged 123 commits into
mainfrom
danielmeppiel-refactored-happiness
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 123 commits into
mainfrom
danielmeppiel-refactored-happiness

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Consolidates duplicate test copies under tests/unit root files and the small tests/unit subpackages (core, marketplace, policy, integration, adapters, cache, scripts, utils) plus tests/*.py. Work lands in reviewed waves, one commit per wave; this draft carries wave 1 (tests/unit/core) and grows as later waves are approved.

A test is deleted only when an equal copy is kept: identical normalized body (docstrings stripped, literals kept), decorators and parameters, signature with every fixture resolving to an identical definition and scope, class context, module pytestmark, every referenced module-level binding (transitively), and CI lane. Anything else is merged: its unique tests move into the surviving owner- or behavior-named file.

Issue and approved scope

Fixes #4081
Fixes #4082
Fixes #4083
Fixes #4028

This PR is the single consolidation PR for the test corpus work (duplicate consolidation, placement and classification, parametrize folds and weak-test strengthening, plus the remaining duplicate-gate rules).

Human scope-approval comment: #4082 (comment)

Does this PR complete the issue, or what remains? No. Other partitions (unit/deps + unit/install, unit/compilation + unit/commands, tests/integration, exact module copies) land in sibling PRs. Within this partition, files touched by open PRs are deferred to a later wave.

Waves

Wave Scope Equal copies deleted Moved (merged) Renamed Lines whose last covering test was lost
W1 tests/unit/core: script runner, token manager, auth 268 nodes 20 nodes 4 nodes 0
W2 tests/unit/marketplace, tests/unit/policy: marketplace commands, semver, policy discovery, inheritance 173 nodes 1 node (assertions folded) 0 0
W3 tests/unit root: copilot and codex adapters 178 nodes 43 nodes (1 folded) 0 0
W4 tests/unit root: models validation, registry operations, init, audit, view 236 nodes 21 nodes (2 folded, 3 subsumed) 0 0
W5 integrators, install pipeline, outdated, config precedence, smaller unit-root and tests/*.py modules 93 nodes 16 nodes 0 0

Owner ids touched: host-credential-resolution (transport-auth-platform), marketplace-catalog-freshness and marketplace-metadata-enrichment (marketplace-plugins), cached-policy-shape (contracts-tooling), copilot-cli-mcp-config-paths (hooks-integrations), onboarding-metadata-only (contracts-tooling), agent-plugin-package-projection and legacy-plugin-skill-membership (marketplace-plugins), mcp-target-selection-precedence and mcp-passthrough-denylist (hooks-integrations), read-only-lockfile-path (contracts-tooling), single-file-package-materialization (install-deployment). core/script_runner.py and marketplace/semver.py have no owner entry.

W1 details
  • tests/unit/core/test_script_runner_phase3.py: every test is an equal copy of one in test_script_runner_execution.py; file deleted.
  • tests/unit/core/test_token_manager_phase3.py: 89 equal copies of test_token_manager_lifecycle.py deleted (that survivor is not edited); the 4 unique get_token_env_var_for_purpose tests stay, and the file is renamed test_token_manager_purpose_env_var.py.
  • tests/unit/core/test_auth_phase3.py: 66 equal copies of test_auth_validation.py deleted; the 14 unique tests (20 nodes) move into the same-named classes of test_auth_validation.py. The classes, autouse fixtures and helpers are identical, so the moved tests run in the same context. TestNotifyAuthSource::test_empty_host_is_noop differs from the survivor's same-named test (it also asserts no echo with a verbose logger), so it moves as test_empty_host_with_verbose_logger_emits_nothing.
  • .github/ci-durations/{linux,windows}-unit.json: entries for deleted modules removed and the renamed module remapped.

Evidence

Consolidation evidence reviewed and approved by the test-corpus steward (per wave).

W5 (evidence): before 1629 nodes, after 1536; 109 removed = 93 equal copies + 16 merged; 0 unmapped. Covered lines 8044 before and after; lines_fell_to_zero: {}. Near-twins whose inputs differ (24 in test_outdated_phase3w5.py, 2 in test_install_pipeline_phase3w4.py) stay in place for #4083.

W4 (evidence): before 517 nodes, after 276; 257 removed = 236 equal copies + 21 merged; 0 unmapped. Covered lines 6632 before and after; lines_fell_to_zero: {}.

W3 (evidence): before 404 nodes, after 225; 221 removed = 178 equal copies + 43 merged; 0 unmapped. Covered lines 2109 before and after; lines_fell_to_zero: {}.

W2 (evidence): before 656 nodes, after 482; 174 removed = 173 equal copies + 1 merged (its two extra assertions folded into the survivor); 0 unmapped. Covered lines 5267 before and after; lines_fell_to_zero: {}. tests/unit/marketplace + tests/unit/policy: 3344 passed.

Each wave's evidence is posted as one PR comment, with collapsed sections holding:

  • the node-set diff: pytest --collect-only -q before and after, for every touched file;
  • the removed -> kept mapping: each removed node mapped to its kept twin (deleted-equal-copy), its new id (merged) or its renamed-file id. The tool fails if a mapped target is missing from the after set or if an added node has no source;
  • the coverage-context diff: touched tests run before and after with --cov=apm_cli --cov-context=test -n 0. Per-module covered-line sets are compared, and lines_fell_to_zero must be empty.

W1 (evidence): before 568 nodes, after 300; 292 removed = 268 equal copies + 20 merged + 4 renamed; 24 added (all merged or renamed); 0 unmapped. Covered lines 2687 before and 2687 after over 557 modules; lines_fell_to_zero: {}.

W4 subsumed pairs

Subsumed pairs (removed -> kept). Both sides share the same CI lane (tests/unit), no markers and no module pytestmark. Class TestDisplayPackageInfo has no bases, decorators or setup on either side, and the helpers _make_logger and _make_package_info are identical. Each survivor runs the same inputs through the same call; it differs only by a superset of assertions:

Removed Kept Survivor adds
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_rich_rendering_no_context_files tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_rich_rendering_no_context_files the capsys capture fixture (observation only) and asserts on "No context" and "No agent"
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_import_error_fallback_text tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_import_error_fallback_text 7 output asserts (both sides already request capsys)
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_no_project_root_skips_lockfile tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_no_project_root_skips_lockfile a spy patch on _lookup_lockfile_ref plus lookup.assert_not_called(); with project_root=None neither side reaches that function

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
Validation commands and results
  • uv run --extra dev python -m pytest -q -n 0 tests/unit/core: 1410 passed, 4 failed. These 4 failures already exist on main: they fail on unmodified main in this environment too (test_auth_credential_report::test_non_ado_helper_credential_is_never_reported, two test_git_transport_policy_matrix[generic-...] cases, test_public_github_anonymous_first::test_private_github_subdirectory_cache_retries_with_scoped_credential). Baseline on main: 1678 passed, 4 failed. The difference of 268 matches the deleted equal copies.
  • uv run --extra dev python -m pytest -q tests/quality: 206 passed.
  • ruff check and ruff format --check on src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py: clean.
  • pylint --disable=all --enable=R0801 --min-similarity-lines=10 --fail-on=R0801 on src/apm_cli/ and the same scripts: 10.00/10.
  • bash scripts/lint-auth-signals.sh: clean.
  • References to removed or renamed modules in tests/ scripts/ .github/ docs/: none.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Co-authored-by: Copilot [email protected]

… manager and auth tests

Delete equal copies from test_script_runner_phase3, test_token_manager_phase3
and test_auth_phase3 (kept twins in test_script_runner_execution,
test_token_manager_lifecycle and test_auth_validation). Move the 14 unique
auth tests into test_auth_validation and rename the remaining token manager
tests to test_token_manager_purpose_env_var. Remap CI duration seeds.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-refactored-happiness branch from 742d1ab to fb41e50 Compare November 20, 2026 08:20

Copy link
Copy Markdown
Collaborator Author

W1 (tests/unit/core) evidence: before 568 after 300 removed 292 added 24; removed = 268 deleted-equal-copy, 20 merged, 4 renamed-file; unmapped 0. Covered lines 2687 before, 2687 after across 557 modules; lines whose covering-context count fell to zero: 0.

Node-set diff (pytest --collect-only -q, before vs after)
before=568 after=300 removed=292 added=24

- tests/unit/core/test_auth_phase3.py (93 removed)
    TestAuthContextConstruction::test_fields_accessible
    TestAuthContextConstruction::test_repr_hides_token
    TestBuildErrorContextNonADO::test_always_mentions_verbose_flag
    TestBuildErrorContextNonADO::test_generic_host_with_token_mentions_credential_helper
    TestBuildErrorContextNonADO::test_generic_host_without_token_mentions_git_credential_fill
    TestBuildErrorContextNonADO::test_ghe_cloud_with_token_mentions_enterprise_scoped
    TestBuildErrorContextNonADO::test_github_com_with_token_mentions_saml
    TestBuildErrorContextNonADO::test_github_com_without_token_suggests_github_token
    TestBuildErrorContextNonADO::test_gitlab_com_with_token_mentions_gitlab_guidance
    TestBuildErrorContextNonADO::test_gitlab_com_without_token_suggests_gitlab_pat
    TestBuildErrorContextNonADO::test_host_with_port_appends_port_hint
    TestBuildGitEnvNoToken::test_github_bearer_token_uses_header_transport
    TestBuildGitEnvNoToken::test_no_token_still_sets_terminal_prompt_off
    TestClassifyHostGhes::test_ghes_host_env_must_match_exactly
    TestClassifyHostGhes::test_ghes_host_github_com_excluded
    TestClassifyHostGhes::test_invalid_fqdn_falls_through_to_generic
    TestDetectTokenType::test_token_prefixes[-unknown]
    TestDetectTokenType::test_token_prefixes[gho_oauthapp-oauth]
    TestDetectTokenType::test_token_prefixes[ghp_classicpat-classic]
    TestDetectTokenType::test_token_prefixes[ghr_refreshtoken-github-app]
    TestDetectTokenType::test_token_prefixes[ghs_appinstall-github-app]
    TestDetectTokenType::test_token_prefixes[ghu_oauthuser-oauth]
    TestDetectTokenType::test_token_prefixes[github_pat_abc-fine-grained]
    TestDetectTokenType::test_token_prefixes[some_random_token-unknown]
    TestDiagnosticsOrNone::test_logger_with_diagnostics_returns_it
    TestDiagnosticsOrNone::test_logger_without_diagnostics_attr_returns_none
    TestDiagnosticsOrNone::test_no_logger_returns_none
    TestEmitStalePATDiagnosticWithLogger::test_emits_only_once_per_host_with_logger
    TestEmitStalePATDiagnosticWithLogger::test_emits_via_diagnostics_when_logger_wired
    TestEmitStalePATDiagnosticWithLogger::test_private_alias_works
    TestGitlabRestHeaders::test_returns_bearer_header_when_oauth_bearer
    TestGitlabRestHeaders::test_returns_empty_dict_when_no_token
    TestGitlabRestHeaders::test_returns_private_token_header_by_default
    TestHostInfoDisplayName::test_no_port_returns_bare_host
    TestHostInfoDisplayName::test_non_standard_port_appends_port
    TestHostInfoDisplayName::test_port_7999_included
    TestHostInfoDisplayName::test_well_known_port_22_suppressed
    TestHostInfoDisplayName::test_well_known_port_443_suppressed
    TestHostInfoDisplayName::test_well_known_port_80_suppressed
    TestIdentifyEnvSource::test_returns_env_when_none_set
    TestIdentifyEnvSource::test_returns_var_name_when_set
    TestNotifyAuthSource::test_bearer_scheme_emits_bearer_message
    TestNotifyAuthSource::test_ctx_none_is_noop
    TestNotifyAuthSource::test_dedup_same_host
    TestNotifyAuthSource::test_empty_host_is_noop
    TestNotifyAuthSource::test_source_none_is_noop
    TestNotifyAuthSource::test_with_verbose_logger_routes_via_rich_echo
    TestOrgToEnvSuffix::test_hyphen_becomes_underscore
    TestOrgToEnvSuffix::test_mixed_case
    TestOrgToEnvSuffix::test_multiple_hyphens
    TestOrgToEnvSuffix::test_simple_org
    TestPurposeForHost::test_ado_host
    TestPurposeForHost::test_generic_host
    TestPurposeForHost::test_github_host
    TestPurposeForHost::test_gitlab_host
    TestResolveCache::test_cache_hit_returns_same_object
    TestResolveCache::test_case_insensitive_host
    TestResolveCache::test_same_host_different_orgs_are_different_keys
    TestResolveCache::test_same_host_different_ports_are_different_keys
    TestResolveForDep::test_nested_host_in_virtual_path_does_not_reroute_credentials
    TestResolveForDep::test_resolve_for_dep_extracts_org_from_repo_url
    TestResolveForDep::test_resolve_for_dep_no_repo_url_no_org
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[acme.visualstudio.com/project/_git/repo-env4-ADO_APM_PAT]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[bitbucket.org/team/repo-env6-git-credential-fill]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/My%20Project/_git/repo-env3-ADO_APM_PAT]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/project/repo-env2-ADO_APM_PAT]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.com/acme/repo-env0-GITHUB_APM_PAT_ACME]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.corp.example.com/acme/repo-env1-GITHUB_APM_PAT_ACME]
    TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[gitlab.corp.example.com/group/subgroup/repo-env5-GITLAB_APM_PAT]
    TestResolveForDep::test_resolve_for_dep_threads_host_type
    TestResolveForDep::test_resolve_for_dep_threads_port
    TestResolveForDep::test_resolve_for_dep_uses_host
    TestResolveForDep::test_unknown_platform_package_host_resolves_no_credential_source
    TestResolveThreadSafety::test_concurrent_resolves_produce_same_context
    TestSetLogger::test_set_logger_idempotent
    TestSetLogger::test_set_logger_overwrites
    TestTryWithFallbackAuthFirst::test_auth_fails_then_unauthenticated_succeeds
    TestTryWithFallbackAuthFirst::test_verbose_callback_is_invoked
    TestTryWithFallbackCredentialChain::test_ado_empty_fill_logs_and_wraps_terminal_error
    TestTryWithFallbackCredentialChain::test_ado_fill_auth_failure_is_wrapped
    TestTryWithFallbackCredentialChain::test_ado_fill_non_auth_failure_is_not_wrapped
    TestTryWithFallbackCredentialChain::test_ado_network_failure_does_not_probe_credential_helper
    TestTryWithFallbackCredentialChain::test_ado_rejected_bearer_falls_back_to_repository_credential
    TestTryWithFallbackCredentialChain::test_ado_server_exhausted_omits_az_login
    TestTryWithFallbackCredentialChain::test_ado_services_exhausted_names_only_attempted_steps
    TestTryWithFallbackCredentialChain::test_ado_tf401_does_not_probe_credential_helper
    TestTryWithFallbackCredentialChain::test_ado_wrapped_git_stderr_falls_back_to_repository_credential
    TestTryWithFallbackCredentialChain::test_credential_fill_fallback_skipped_for_secondary_source
    TestTryWithFallbackGheCloud::test_ghe_cloud_auth_only_success
    TestTryWithFallbackUnauthFirst::test_no_token_calls_operation_unauthenticated
    TestTryWithFallbackUnauthFirst::test_unauth_first_fallback_to_token_when_unauth_fails
    TestTryWithFallbackUnauthFirst::test_unauth_first_no_token_re_raises
    TestTryWithFallbackUnauthFirst::test_unauth_first_succeeds_on_first_try
- tests/unit/core/test_script_runner_phase3.py (106 removed)
    TestAddDependencyToConfig::test_adds_new_dependency
    TestAddDependencyToConfig::test_no_duplicate_dependency
    TestAddDependencyToConfig::test_no_op_when_no_apm_yml
    TestAutoCompilePrompts::test_compiles_prompt_file_in_command
    TestAutoCompilePrompts::test_no_prompt_files_returns_unchanged
    TestAutoCompilePrompts::test_runtime_content_none_for_non_runtime_cmd
    TestAutoCompilePrompts::test_runtime_content_set_for_runtime_cmd
    TestAutoInstallVirtualPackage::test_returns_false_on_exception
    TestAutoInstallVirtualPackage::test_returns_false_when_not_virtual
    TestAutoInstallVirtualPackage::test_returns_true_on_success
    TestBuildCommands::test_build_codex_no_args
    TestBuildCommands::test_build_codex_with_after
    TestBuildCommands::test_build_codex_with_before
    TestBuildCommands::test_build_codex_with_env_prefix
    TestBuildCommands::test_build_copilot_no_args
    TestBuildCommands::test_build_copilot_strips_p_flag
    TestBuildCommands::test_build_copilot_with_env_prefix
    TestBuildCommands::test_build_gemini_no_args
    TestBuildCommands::test_build_gemini_strips_p_flag
    TestBuildCommands::test_build_gemini_with_env_prefix
    TestBuildCommands::test_build_llm_no_args
    TestBuildCommands::test_build_llm_with_env_prefix
    TestBuildCommands::test_build_llm_with_model
    TestCollectDependencyDirs::test_returns_empty_when_no_apm_modules
    TestCollectDependencyDirs::test_returns_tuples_for_repos
    TestCollectDependencyDirs::test_skips_hidden_directories
    TestCreateMinimalConfig::test_created_config_has_version
    TestCreateMinimalConfig::test_creates_apm_yml
    TestDetectInstalledRuntime::test_detects_codex_when_no_copilot
    TestDetectInstalledRuntime::test_detects_copilot_first
    TestDetectInstalledRuntime::test_detects_gemini_when_no_copilot_or_codex
    TestDetectInstalledRuntime::test_raises_when_no_runtime_found
    TestDiscoverPromptFileDependencies::test_detects_collision_and_raises
    TestDiscoverPromptFileDependencies::test_finds_in_dependency_apm_prompts
    TestDiscoverPromptFileDependencies::test_finds_skill_md_in_dep
    TestDiscoverPromptFileLocal::test_finds_in_apm_prompts_dir
    TestDiscoverPromptFileLocal::test_finds_in_github_prompts_dir
    TestDiscoverPromptFileLocal::test_finds_in_root
    TestDiscoverPromptFileLocal::test_qualified_path_delegates
    TestDiscoverPromptFileLocal::test_returns_none_when_not_found
    TestDiscoverPromptFileLocal::test_skips_symlinks
    TestDiscoverQualifiedPrompt::test_finds_prompt_md
    TestDiscoverQualifiedPrompt::test_finds_skill_md
    TestDiscoverQualifiedPrompt::test_returns_none_for_too_short_qualified
    TestDiscoverQualifiedPrompt::test_returns_none_when_no_apm_modules
    TestDiscoverQualifiedPrompt::test_returns_none_when_owner_not_found
    TestExecuteRuntimeCommandRuntimes::test_binary_resolved
    TestExecuteRuntimeCommandRuntimes::test_codex_appends_content
    TestExecuteRuntimeCommandRuntimes::test_copilot_uses_p_flag
    TestExecuteRuntimeCommandRuntimes::test_gemini_uses_p_flag
    TestExecuteRuntimeCommandRuntimes::test_llm_appends_content
    TestExecuteScriptCommand::test_raises_on_command_failure
    TestExecuteScriptCommand::test_runtime_execution_when_runtime_content_present
    TestExecuteScriptCommand::test_shell_execution_when_no_runtime_content
    TestGenerateRuntimeCommand::test_codex_command
    TestGenerateRuntimeCommand::test_copilot_command
    TestGenerateRuntimeCommand::test_gemini_command
    TestGenerateRuntimeCommand::test_unsupported_runtime_raises
    TestHandlePromptCollision::test_error_contains_qualified_paths
    TestHandlePromptCollision::test_raises_runtime_error_with_matches
    TestIsVirtualPackageReference::test_no_slash_returns_false
    TestIsVirtualPackageReference::test_parse_exception_returns_false
    TestIsVirtualPackageReference::test_simple_name_not_virtual
    TestIsVirtualPackageReference::test_virtual_file_reference
    TestListScripts::test_returns_empty_when_no_config
    TestListScripts::test_returns_empty_when_no_scripts_key
    TestListScripts::test_returns_scripts_from_config
    TestLoadConfig::test_returns_dict_when_apm_yml_exists
    TestLoadConfig::test_returns_none_when_no_apm_yml
    TestMatchesQualifiedPath::test_match_with_owner_and_name
    TestMatchesQualifiedPath::test_no_match_different_file
    TestMatchesQualifiedPath::test_no_match_different_owner
    TestParseAndBuildRuntimeCommand::test_codex_no_args
    TestParseAndBuildRuntimeCommand::test_codex_with_flag_before
    TestParseAndBuildRuntimeCommand::test_copilot_no_args
    TestParseAndBuildRuntimeCommand::test_env_prefix_strips_p_flag_for_copilot
    TestParseAndBuildRuntimeCommand::test_env_prefix_with_codex
    TestParseAndBuildRuntimeCommand::test_gemini_no_args
    TestParseAndBuildRuntimeCommand::test_llm_no_args
    TestParseAndBuildRuntimeCommand::test_llm_with_env_prefix_strips_p_flag
    TestParseAndBuildRuntimeCommand::test_returns_none_when_no_match
    TestPromptCompilerCompile::test_compile_creates_output_dir
    TestPromptCompilerCompile::test_compile_no_params
    TestPromptCompilerCompile::test_compile_output_filename
    TestPromptCompilerCompile::test_compile_params_substitution
    TestPromptCompilerCompile::test_compile_raises_for_missing_file
    TestPromptCompilerCompile::test_compile_with_frontmatter
    TestPromptCompilerCompile::test_compile_without_frontmatter
    TestRaisePromptNotFound::test_includes_apm_install_tip
    TestRaisePromptNotFound::test_includes_dep_dirs_in_message
    TestRaisePromptNotFound::test_raises_file_not_found_error
    TestResolvePromptFileExtended::test_finds_in_apm_prompts
    TestResolvePromptFileExtended::test_finds_in_github_prompts
    TestResolvePromptFileExtended::test_not_found_raises_file_not_found
    TestResolvePromptFileExtended::test_rejects_symlink
    TestRunScript::test_auto_discover_runs_when_no_explicit_script
    TestRunScript::test_creates_minimal_config_for_virtual_package
    TestRunScript::test_not_found_raises_runtime_error
    TestRunScript::test_raises_without_apm_yml_and_non_virtual
    TestRunScript::test_uses_explicit_script_when_present
    TestScriptRunnerInit::test_custom_compiler_accepted
    TestScriptRunnerInit::test_default_compiler_created
    TestScriptRunnerInit::test_use_color_stored
    TestSubstituteParametersEdgeCases::test_empty_content
    TestSubstituteParametersEdgeCases::test_multiple_occurrences
    TestSubstituteParametersEdgeCases::test_partial_placeholder_unchanged
- tests/unit/core/test_token_manager_phase3.py (93 removed)
    TestFormatCredentialHost::test_custom_port_is_embedded
    TestFormatCredentialHost::test_no_port_returns_host_only
    TestFormatCredentialHost::test_port_zero_is_embedded
    TestFormatCredentialHost::test_standard_port_is_embedded
    TestGetCredentialTimeout::test_default_when_not_set
    TestGetCredentialTimeout::test_invalid_value_falls_back_to_default
    TestGetCredentialTimeout::test_negative_value_clamped_to_one
    TestGetCredentialTimeout::test_valid_value_respected
    TestGetCredentialTimeout::test_value_clamped_to_max
    TestGetCredentialTimeout::test_value_clamped_to_min
    TestGetTokenEnvVarForPurpose::test_mcp_compatibility_fallback_is_not_a_general_purpose_source
    TestGetTokenEnvVarForPurpose::test_returns_none_when_no_variable_is_selected
    TestGetTokenEnvVarForPurpose::test_returns_selected_variable_without_exposing_value
    TestGetTokenEnvVarForPurpose::test_unknown_purpose_raises_value_error
    TestGetTokenForPurpose::test_ado_modules_purpose
    TestGetTokenForPurpose::test_returns_fallback_env_var
    TestGetTokenForPurpose::test_returns_first_matching_env_var
    TestGetTokenForPurpose::test_returns_none_when_no_env_var
    TestGetTokenForPurpose::test_unknown_purpose_raises_value_error
    TestGetTokenWithCredentialFallback::test_cache_hit_returns_cached_value
    TestGetTokenWithCredentialFallback::test_env_token_wins_without_subprocess
    TestGetTokenWithCredentialFallback::test_gh_cli_fallback_on_github_host
    TestGetTokenWithCredentialFallback::test_git_credential_fallback
    TestGetTokenWithCredentialFallback::test_none_is_cached_when_no_credential_found
    TestGetTokenWithCredentialFallback::test_port_is_part_of_cache_key
    TestIsValidCredentialToken::test_empty_string_is_invalid
    TestIsValidCredentialToken::test_lower_prompt_password_for_is_invalid
    TestIsValidCredentialToken::test_lower_prompt_username_for_is_invalid
    TestIsValidCredentialToken::test_normal_pat_is_valid
    TestIsValidCredentialToken::test_prompt_password_for_is_invalid
    TestIsValidCredentialToken::test_prompt_username_for_is_invalid
    TestIsValidCredentialToken::test_token_exactly_1024_bytes_is_valid
    TestIsValidCredentialToken::test_token_over_1024_bytes_is_invalid
    TestIsValidCredentialToken::test_token_with_carriage_return_is_invalid
    TestIsValidCredentialToken::test_token_with_newline_is_invalid
    TestIsValidCredentialToken::test_token_with_space_is_invalid
    TestIsValidCredentialToken::test_token_with_tab_is_invalid
    TestModuleLevelHelpers::test_get_github_token_for_runtime_codex
    TestModuleLevelHelpers::test_get_github_token_for_runtime_copilot
    TestModuleLevelHelpers::test_get_github_token_for_runtime_llm
    TestModuleLevelHelpers::test_get_github_token_for_runtime_unknown_raises
    TestModuleLevelHelpers::test_setup_runtime_environment_returns_dict
    TestModuleLevelHelpers::test_validate_github_tokens_delegates_to_manager
    TestModuleLevelHelpers::test_validate_github_tokens_no_tokens
    TestResolveCredentialFromGhCli::test_returns_none_on_file_not_found
    TestResolveCredentialFromGhCli::test_returns_none_on_invalid_token
    TestResolveCredentialFromGhCli::test_returns_none_on_nonzero_exit
    TestResolveCredentialFromGhCli::test_returns_none_on_timeout
    TestResolveCredentialFromGhCli::test_returns_token_on_success
    TestResolveCredentialFromGhCli::test_unsupported_host_returns_none_without_subprocess
    TestResolveCredentialFromGit::test_invalid_path_sanitized_away
    TestResolveCredentialFromGit::test_path_parameter_included_in_request
    TestResolveCredentialFromGit::test_port_embedded_in_host_field
    TestResolveCredentialFromGit::test_returns_none_on_file_not_found
    TestResolveCredentialFromGit::test_returns_none_on_nonzero_exit
    TestResolveCredentialFromGit::test_returns_none_on_os_error
    TestResolveCredentialFromGit::test_returns_none_on_timeout
    TestResolveCredentialFromGit::test_returns_none_when_no_password_line
    TestResolveCredentialFromGit::test_returns_none_when_password_is_invalid
    TestResolveCredentialFromGit::test_returns_token_on_success
    TestSanitizeCredentialPath::test_control_char_newline_returns_empty
    TestSanitizeCredentialPath::test_control_char_tab_returns_empty
    TestSanitizeCredentialPath::test_data_scheme_returns_empty
    TestSanitizeCredentialPath::test_del_char_returns_empty
    TestSanitizeCredentialPath::test_disallowed_scheme_returns_empty
    TestSanitizeCredentialPath::test_empty_string_returns_empty
    TestSanitizeCredentialPath::test_http_url_extracts_path
    TestSanitizeCredentialPath::test_https_url_extracts_path
    TestSanitizeCredentialPath::test_javascript_scheme_returns_empty
    TestSanitizeCredentialPath::test_leading_slash_is_stripped
    TestSanitizeCredentialPath::test_low_control_char_returns_empty
    TestSanitizeCredentialPath::test_normal_owner_repo_is_preserved
    TestSanitizeCredentialPath::test_only_slash_returns_empty
    TestSanitizeCredentialPath::test_space_inside_returns_empty
    TestSanitizeCredentialPath::test_ssh_url_extracts_path
    TestSetupEnvironment::test_copilot_token_set_when_missing
    TestSetupEnvironment::test_llm_github_models_key_set
    TestSetupEnvironment::test_llm_preserve_existing_github_models_key
    TestSetupEnvironment::test_no_copilot_token_skips_copilot_vars
    TestSetupEnvironment::test_preserve_existing_does_not_overwrite
    TestSetupEnvironment::test_returns_copy_of_os_environ_when_none_passed
    TestSupportsGhCliHost::test_ado_hostname_returns_false
    TestSupportsGhCliHost::test_configured_ghes_host_that_matches_returns_true
    TestSupportsGhCliHost::test_configured_host_equal_to_github_com_returns_false
    TestSupportsGhCliHost::test_empty_string_returns_false
    TestSupportsGhCliHost::test_github_com_returns_true
    TestSupportsGhCliHost::test_none_returns_false
    TestSupportsGhCliHost::test_unrelated_fqdn_returns_false
    TestValidateTokens::test_ado_pat_only_passes_validation
    TestValidateTokens::test_copilot_pat_is_valid
    TestValidateTokens::test_github_token_present_returns_true
    TestValidateTokens::test_no_tokens_returns_false
    TestValidateTokens::test_only_apm_pat_is_valid

added (24; every one is a merged or renamed node listed in the mapping):
+ tests/unit/core/test_auth_validation.py::TestNotifyAuthSource::test_empty_host_with_verbose_logger_emits_nothing
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_nested_host_in_virtual_path_does_not_reroute_credentials
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[acme.visualstudio.com/project/_git/repo-env4-ADO_APM_PAT]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[bitbucket.org/team/repo-env6-git-credential-fill]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/My%20Project/_git/repo-env3-ADO_APM_PAT]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/project/repo-env2-ADO_APM_PAT]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.com/acme/repo-env0-GITHUB_APM_PAT_ACME]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.corp.example.com/acme/repo-env1-GITHUB_APM_PAT_ACME]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[gitlab.corp.example.com/group/subgroup/repo-env5-GITLAB_APM_PAT]
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_resolve_for_dep_threads_host_type
+ tests/unit/core/test_auth_validation.py::TestResolveForDep::test_unknown_platform_package_host_resolves_no_credential_source
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_empty_fill_logs_and_wraps_terminal_error
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_fill_auth_failure_is_wrapped
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_fill_non_auth_failure_is_not_wrapped
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_network_failure_does_not_probe_credential_helper
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_rejected_bearer_falls_back_to_repository_credential
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_server_exhausted_omits_az_login
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_services_exhausted_names_only_attempted_steps
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_tf401_does_not_probe_credential_helper
+ tests/unit/core/test_auth_validation.py::TestTryWithFallbackCredentialChain::test_ado_wrapped_git_stderr_falls_back_to_repository_credential
+ tests/unit/core/test_token_manager_purpose_env_var.py::TestGetTokenEnvVarForPurpose::test_mcp_compatibility_fallback_is_not_a_general_purpose_source
+ tests/unit/core/test_token_manager_purpose_env_var.py::TestGetTokenEnvVarForPurpose::test_returns_none_when_no_variable_is_selected
+ tests/unit/core/test_token_manager_purpose_env_var.py::TestGetTokenEnvVarForPurpose::test_returns_selected_variable_without_exposing_value
+ tests/unit/core/test_token_manager_purpose_env_var.py::TestGetTokenEnvVarForPurpose::test_unknown_purpose_raises_value_error
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/core/test_auth_phase3.py -> tests/unit/core/test_auth_validation.py (deleted-equal-copy)": [
  "TestAuthContextConstruction::test_fields_accessible",
  "TestAuthContextConstruction::test_repr_hides_token",
  "TestBuildErrorContextNonADO::test_always_mentions_verbose_flag",
  "TestBuildErrorContextNonADO::test_generic_host_with_token_mentions_credential_helper",
  "TestBuildErrorContextNonADO::test_generic_host_without_token_mentions_git_credential_fill",
  "TestBuildErrorContextNonADO::test_ghe_cloud_with_token_mentions_enterprise_scoped",
  "TestBuildErrorContextNonADO::test_github_com_with_token_mentions_saml",
  "TestBuildErrorContextNonADO::test_github_com_without_token_suggests_github_token",
  "TestBuildErrorContextNonADO::test_gitlab_com_with_token_mentions_gitlab_guidance",
  "TestBuildErrorContextNonADO::test_gitlab_com_without_token_suggests_gitlab_pat",
  "TestBuildErrorContextNonADO::test_host_with_port_appends_port_hint",
  "TestBuildGitEnvNoToken::test_github_bearer_token_uses_header_transport",
  "TestBuildGitEnvNoToken::test_no_token_still_sets_terminal_prompt_off",
  "TestClassifyHostGhes::test_ghes_host_env_must_match_exactly",
  "TestClassifyHostGhes::test_ghes_host_github_com_excluded",
  "TestClassifyHostGhes::test_invalid_fqdn_falls_through_to_generic",
  "TestDetectTokenType::test_token_prefixes[-unknown]",
  "TestDetectTokenType::test_token_prefixes[gho_oauthapp-oauth]",
  "TestDetectTokenType::test_token_prefixes[ghp_classicpat-classic]",
  "TestDetectTokenType::test_token_prefixes[ghr_refreshtoken-github-app]",
  "TestDetectTokenType::test_token_prefixes[ghs_appinstall-github-app]",
  "TestDetectTokenType::test_token_prefixes[ghu_oauthuser-oauth]",
  "TestDetectTokenType::test_token_prefixes[github_pat_abc-fine-grained]",
  "TestDetectTokenType::test_token_prefixes[some_random_token-unknown]",
  "TestDiagnosticsOrNone::test_logger_with_diagnostics_returns_it",
  "TestDiagnosticsOrNone::test_logger_without_diagnostics_attr_returns_none",
  "TestDiagnosticsOrNone::test_no_logger_returns_none",
  "TestEmitStalePATDiagnosticWithLogger::test_emits_only_once_per_host_with_logger",
  "TestEmitStalePATDiagnosticWithLogger::test_emits_via_diagnostics_when_logger_wired",
  "TestEmitStalePATDiagnosticWithLogger::test_private_alias_works",
  "TestGitlabRestHeaders::test_returns_bearer_header_when_oauth_bearer",
  "TestGitlabRestHeaders::test_returns_empty_dict_when_no_token",
  "TestGitlabRestHeaders::test_returns_private_token_header_by_default",
  "TestHostInfoDisplayName::test_no_port_returns_bare_host",
  "TestHostInfoDisplayName::test_non_standard_port_appends_port",
  "TestHostInfoDisplayName::test_port_7999_included",
  "TestHostInfoDisplayName::test_well_known_port_22_suppressed",
  "TestHostInfoDisplayName::test_well_known_port_443_suppressed",
  "TestHostInfoDisplayName::test_well_known_port_80_suppressed",
  "TestIdentifyEnvSource::test_returns_env_when_none_set",
  "TestIdentifyEnvSource::test_returns_var_name_when_set",
  "TestNotifyAuthSource::test_bearer_scheme_emits_bearer_message",
  "TestNotifyAuthSource::test_ctx_none_is_noop",
  "TestNotifyAuthSource::test_dedup_same_host",
  "TestNotifyAuthSource::test_source_none_is_noop",
  "TestNotifyAuthSource::test_with_verbose_logger_routes_via_rich_echo",
  "TestOrgToEnvSuffix::test_hyphen_becomes_underscore",
  "TestOrgToEnvSuffix::test_mixed_case",
  "TestOrgToEnvSuffix::test_multiple_hyphens",
  "TestOrgToEnvSuffix::test_simple_org",
  "TestPurposeForHost::test_ado_host",
  "TestPurposeForHost::test_generic_host",
  "TestPurposeForHost::test_github_host",
  "TestPurposeForHost::test_gitlab_host",
  "TestResolveCache::test_cache_hit_returns_same_object",
  "TestResolveCache::test_case_insensitive_host",
  "TestResolveCache::test_same_host_different_orgs_are_different_keys",
  "TestResolveCache::test_same_host_different_ports_are_different_keys",
  "TestResolveForDep::test_resolve_for_dep_extracts_org_from_repo_url",
  "TestResolveForDep::test_resolve_for_dep_no_repo_url_no_org",
  "TestResolveForDep::test_resolve_for_dep_threads_port",
  "TestResolveForDep::test_resolve_for_dep_uses_host",
  "TestResolveThreadSafety::test_concurrent_resolves_produce_same_context",
  "TestSetLogger::test_set_logger_idempotent",
  "TestSetLogger::test_set_logger_overwrites",
  "TestTryWithFallbackAuthFirst::test_auth_fails_then_unauthenticated_succeeds",
  "TestTryWithFallbackAuthFirst::test_verbose_callback_is_invoked",
  "TestTryWithFallbackCredentialChain::test_credential_fill_fallback_skipped_for_secondary_source",
  "TestTryWithFallbackGheCloud::test_ghe_cloud_auth_only_success",
  "TestTryWithFallbackUnauthFirst::test_no_token_calls_operation_unauthenticated",
  "TestTryWithFallbackUnauthFirst::test_unauth_first_fallback_to_token_when_unauth_fails",
  "TestTryWithFallbackUnauthFirst::test_unauth_first_no_token_re_raises",
  "TestTryWithFallbackUnauthFirst::test_unauth_first_succeeds_on_first_try"
 ],
 "tests/unit/core/test_auth_phase3.py -> tests/unit/core/test_auth_validation.py (merged)": [
  "TestNotifyAuthSource::test_empty_host_is_noop -> TestNotifyAuthSource::test_empty_host_with_verbose_logger_emits_nothing",
  "TestResolveForDep::test_nested_host_in_virtual_path_does_not_reroute_credentials",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[acme.visualstudio.com/project/_git/repo-env4-ADO_APM_PAT]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[bitbucket.org/team/repo-env6-git-credential-fill]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/My%20Project/_git/repo-env3-ADO_APM_PAT]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[dev.azure.com/acme/project/repo-env2-ADO_APM_PAT]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.com/acme/repo-env0-GITHUB_APM_PAT_ACME]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[github.corp.example.com/acme/repo-env1-GITHUB_APM_PAT_ACME]",
  "TestResolveForDep::test_resolve_for_dep_preserves_credential_source_by_host_shape[gitlab.corp.example.com/group/subgroup/repo-env5-GITLAB_APM_PAT]",
  "TestResolveForDep::test_resolve_for_dep_threads_host_type",
  "TestResolveForDep::test_unknown_platform_package_host_resolves_no_credential_source",
  "TestTryWithFallbackCredentialChain::test_ado_empty_fill_logs_and_wraps_terminal_error",
  "TestTryWithFallbackCredentialChain::test_ado_fill_auth_failure_is_wrapped",
  "TestTryWithFallbackCredentialChain::test_ado_fill_non_auth_failure_is_not_wrapped",
  "TestTryWithFallbackCredentialChain::test_ado_network_failure_does_not_probe_credential_helper",
  "TestTryWithFallbackCredentialChain::test_ado_rejected_bearer_falls_back_to_repository_credential",
  "TestTryWithFallbackCredentialChain::test_ado_server_exhausted_omits_az_login",
  "TestTryWithFallbackCredentialChain::test_ado_services_exhausted_names_only_attempted_steps",
  "TestTryWithFallbackCredentialChain::test_ado_tf401_does_not_probe_credential_helper",
  "TestTryWithFallbackCredentialChain::test_ado_wrapped_git_stderr_falls_back_to_repository_credential"
 ],
 "tests/unit/core/test_script_runner_phase3.py -> tests/unit/core/test_script_runner_execution.py (deleted-equal-copy)": [
  "TestAddDependencyToConfig::test_adds_new_dependency",
  "TestAddDependencyToConfig::test_no_duplicate_dependency",
  "TestAddDependencyToConfig::test_no_op_when_no_apm_yml",
  "TestAutoCompilePrompts::test_compiles_prompt_file_in_command",
  "TestAutoCompilePrompts::test_no_prompt_files_returns_unchanged",
  "TestAutoCompilePrompts::test_runtime_content_none_for_non_runtime_cmd",
  "TestAutoCompilePrompts::test_runtime_content_set_for_runtime_cmd",
  "TestAutoInstallVirtualPackage::test_returns_false_on_exception",
  "TestAutoInstallVirtualPackage::test_returns_false_when_not_virtual",
  "TestAutoInstallVirtualPackage::test_returns_true_on_success",
  "TestBuildCommands::test_build_codex_no_args",
  "TestBuildCommands::test_build_codex_with_after",
  "TestBuildCommands::test_build_codex_with_before",
  "TestBuildCommands::test_build_codex_with_env_prefix",
  "TestBuildCommands::test_build_copilot_no_args",
  "TestBuildCommands::test_build_copilot_strips_p_flag",
  "TestBuildCommands::test_build_copilot_with_env_prefix",
  "TestBuildCommands::test_build_gemini_no_args",
  "TestBuildCommands::test_build_gemini_strips_p_flag",
  "TestBuildCommands::test_build_gemini_with_env_prefix",
  "TestBuildCommands::test_build_llm_no_args",
  "TestBuildCommands::test_build_llm_with_env_prefix",
  "TestBuildCommands::test_build_llm_with_model",
  "TestCollectDependencyDirs::test_returns_empty_when_no_apm_modules",
  "TestCollectDependencyDirs::test_returns_tuples_for_repos",
  "TestCollectDependencyDirs::test_skips_hidden_directories",
  "TestCreateMinimalConfig::test_created_config_has_version",
  "TestCreateMinimalConfig::test_creates_apm_yml",
  "TestDetectInstalledRuntime::test_detects_codex_when_no_copilot",
  "TestDetectInstalledRuntime::test_detects_copilot_first",
  "TestDetectInstalledRuntime::test_detects_gemini_when_no_copilot_or_codex",
  "TestDetectInstalledRuntime::test_raises_when_no_runtime_found",
  "TestDiscoverPromptFileDependencies::test_detects_collision_and_raises",
  "TestDiscoverPromptFileDependencies::test_finds_in_dependency_apm_prompts",
  "TestDiscoverPromptFileDependencies::test_finds_skill_md_in_dep",
  "TestDiscoverPromptFileLocal::test_finds_in_apm_prompts_dir",
  "TestDiscoverPromptFileLocal::test_finds_in_github_prompts_dir",
  "TestDiscoverPromptFileLocal::test_finds_in_root",
  "TestDiscoverPromptFileLocal::test_qualified_path_delegates",
  "TestDiscoverPromptFileLocal::test_returns_none_when_not_found",
  "TestDiscoverPromptFileLocal::test_skips_symlinks",
  "TestDiscoverQualifiedPrompt::test_finds_prompt_md",
  "TestDiscoverQualifiedPrompt::test_finds_skill_md",
  "TestDiscoverQualifiedPrompt::test_returns_none_for_too_short_qualified",
  "TestDiscoverQualifiedPrompt::test_returns_none_when_no_apm_modules",
  "TestDiscoverQualifiedPrompt::test_returns_none_when_owner_not_found",
  "TestExecuteRuntimeCommandRuntimes::test_binary_resolved",
  "TestExecuteRuntimeCommandRuntimes::test_codex_appends_content",
  "TestExecuteRuntimeCommandRuntimes::test_copilot_uses_p_flag",
  "TestExecuteRuntimeCommandRuntimes::test_gemini_uses_p_flag",
  "TestExecuteRuntimeCommandRuntimes::test_llm_appends_content",
  "TestExecuteScriptCommand::test_raises_on_command_failure",
  "TestExecuteScriptCommand::test_runtime_execution_when_runtime_content_present",
  "TestExecuteScriptCommand::test_shell_execution_when_no_runtime_content",
  "TestGenerateRuntimeCommand::test_codex_command",
  "TestGenerateRuntimeCommand::test_copilot_command",
  "TestGenerateRuntimeCommand::test_gemini_command",
  "TestGenerateRuntimeCommand::test_unsupported_runtime_raises",
  "TestHandlePromptCollision::test_error_contains_qualified_paths",
  "TestHandlePromptCollision::test_raises_runtime_error_with_matches",
  "TestIsVirtualPackageReference::test_no_slash_returns_false",
  "TestIsVirtualPackageReference::test_parse_exception_returns_false",
  "TestIsVirtualPackageReference::test_simple_name_not_virtual",
  "TestIsVirtualPackageReference::test_virtual_file_reference",
  "TestListScripts::test_returns_empty_when_no_config",
  "TestListScripts::test_returns_empty_when_no_scripts_key",
  "TestListScripts::test_returns_scripts_from_config",
  "TestLoadConfig::test_returns_dict_when_apm_yml_exists",
  "TestLoadConfig::test_returns_none_when_no_apm_yml",
  "TestMatchesQualifiedPath::test_match_with_owner_and_name",
  "TestMatchesQualifiedPath::test_no_match_different_file",
  "TestMatchesQualifiedPath::test_no_match_different_owner",
  "TestParseAndBuildRuntimeCommand::test_codex_no_args",
  "TestParseAndBuildRuntimeCommand::test_codex_with_flag_before",
  "TestParseAndBuildRuntimeCommand::test_copilot_no_args",
  "TestParseAndBuildRuntimeCommand::test_env_prefix_strips_p_flag_for_copilot",
  "TestParseAndBuildRuntimeCommand::test_env_prefix_with_codex",
  "TestParseAndBuildRuntimeCommand::test_gemini_no_args",
  "TestParseAndBuildRuntimeCommand::test_llm_no_args",
  "TestParseAndBuildRuntimeCommand::test_llm_with_env_prefix_strips_p_flag",
  "TestParseAndBuildRuntimeCommand::test_returns_none_when_no_match",
  "TestPromptCompilerCompile::test_compile_creates_output_dir",
  "TestPromptCompilerCompile::test_compile_no_params",
  "TestPromptCompilerCompile::test_compile_output_filename",
  "TestPromptCompilerCompile::test_compile_params_substitution",
  "TestPromptCompilerCompile::test_compile_raises_for_missing_file",
  "TestPromptCompilerCompile::test_compile_with_frontmatter",
  "TestPromptCompilerCompile::test_compile_without_frontmatter",
  "TestRaisePromptNotFound::test_includes_apm_install_tip",
  "TestRaisePromptNotFound::test_includes_dep_dirs_in_message",
  "TestRaisePromptNotFound::test_raises_file_not_found_error",
  "TestResolvePromptFileExtended::test_finds_in_apm_prompts",
  "TestResolvePromptFileExtended::test_finds_in_github_prompts",
  "TestResolvePromptFileExtended::test_not_found_raises_file_not_found",
  "TestResolvePromptFileExtended::test_rejects_symlink",
  "TestRunScript::test_auto_discover_runs_when_no_explicit_script",
  "TestRunScript::test_creates_minimal_config_for_virtual_package",
  "TestRunScript::test_not_found_raises_runtime_error",
  "TestRunScript::test_raises_without_apm_yml_and_non_virtual",
  "TestRunScript::test_uses_explicit_script_when_present",
  "TestScriptRunnerInit::test_custom_compiler_accepted",
  "TestScriptRunnerInit::test_default_compiler_created",
  "TestScriptRunnerInit::test_use_color_stored",
  "TestSubstituteParametersEdgeCases::test_empty_content",
  "TestSubstituteParametersEdgeCases::test_multiple_occurrences",
  "TestSubstituteParametersEdgeCases::test_partial_placeholder_unchanged"
 ],
 "tests/unit/core/test_token_manager_phase3.py -> tests/unit/core/test_token_manager_lifecycle.py (deleted-equal-copy)": [
  "TestFormatCredentialHost::test_custom_port_is_embedded",
  "TestFormatCredentialHost::test_no_port_returns_host_only",
  "TestFormatCredentialHost::test_port_zero_is_embedded",
  "TestFormatCredentialHost::test_standard_port_is_embedded",
  "TestGetCredentialTimeout::test_default_when_not_set",
  "TestGetCredentialTimeout::test_invalid_value_falls_back_to_default",
  "TestGetCredentialTimeout::test_negative_value_clamped_to_one",
  "TestGetCredentialTimeout::test_valid_value_respected",
  "TestGetCredentialTimeout::test_value_clamped_to_max",
  "TestGetCredentialTimeout::test_value_clamped_to_min",
  "TestGetTokenForPurpose::test_ado_modules_purpose",
  "TestGetTokenForPurpose::test_returns_fallback_env_var",
  "TestGetTokenForPurpose::test_returns_first_matching_env_var",
  "TestGetTokenForPurpose::test_returns_none_when_no_env_var",
  "TestGetTokenForPurpose::test_unknown_purpose_raises_value_error",
  "TestGetTokenWithCredentialFallback::test_cache_hit_returns_cached_value",
  "TestGetTokenWithCredentialFallback::test_env_token_wins_without_subprocess",
  "TestGetTokenWithCredentialFallback::test_gh_cli_fallback_on_github_host",
  "TestGetTokenWithCredentialFallback::test_git_credential_fallback",
  "TestGetTokenWithCredentialFallback::test_none_is_cached_when_no_credential_found",
  "TestGetTokenWithCredentialFallback::test_port_is_part_of_cache_key",
  "TestIsValidCredentialToken::test_empty_string_is_invalid",
  "TestIsValidCredentialToken::test_lower_prompt_password_for_is_invalid",
  "TestIsValidCredentialToken::test_lower_prompt_username_for_is_invalid",
  "TestIsValidCredentialToken::test_normal_pat_is_valid",
  "TestIsValidCredentialToken::test_prompt_password_for_is_invalid",
  "TestIsValidCredentialToken::test_prompt_username_for_is_invalid",
  "TestIsValidCredentialToken::test_token_exactly_1024_bytes_is_valid",
  "TestIsValidCredentialToken::test_token_over_1024_bytes_is_invalid",
  "TestIsValidCredentialToken::test_token_with_carriage_return_is_invalid",
  "TestIsValidCredentialToken::test_token_with_newline_is_invalid",
  "TestIsValidCredentialToken::test_token_with_space_is_invalid",
  "TestIsValidCredentialToken::test_token_with_tab_is_invalid",
  "TestModuleLevelHelpers::test_get_github_token_for_runtime_codex",
  "TestModuleLevelHelpers::test_get_github_token_for_runtime_copilot",
  "TestModuleLevelHelpers::test_get_github_token_for_runtime_llm",
  "TestModuleLevelHelpers::test_get_github_token_for_runtime_unknown_raises",
  "TestModuleLevelHelpers::test_setup_runtime_environment_returns_dict",
  "TestModuleLevelHelpers::test_validate_github_tokens_delegates_to_manager",
  "TestModuleLevelHelpers::test_validate_github_tokens_no_tokens",
  "TestResolveCredentialFromGhCli::test_returns_none_on_file_not_found",
  "TestResolveCredentialFromGhCli::test_returns_none_on_invalid_token",
  "TestResolveCredentialFromGhCli::test_returns_none_on_nonzero_exit",
  "TestResolveCredentialFromGhCli::test_returns_none_on_timeout",
  "TestResolveCredentialFromGhCli::test_returns_token_on_success",
  "TestResolveCredentialFromGhCli::test_unsupported_host_returns_none_without_subprocess",
  "TestResolveCredentialFromGit::test_invalid_path_sanitized_away",
  "TestResolveCredentialFromGit::test_path_parameter_included_in_request",
  "TestResolveCredentialFromGit::test_port_embedded_in_host_field",
  "TestResolveCredentialFromGit::test_returns_none_on_file_not_found",
  "TestResolveCredentialFromGit::test_returns_none_on_nonzero_exit",
  "TestResolveCredentialFromGit::test_returns_none_on_os_error",
  "TestResolveCredentialFromGit::test_returns_none_on_timeout",
  "TestResolveCredentialFromGit::test_returns_none_when_no_password_line",
  "TestResolveCredentialFromGit::test_returns_none_when_password_is_invalid",
  "TestResolveCredentialFromGit::test_returns_token_on_success",
  "TestSanitizeCredentialPath::test_control_char_newline_returns_empty",
  "TestSanitizeCredentialPath::test_control_char_tab_returns_empty",
  "TestSanitizeCredentialPath::test_data_scheme_returns_empty",
  "TestSanitizeCredentialPath::test_del_char_returns_empty",
  "TestSanitizeCredentialPath::test_disallowed_scheme_returns_empty",
  "TestSanitizeCredentialPath::test_empty_string_returns_empty",
  "TestSanitizeCredentialPath::test_http_url_extracts_path",
  "TestSanitizeCredentialPath::test_https_url_extracts_path",
  "TestSanitizeCredentialPath::test_javascript_scheme_returns_empty",
  "TestSanitizeCredentialPath::test_leading_slash_is_stripped",
  "TestSanitizeCredentialPath::test_low_control_char_returns_empty",
  "TestSanitizeCredentialPath::test_normal_owner_repo_is_preserved",
  "TestSanitizeCredentialPath::test_only_slash_returns_empty",
  "TestSanitizeCredentialPath::test_space_inside_returns_empty",
  "TestSanitizeCredentialPath::test_ssh_url_extracts_path",
  "TestSetupEnvironment::test_copilot_token_set_when_missing",
  "TestSetupEnvironment::test_llm_github_models_key_set",
  "TestSetupEnvironment::test_llm_preserve_existing_github_models_key",
  "TestSetupEnvironment::test_no_copilot_token_skips_copilot_vars",
  "TestSetupEnvironment::test_preserve_existing_does_not_overwrite",
  "TestSetupEnvironment::test_returns_copy_of_os_environ_when_none_passed",
  "TestSupportsGhCliHost::test_ado_hostname_returns_false",
  "TestSupportsGhCliHost::test_configured_ghes_host_that_matches_returns_true",
  "TestSupportsGhCliHost::test_configured_host_equal_to_github_com_returns_false",
  "TestSupportsGhCliHost::test_empty_string_returns_false",
  "TestSupportsGhCliHost::test_github_com_returns_true",
  "TestSupportsGhCliHost::test_none_returns_false",
  "TestSupportsGhCliHost::test_unrelated_fqdn_returns_false",
  "TestValidateTokens::test_ado_pat_only_passes_validation",
  "TestValidateTokens::test_copilot_pat_is_valid",
  "TestValidateTokens::test_github_token_present_returns_true",
  "TestValidateTokens::test_no_tokens_returns_false",
  "TestValidateTokens::test_only_apm_pat_is_valid"
 ],
 "tests/unit/core/test_token_manager_phase3.py -> tests/unit/core/test_token_manager_purpose_env_var.py (renamed-file)": [
  "TestGetTokenEnvVarForPurpose::test_mcp_compatibility_fallback_is_not_a_general_purpose_source",
  "TestGetTokenEnvVarForPurpose::test_returns_none_when_no_variable_is_selected",
  "TestGetTokenEnvVarForPurpose::test_returns_selected_variable_without_exposing_value",
  "TestGetTokenEnvVarForPurpose::test_unknown_purpose_raises_value_error"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 2687,
 "covered_lines_after": 2687
}

…place command, semver and policy discovery tests

Delete equal copies from test_marketplace_commands_phase3 and
test_discovery_phase3w4 (kept twins in test_marketplace_commands_surface and
test_discovery_policy_resolution), the semver copies in test_builder (kept in
test_semver) and two equal copies inside test_inheritance. Fold the two extra
assertions of the remaining marketplace update test into its survivor. Remap
CI duration seeds.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Daniel Meppiel (danielmeppiel) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

W2 (tests/unit/marketplace, tests/unit/policy) evidence: before 656 after 482 removed 174 added 0; removed = 173 deleted-equal-copy, 1 merged; unmapped 0. Covered lines 5267 before, 5267 after across 557 modules; lines whose covering-context count fell to zero: 0.

The semver equal copies are kept in the owner file test_semver.py and removed from test_builder.py. The merged node test_marketplace_commands_phase3.py::TestUpdateCmd::test_all_sources_with_one_failing matched its survivor except for two extra assertions ("good (1 plugin)" in output and "Marketplace cache refreshed" not in output). Both now live in the survivor.

Bodies changed during merge: tests/unit/marketplace/test_marketplace_commands_surface.py::TestUpdateCmd::test_all_sources_with_one_failing gains 2 assertions ("good (1 plugin)" in output, "Marketplace cache refreshed" not in output) from its phase3 twin, whose body was otherwise identical. No other test body changed.

Policy files: all 76 removed policy nodes are deleted-equal-copy, with 0 merged and 0 body changes. Every security-shaped test among them (TestFetchFromUrl::test_redirect_refused, TestFetchGitHubContents::test_redirect_refused, TestDiscoverPolicy::test_http_url_rejected, TestFetchFromUrl::test_hash_mismatch_returns_hash_mismatch, the TestVerifyHashPin, TestSplitHashPin and TestReadCacheEntryExpectedHash hash-pin cases, plus the 403 and timeout cases) is kept as an identical twin under the same class and test name in test_discovery_policy_resolution.py. That includes the same mocks, fixtures and module bindings. Every kept node is present in the after set. The 2 test_inheritance.py removals are equal copies inside the same file. No exploit-shape trap was merged or rewritten.

Node-set diff (pytest --collect-only -q, before vs after)
before=656 after=482 removed=174 added=0

- tests/unit/marketplace/test_builder.py (15 removed)
    TestParseSemver::test_build_metadata
    TestParseSemver::test_prerelease
    TestSatisfiesRange::test_caret_major
    TestSatisfiesRange::test_caret_zero_minor
    TestSatisfiesRange::test_caret_zero_zero
    TestSatisfiesRange::test_exact
    TestSatisfiesRange::test_gt
    TestSatisfiesRange::test_gte
    TestSatisfiesRange::test_lt
    TestSatisfiesRange::test_lte
    TestSatisfiesRange::test_tilde
    TestSatisfiesRange::test_wildcard_x
    TestSemverComparison::test_equality
    TestSemverComparison::test_prerelease_less_than_release
    TestSemverComparison::test_prerelease_ordering
- tests/unit/marketplace/test_marketplace_commands_phase3.py (83 removed)
    TestAddCmdVerboseTraceback::test_verbose_flag_shows_traceback_on_error
    TestBrowseCmd::test_empty_plugins_emits_warning
    TestBrowseCmd::test_marketplace_not_found_exits_1
    TestBrowseCmd::test_plugins_listed_with_full_install_names
    TestBrowseCmd::test_plugins_rendered_without_rich
    TestCheckGitignoreForMarketplaceJson::test_blank_and_comment_lines_skipped
    TestCheckGitignoreForMarketplaceJson::test_matching_pattern_triggers_warning
    TestCheckGitignoreForMarketplaceJson::test_no_gitignore_returns_silently
    TestCheckGitignoreForMarketplaceJson::test_oserror_reading_gitignore_returns_silently
    TestCheckGitignoreForMarketplaceJson::test_wildcard_json_pattern_triggers_warning
    TestFindDuplicateNames::test_duplicates_returns_diagnostic_string
    TestFindDuplicateNames::test_no_duplicates_returns_empty_string
    TestIsValidAlias::test_invalid_empty_string
    TestIsValidAlias::test_invalid_with_at
    TestIsValidAlias::test_invalid_with_slash
    TestIsValidAlias::test_invalid_with_space
    TestIsValidAlias::test_valid_alphanumeric
    TestIsValidAlias::test_valid_simple
    TestIsValidAlias::test_valid_with_dot
    TestListCmd::test_empty_registry_shows_hint
    TestListCmd::test_list_exception_exits_1
    TestListCmd::test_sources_rendered_with_rich
    TestListCmd::test_sources_rendered_without_rich
    TestListCmdVerbose::test_verbose_shows_traceback_on_error
    TestLoadConfigOrExit::test_both_files_conflict_exits_1
    TestLoadConfigOrExit::test_no_config_found_exits_1
    TestLoadConfigOrExit::test_other_schema_error_exits_2
    TestLoadCurrentVersions::test_invalid_json_returns_empty
    TestLoadCurrentVersions::test_no_marketplace_json_returns_empty
    TestLoadCurrentVersions::test_plugin_without_source_dict
    TestLoadCurrentVersions::test_valid_marketplace_json
    TestLoadYmlOrExit::test_missing_file_exits_1
    TestLoadYmlOrExit::test_schema_error_exits_2
    TestMarketplaceAddUnsupportedHostError::test_ado_host_kind_message
    TestMarketplaceAddUnsupportedHostError::test_generic_host_kind_shows_export_hints
    TestMarketplaceGroupGetCommand::test_build_command_raises_usage_error
    TestMarketplaceGroupGetCommand::test_normal_command_delegates_to_parent
    TestParseMarketplaceRepo::test_conflicting_host_flag_raises
    TestParseMarketplaceRepo::test_control_characters_raises
    TestParseMarketplaceRepo::test_dot_git_suffix_stripped
    TestParseMarketplaceRepo::test_empty_raises
    TestParseMarketplaceRepo::test_fqdn_first_without_owner_repo_raises
    TestParseMarketplaceRepo::test_http_url_rejected
    TestParseMarketplaceRepo::test_https_url_parsed
    TestParseMarketplaceRepo::test_https_without_host_raises
    TestParseMarketplaceRepo::test_owner_repo_simple
    TestParseMarketplaceRepo::test_single_segment_raises
    TestRemoveCmd::test_interactive_declined_cancels
    TestRemoveCmd::test_non_interactive_without_yes_exits
    TestRemoveCmd::test_with_yes_flag_removes
    TestRenderBuildError::test_generic_build_error
    TestRenderBuildError::test_git_ls_remote_error
    TestRenderBuildError::test_git_ls_remote_error_no_hint
    TestRenderBuildError::test_head_not_allowed_error
    TestRenderBuildError::test_no_matching_version_error
    TestRenderBuildError::test_offline_miss_error
    TestRenderBuildError::test_ref_not_found_error
    TestRenderBuildTable::test_no_console_falls_back_to_tree_item
    TestRenderBuildTable::test_no_sha_shows_placeholder
    TestRenderBuildTable::test_with_console_uses_rich
    TestRenderCheckTable::test_failed_result_shows_x
    TestRenderCheckTable::test_no_console_fallback
    TestRenderCheckTable::test_with_console_rich
    TestRenderDoctorTable::test_failed_check_shows_x_icon
    TestRenderDoctorTable::test_informational_check_shows_i_icon
    TestRenderDoctorTable::test_no_console_fallback
    TestRenderDoctorTable::test_with_console_rich
    TestRenderOutdatedTable::test_no_console_fallback
    TestRenderOutdatedTable::test_row_with_note_included_in_fallback
    TestRenderOutdatedTable::test_with_console_rich
    TestSearchCmd::test_empty_marketplace_exits_1
    TestSearchCmd::test_empty_query_exits_1
    TestSearchCmd::test_long_description_truncated
    TestSearchCmd::test_marketplace_not_found_exits_1
    TestSearchCmd::test_missing_at_sign_exits_1
    TestSearchCmd::test_no_results_shows_warning
    TestSearchCmd::test_results_rendered_with_rich
    TestSearchCmd::test_results_rendered_without_rich
    TestUpdateCmd::test_all_sources_with_one_failing
    TestUpdateCmd::test_no_sources_registered
    TestUpdateCmd::test_single_name_refresh
    TestWarnDuplicateNames::test_duplicate_name_emits_warning
    TestWarnDuplicateNames::test_no_duplicates_emits_no_warning
- tests/unit/policy/test_discovery_phase3w4.py (74 removed)
    TestComputeHashNormalized::test_invalid_expected_hash_falls_to_sha256
    TestComputeHashNormalized::test_none_expected_hash_uses_sha256
    TestComputeHashNormalized::test_sha512_expected_hash_uses_sha512
    TestDeriveLeafHost::test_bare_https_parses_hostname
    TestDeriveLeafHost::test_empty_source_returns_none
    TestDeriveLeafHost::test_file_source_falls_back_to_git_remote
    TestDeriveLeafHost::test_file_source_no_git_remote_returns_none
    TestDeriveLeafHost::test_org_shorthand_returns_github_com
    TestDeriveLeafHost::test_org_three_part_returns_host
    TestDeriveLeafHost::test_url_parse_exception_returns_none
    TestDeriveLeafHost::test_url_prefix_parses_hostname
    TestDetectGarbage::test_none_content_returns_none
    TestDetectGarbage::test_valid_yaml_mapping_returns_none
    TestDetectGarbage::test_yaml_error_no_cache_returns_garbage_response
    TestDetectGarbage::test_yaml_error_with_cache_returns_cached_stale
    TestDiscoverPolicy::test_http_url_rejected
    TestDiscoverPolicy::test_https_url_is_accepted
    TestExtractExtendsHost::test_empty_ref_returns_none
    TestExtractExtendsHost::test_https_url
    TestExtractExtendsHost::test_no_slash_returns_none
    TestExtractExtendsHost::test_three_part_ref_returns_host
    TestExtractExtendsHost::test_two_part_ref_returns_none
    TestExtractExtendsHost::test_url_exception_returns_none
    TestFetchFromRepo::test_fetch_error_with_stale_cache_returns_stale
    TestFetchFromRepo::test_garbage_body_returns_garbage_outcome
    TestFetchFromUrl::test_404_returns_absent
    TestFetchFromUrl::test_cache_hit_returns_cached
    TestFetchFromUrl::test_connection_error_returns_error
    TestFetchFromUrl::test_garbage_response_handled
    TestFetchFromUrl::test_hash_mismatch_returns_hash_mismatch
    TestFetchFromUrl::test_non_200_error
    TestFetchFromUrl::test_redirect_refused
    TestFetchFromUrl::test_timeout_returns_error
    TestFetchGitHubContents::test_403_returns_error
    TestFetchGitHubContents::test_base64_content_decoded
    TestFetchGitHubContents::test_connection_error_returns_error
    TestFetchGitHubContents::test_invalid_ref_returns_error
    TestFetchGitHubContents::test_non_200_returns_error
    TestFetchGitHubContents::test_redirect_refused
    TestFetchGitHubContents::test_three_part_ref_uses_ghe_api
    TestFetchGitHubContents::test_timeout_returns_error
    TestFetchGitHubContents::test_unexpected_format_returns_error
    TestIsGithubHost::test_empty_github_host_env
    TestIsGithubHost::test_ghe_com_suffix
    TestIsGithubHost::test_github_com
    TestIsGithubHost::test_github_host_env_var
    TestIsGithubHost::test_non_github_host
    TestParseRemoteUrlEdgeCases::test_azure_ssh_v3_prefix
    TestParseRemoteUrlEdgeCases::test_https_url_parse_exception_returns_none
    TestParseRemoteUrlEdgeCases::test_ssh_empty_path_returns_none
    TestReadCacheEntryExpectedHash::test_expected_hash_matches_cache
    TestReadCacheEntryExpectedHash::test_expected_hash_mismatch_returns_none
    TestReadCacheEntryExpectedHash::test_invalid_expected_hash_returns_none
    TestResolveAndPersistChain::test_single_policy_no_extends_returns_immediately
    TestResolveAndPersistChain::test_single_policy_parent_fetch_fails_closed
    TestSplitHashPin::test_bare_sha256_hex
    TestSplitHashPin::test_bare_sha512_hex_wrong_length_raises
    TestSplitHashPin::test_empty_hex_raises
    TestSplitHashPin::test_explicit_sha256_prefix
    TestSplitHashPin::test_explicit_sha512_prefix
    TestSplitHashPin::test_invalid_hex_raises
    TestSplitHashPin::test_unsupported_algo_raises
    TestSplitHashPin::test_whitespace_stripped
    TestValidateExtendsHost::test_different_host_raises
    TestValidateExtendsHost::test_leaf_host_none_raises_when_extends_has_host
    TestValidateExtendsHost::test_same_host_passes
    TestValidateExtendsHost::test_shorthand_extends_always_passes
    TestVerifyHashPin::test_bytes_content_is_supported
    TestVerifyHashPin::test_matching_pin_returns_none
    TestVerifyHashPin::test_mismatching_pin_returns_hash_mismatch_result
    TestVerifyHashPin::test_non_str_non_bytes_content_returns_hash_mismatch
    TestVerifyHashPin::test_none_expected_hash_returns_none
    TestWriteCacheOsError::test_meta_write_os_error_returns_gracefully
    TestWriteCacheOsError::test_policy_write_os_error_returns_gracefully
- tests/unit/policy/test_inheritance.py (2 removed)
    TestUnmanagedFilesTransparency::test_parent_deny_child_explicit_ignore
    TestUnmanagedFilesTransparency::test_parent_warn_child_explicit_deny

added (0; every one is a merged or renamed node listed in the mapping):
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/marketplace/test_builder.py -> tests/unit/marketplace/test_semver.py (deleted-equal-copy)": [
  "TestParseSemver::test_build_metadata",
  "TestParseSemver::test_prerelease",
  "TestSatisfiesRange::test_caret_major -> TestSatisfiesRange::test_caret_major_nonzero",
  "TestSatisfiesRange::test_caret_zero_minor -> TestSatisfiesRange::test_caret_zero_major",
  "TestSatisfiesRange::test_caret_zero_zero",
  "TestSatisfiesRange::test_exact -> TestSatisfiesRange::test_exact_match",
  "TestSatisfiesRange::test_gt",
  "TestSatisfiesRange::test_gte",
  "TestSatisfiesRange::test_lt",
  "TestSatisfiesRange::test_lte",
  "TestSatisfiesRange::test_tilde",
  "TestSatisfiesRange::test_wildcard_x",
  "TestSemverComparison::test_equality -> TestSemVerComparison::test_equality",
  "TestSemverComparison::test_prerelease_less_than_release -> TestSemVerComparison::test_prerelease_before_release",
  "TestSemverComparison::test_prerelease_ordering -> TestSemVerComparison::test_prerelease_alphabetical"
 ],
 "tests/unit/marketplace/test_marketplace_commands_phase3.py -> tests/unit/marketplace/test_marketplace_commands_surface.py (deleted-equal-copy)": [
  "TestAddCmdVerboseTraceback::test_verbose_flag_shows_traceback_on_error",
  "TestBrowseCmd::test_empty_plugins_emits_warning",
  "TestBrowseCmd::test_marketplace_not_found_exits_1",
  "TestBrowseCmd::test_plugins_listed_with_full_install_names",
  "TestBrowseCmd::test_plugins_rendered_without_rich",
  "TestCheckGitignoreForMarketplaceJson::test_blank_and_comment_lines_skipped",
  "TestCheckGitignoreForMarketplaceJson::test_matching_pattern_triggers_warning",
  "TestCheckGitignoreForMarketplaceJson::test_no_gitignore_returns_silently",
  "TestCheckGitignoreForMarketplaceJson::test_oserror_reading_gitignore_returns_silently",
  "TestCheckGitignoreForMarketplaceJson::test_wildcard_json_pattern_triggers_warning",
  "TestFindDuplicateNames::test_duplicates_returns_diagnostic_string",
  "TestFindDuplicateNames::test_no_duplicates_returns_empty_string",
  "TestIsValidAlias::test_invalid_empty_string",
  "TestIsValidAlias::test_invalid_with_at",
  "TestIsValidAlias::test_invalid_with_slash",
  "TestIsValidAlias::test_invalid_with_space",
  "TestIsValidAlias::test_valid_alphanumeric",
  "TestIsValidAlias::test_valid_simple",
  "TestIsValidAlias::test_valid_with_dot",
  "TestListCmd::test_empty_registry_shows_hint",
  "TestListCmd::test_list_exception_exits_1",
  "TestListCmd::test_sources_rendered_with_rich",
  "TestListCmd::test_sources_rendered_without_rich",
  "TestListCmdVerbose::test_verbose_shows_traceback_on_error",
  "TestLoadConfigOrExit::test_both_files_conflict_exits_1",
  "TestLoadConfigOrExit::test_no_config_found_exits_1",
  "TestLoadConfigOrExit::test_other_schema_error_exits_2",
  "TestLoadCurrentVersions::test_invalid_json_returns_empty",
  "TestLoadCurrentVersions::test_no_marketplace_json_returns_empty",
  "TestLoadCurrentVersions::test_plugin_without_source_dict",
  "TestLoadCurrentVersions::test_valid_marketplace_json",
  "TestLoadYmlOrExit::test_missing_file_exits_1",
  "TestLoadYmlOrExit::test_schema_error_exits_2",
  "TestMarketplaceAddUnsupportedHostError::test_ado_host_kind_message",
  "TestMarketplaceAddUnsupportedHostError::test_generic_host_kind_shows_export_hints",
  "TestMarketplaceGroupGetCommand::test_build_command_raises_usage_error",
  "TestMarketplaceGroupGetCommand::test_normal_command_delegates_to_parent",
  "TestParseMarketplaceRepo::test_conflicting_host_flag_raises",
  "TestParseMarketplaceRepo::test_control_characters_raises",
  "TestParseMarketplaceRepo::test_dot_git_suffix_stripped",
  "TestParseMarketplaceRepo::test_empty_raises",
  "TestParseMarketplaceRepo::test_fqdn_first_without_owner_repo_raises",
  "TestParseMarketplaceRepo::test_http_url_rejected",
  "TestParseMarketplaceRepo::test_https_url_parsed",
  "TestParseMarketplaceRepo::test_https_without_host_raises",
  "TestParseMarketplaceRepo::test_owner_repo_simple",
  "TestParseMarketplaceRepo::test_single_segment_raises",
  "TestRemoveCmd::test_interactive_declined_cancels",
  "TestRemoveCmd::test_non_interactive_without_yes_exits",
  "TestRemoveCmd::test_with_yes_flag_removes",
  "TestRenderBuildError::test_generic_build_error",
  "TestRenderBuildError::test_git_ls_remote_error",
  "TestRenderBuildError::test_git_ls_remote_error_no_hint",
  "TestRenderBuildError::test_head_not_allowed_error",
  "TestRenderBuildError::test_no_matching_version_error",
  "TestRenderBuildError::test_offline_miss_error",
  "TestRenderBuildError::test_ref_not_found_error",
  "TestRenderBuildTable::test_no_console_falls_back_to_tree_item",
  "TestRenderBuildTable::test_no_sha_shows_placeholder",
  "TestRenderBuildTable::test_with_console_uses_rich",
  "TestRenderCheckTable::test_failed_result_shows_x",
  "TestRenderCheckTable::test_no_console_fallback",
  "TestRenderCheckTable::test_with_console_rich",
  "TestRenderDoctorTable::test_failed_check_shows_x_icon",
  "TestRenderDoctorTable::test_informational_check_shows_i_icon",
  "TestRenderDoctorTable::test_no_console_fallback",
  "TestRenderDoctorTable::test_with_console_rich",
  "TestRenderOutdatedTable::test_no_console_fallback",
  "TestRenderOutdatedTable::test_row_with_note_included_in_fallback",
  "TestRenderOutdatedTable::test_with_console_rich",
  "TestSearchCmd::test_empty_marketplace_exits_1",
  "TestSearchCmd::test_empty_query_exits_1",
  "TestSearchCmd::test_long_description_truncated",
  "TestSearchCmd::test_marketplace_not_found_exits_1",
  "TestSearchCmd::test_missing_at_sign_exits_1",
  "TestSearchCmd::test_no_results_shows_warning",
  "TestSearchCmd::test_results_rendered_with_rich",
  "TestSearchCmd::test_results_rendered_without_rich",
  "TestUpdateCmd::test_no_sources_registered",
  "TestUpdateCmd::test_single_name_refresh",
  "TestWarnDuplicateNames::test_duplicate_name_emits_warning",
  "TestWarnDuplicateNames::test_no_duplicates_emits_no_warning"
 ],
 "tests/unit/marketplace/test_marketplace_commands_phase3.py -> tests/unit/marketplace/test_marketplace_commands_surface.py (merged)": [
  "TestUpdateCmd::test_all_sources_with_one_failing"
 ],
 "tests/unit/policy/test_discovery_phase3w4.py -> tests/unit/policy/test_discovery_policy_resolution.py (deleted-equal-copy)": [
  "TestComputeHashNormalized::test_invalid_expected_hash_falls_to_sha256",
  "TestComputeHashNormalized::test_none_expected_hash_uses_sha256",
  "TestComputeHashNormalized::test_sha512_expected_hash_uses_sha512",
  "TestDeriveLeafHost::test_bare_https_parses_hostname",
  "TestDeriveLeafHost::test_empty_source_returns_none",
  "TestDeriveLeafHost::test_file_source_falls_back_to_git_remote",
  "TestDeriveLeafHost::test_file_source_no_git_remote_returns_none",
  "TestDeriveLeafHost::test_org_shorthand_returns_github_com",
  "TestDeriveLeafHost::test_org_three_part_returns_host",
  "TestDeriveLeafHost::test_url_parse_exception_returns_none",
  "TestDeriveLeafHost::test_url_prefix_parses_hostname",
  "TestDetectGarbage::test_none_content_returns_none",
  "TestDetectGarbage::test_valid_yaml_mapping_returns_none",
  "TestDetectGarbage::test_yaml_error_no_cache_returns_garbage_response",
  "TestDetectGarbage::test_yaml_error_with_cache_returns_cached_stale",
  "TestDiscoverPolicy::test_http_url_rejected",
  "TestDiscoverPolicy::test_https_url_is_accepted",
  "TestExtractExtendsHost::test_empty_ref_returns_none",
  "TestExtractExtendsHost::test_https_url",
  "TestExtractExtendsHost::test_no_slash_returns_none",
  "TestExtractExtendsHost::test_three_part_ref_returns_host",
  "TestExtractExtendsHost::test_two_part_ref_returns_none",
  "TestExtractExtendsHost::test_url_exception_returns_none",
  "TestFetchFromRepo::test_fetch_error_with_stale_cache_returns_stale",
  "TestFetchFromRepo::test_garbage_body_returns_garbage_outcome",
  "TestFetchFromUrl::test_404_returns_absent",
  "TestFetchFromUrl::test_cache_hit_returns_cached",
  "TestFetchFromUrl::test_connection_error_returns_error",
  "TestFetchFromUrl::test_garbage_response_handled",
  "TestFetchFromUrl::test_hash_mismatch_returns_hash_mismatch",
  "TestFetchFromUrl::test_non_200_error",
  "TestFetchFromUrl::test_redirect_refused",
  "TestFetchFromUrl::test_timeout_returns_error",
  "TestFetchGitHubContents::test_403_returns_error",
  "TestFetchGitHubContents::test_base64_content_decoded",
  "TestFetchGitHubContents::test_connection_error_returns_error",
  "TestFetchGitHubContents::test_invalid_ref_returns_error",
  "TestFetchGitHubContents::test_non_200_returns_error",
  "TestFetchGitHubContents::test_redirect_refused",
  "TestFetchGitHubContents::test_three_part_ref_uses_ghe_api",
  "TestFetchGitHubContents::test_timeout_returns_error",
  "TestFetchGitHubContents::test_unexpected_format_returns_error",
  "TestIsGithubHost::test_empty_github_host_env",
  "TestIsGithubHost::test_ghe_com_suffix",
  "TestIsGithubHost::test_github_com",
  "TestIsGithubHost::test_github_host_env_var",
  "TestIsGithubHost::test_non_github_host",
  "TestParseRemoteUrlEdgeCases::test_azure_ssh_v3_prefix",
  "TestParseRemoteUrlEdgeCases::test_https_url_parse_exception_returns_none",
  "TestParseRemoteUrlEdgeCases::test_ssh_empty_path_returns_none",
  "TestReadCacheEntryExpectedHash::test_expected_hash_matches_cache",
  "TestReadCacheEntryExpectedHash::test_expected_hash_mismatch_returns_none",
  "TestReadCacheEntryExpectedHash::test_invalid_expected_hash_returns_none",
  "TestResolveAndPersistChain::test_single_policy_no_extends_returns_immediately",
  "TestResolveAndPersistChain::test_single_policy_parent_fetch_fails_closed",
  "TestSplitHashPin::test_bare_sha256_hex",
  "TestSplitHashPin::test_bare_sha512_hex_wrong_length_raises",
  "TestSplitHashPin::test_empty_hex_raises",
  "TestSplitHashPin::test_explicit_sha256_prefix",
  "TestSplitHashPin::test_explicit_sha512_prefix",
  "TestSplitHashPin::test_invalid_hex_raises",
  "TestSplitHashPin::test_unsupported_algo_raises",
  "TestSplitHashPin::test_whitespace_stripped",
  "TestValidateExtendsHost::test_different_host_raises",
  "TestValidateExtendsHost::test_leaf_host_none_raises_when_extends_has_host",
  "TestValidateExtendsHost::test_same_host_passes",
  "TestValidateExtendsHost::test_shorthand_extends_always_passes",
  "TestVerifyHashPin::test_bytes_content_is_supported",
  "TestVerifyHashPin::test_matching_pin_returns_none",
  "TestVerifyHashPin::test_mismatching_pin_returns_hash_mismatch_result",
  "TestVerifyHashPin::test_non_str_non_bytes_content_returns_hash_mismatch",
  "TestVerifyHashPin::test_none_expected_hash_returns_none",
  "TestWriteCacheOsError::test_meta_write_os_error_returns_gracefully",
  "TestWriteCacheOsError::test_policy_write_os_error_returns_gracefully"
 ],
 "tests/unit/policy/test_inheritance.py -> tests/unit/policy/test_inheritance.py (deleted-equal-copy)": [
  "TestUnmanagedFilesTransparency::test_parent_deny_child_explicit_ignore -> TestUnmanagedFilesMerge::test_action_cannot_downgrade",
  "TestUnmanagedFilesTransparency::test_parent_warn_child_explicit_deny -> TestUnmanagedFilesMerge::test_action_escalation_warn_to_deny"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 5267,
 "covered_lines_after": 5267
}

… tests

Delete equal copies from test_copilot_adapter_phase3 and
test_codex_adapter_phase3 (kept twins in the matching *_compatibility files)
and move their unique tests into those survivors. Fold the extra warning
assertions of the codex TOML decode test into its survivor and keep the
ambient-env project-scope variant under its own name. Remap CI duration seeds.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Daniel Meppiel (danielmeppiel) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

W3 (tests/unit adapters: copilot, codex) evidence: before 404 after 225 removed 221 added 42; removed = 178 deleted-equal-copy, 43 merged; unmapped 0. Covered lines 2109 before, 2109 after across 557 modules; lines whose covering-context count fell to zero: 0.

Merged nodes: the 3 unique copilot tests and 28 unique codex tests (42 nodes; with the folded node, 43 merged) move into the *_compatibility survivors, inside same-named classes where the class context is identical and as new classes otherwise. codex ... TestGetCurrentConfig::test_returns_none_on_toml_decode_error matched its survivor except for two warning-text assertions, which are folded into the survivor. The phase3 TestGetConfigPath::test_project_scope_uses_project_root runs without CODEX_HOME and the survivor sets it, so it moves as test_project_scope_uses_project_root_with_ambient_env.

Bodies changed during merge: tests/unit/test_codex_adapter_compatibility.py::TestGetCurrentConfig::test_returns_none_on_toml_decode_error now binds the _rich_warning patch as mock_warning and gains 3 lines asserting the warning text ("read or parse", "inspect the file or delete it"). This was folded from its phase3 twin. Renamed on move, body unchanged: TestGetConfigPath::test_project_scope_uses_project_root_with_ambient_env (the phase3 variant without CODEX_HOME). Every other moved test keeps its body unchanged, including the security-shaped TestConfigureMcpServer HTTP-remote rejection and URL-userinfo redaction tests. Every security-shaped equal copy that was removed has its identical twin kept.

Node-set diff (pytest --collect-only -q, before vs after)
before=404 after=225 removed=221 added=42

- tests/unit/test_codex_adapter_phase3.py (107 removed)
    TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[HTTP://LOCALHOST.:5500/mcp]
    TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://[::1]:8080/mcp]
    TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://user:[email protected]:3000/mcp]
    TestConfigureMcpServer::test_derives_key_from_url_last_segment
    TestConfigureMcpServer::test_rejected_http_remote_does_not_log_url_userinfo
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0.0.0.0/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0x7f000001/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://10.0.0.1/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://169.254.169.254/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://2130706433/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://224.0.0.1/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://8.8.8.8/mcp]
    TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://example.com/mcp]
    TestConfigureMcpServer::test_returns_false_for_empty_server_url
    TestConfigureMcpServer::test_returns_false_for_http_remote_on_public_host
    TestConfigureMcpServer::test_returns_false_for_remote_only_server
    TestConfigureMcpServer::test_returns_false_on_exception
    TestConfigureMcpServer::test_returns_false_when_server_not_found
    TestConfigureMcpServer::test_returns_false_when_update_config_fails
    TestConfigureMcpServer::test_uses_explicit_server_name_as_key
    TestConfigureMcpServer::test_uses_full_url_when_no_slash
    TestConfigureMcpServer::test_uses_server_info_cache_when_provided
    TestEnsureDockerEnvFlags::test_adds_missing_env_flag_before_image
    TestEnsureDockerEnvFlags::test_adds_to_end_when_image_not_identifiable
    TestEnsureDockerEnvFlags::test_does_not_duplicate_existing_env_flag
    TestEnsureDockerEnvFlags::test_multiple_missing_vars_all_added
    TestEnsureDockerEnvFlags::test_no_op_when_env_vars_empty
    TestFormatServerConfig::test_docker_package_command
    TestFormatServerConfig::test_env_vars_added_to_config
    TestFormatServerConfig::test_npm_package_basic
    TestFormatServerConfig::test_npm_package_uses_runtime_hint
    TestFormatServerConfig::test_npm_package_with_all_args_already_including_pkg
    TestFormatServerConfig::test_pypi_package_uses_runtime_hint
    TestFormatServerConfig::test_pypi_package_uses_uvx_by_default
    TestFormatServerConfig::test_raises_when_no_packages
    TestFormatServerConfig::test_raw_stdio_normalizes_workspace_placeholder
    TestFormatServerConfig::test_registry_id_is_not_a_native_setting
    TestFormatServerConfig::test_uses_raw_stdio_when_present
    TestForwardedStdioEnv::test_args_still_resolve_forwarded_names_from_the_environment
    TestForwardedStdioEnv::test_cwd_and_static_values_stay_intact
    TestForwardedStdioEnv::test_env_prefixed_reference_is_forwarded
    TestForwardedStdioEnv::test_extra_cannot_replace_forwarded_names
    TestForwardedStdioEnv::test_literal_value_keeps_env_block
    TestForwardedStdioEnv::test_reference_is_forwarded_instead_of_written
    TestForwardedStdioEnv::test_reference_is_forwarded_when_variable_is_unset
    TestForwardedStdioEnv::test_reference_under_another_key_keeps_install_time_value
    TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[ ${TOKEN} ]
    TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[${TOKEN}\n]
    TestForwardedStdioEnv::test_written_config_keeps_env_vars_at_server_level
    TestForwardedStdioEnvScope::test_baseline_rendering_does_not_warn
    TestForwardedStdioEnvScope::test_forwarded_reference_does_not_warn
    TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[False]
    TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[True]
    TestForwardedStdioEnvScope::test_project_scope_warns_with_names_only
    TestForwardedStdioEnvScope::test_user_scope_does_not_emit_the_forwarding_warning
    TestForwardedStdioEnvScope::test_user_scope_env_prefixed_reference_resolves
    TestForwardedStdioEnvScope::test_user_scope_never_matches_legacy_baseline
    TestForwardedStdioEnvScope::test_user_scope_resolves_value_and_has_no_env_vars
    TestGetConfigPath::test_config_path_ends_with_config_toml
    TestGetConfigPath::test_project_scope_uses_project_root
    TestGetConfigPath::test_user_scope_uses_home_dir
    TestGetCurrentConfig::test_parses_windows_path_in_literal_quoted_key
    TestGetCurrentConfig::test_returns_empty_dict_when_file_missing
    TestGetCurrentConfig::test_returns_none_on_os_error
    TestGetCurrentConfig::test_returns_none_on_toml_decode_error
    TestGetCurrentConfig::test_returns_none_on_unicode_decode_error
    TestGetCurrentConfig::test_returns_parsed_toml_when_file_exists
    TestInit::test_default_attributes
    TestInit::test_registry_client_created
    TestInit::test_registry_integration_created
    TestInit::test_user_scope_stored
    TestInjectDockerEnvVars::test_does_not_duplicate_existing_var
    TestInjectDockerEnvVars::test_injects_after_run
    TestInjectDockerEnvVars::test_no_op_when_env_vars_empty
    TestProcessArguments::test_empty_list_returns_empty
    TestProcessArguments::test_env_placeholder_resolved_in_positional
    TestProcessArguments::test_named_arg_with_additional_value
    TestProcessArguments::test_named_dict_arg_extracted
    TestProcessArguments::test_positional_dict_arg_extracted
    TestProcessArguments::test_positional_skipped_when_no_value_or_default
    TestProcessArguments::test_positional_uses_default_when_value_missing
    TestProcessArguments::test_runtime_placeholder_resolved_in_string
    TestProcessArguments::test_string_arg_passes_through
    TestProcessEnvironmentVariables::test_env_var_resolved_from_os_environ
    TestProcessEnvironmentVariables::test_override_takes_priority
    TestProcessEnvironmentVariables::test_returns_dict
    TestResolveEnvPlaceholders::test_delegates_to_resolve_variable_placeholders
    TestResolveVariablePlaceholders::test_empty_string_returned_unchanged
    TestResolveVariablePlaceholders::test_env_placeholder_kept_when_not_in_env
    TestResolveVariablePlaceholders::test_env_placeholder_replaced
    TestResolveVariablePlaceholders::test_multiple_placeholders_replaced
    TestResolveVariablePlaceholders::test_none_returned_unchanged
    TestResolveVariablePlaceholders::test_plain_string_returned_unchanged
    TestResolveVariablePlaceholders::test_runtime_placeholder_kept_when_not_in_vars
    TestResolveVariablePlaceholders::test_runtime_placeholder_replaced
    TestSelectBestPackage::test_falls_back_to_first_package
    TestSelectBestPackage::test_returns_none_for_empty_list
    TestSelectBestPackage::test_selects_docker_when_no_npm
    TestSelectBestPackage::test_selects_npm_over_docker
    TestSelectBestPackage::test_selects_pypi_over_homebrew
    TestUpdateConfig::test_update_creates_directory_and_writes
    TestUpdateConfig::test_update_creates_mcp_servers_section_if_missing
    TestUpdateConfig::test_update_merges_into_existing_mcp_servers
    TestUpdateConfig::test_update_preserves_windows_literal_quoted_path_keys
    TestUpdateConfig::test_update_returns_false_when_current_config_none
    TestUserScopeStdioOutputUnchanged::test_user_scope_extra_env_vars_passthrough_is_unchanged
    TestUserScopeStdioOutputUnchanged::test_user_scope_written_config_matches_previous_output
- tests/unit/test_copilot_adapter_phase3.py (114 removed)
    TestCollectPreviouslyBakedKeys::test_derives_key_from_url_when_no_server_name
    TestCollectPreviouslyBakedKeys::test_env_with_placeholder_value_not_counted_as_baked
    TestCollectPreviouslyBakedKeys::test_exception_in_get_current_config_returns_empty
    TestCollectPreviouslyBakedKeys::test_headers_with_literal_value_marks_baked
    TestCollectPreviouslyBakedKeys::test_headers_with_placeholder_not_baked
    TestCollectPreviouslyBakedKeys::test_returns_empty_when_existing_is_not_dict
    TestCollectPreviouslyBakedKeys::test_uses_full_url_when_no_slash
    TestCollectPreviouslyBakedKeys::test_uses_server_name_as_key_when_provided
    TestConfigureMcpServer::test_aggregates_legacy_angle_offenders
    TestConfigureMcpServer::test_derives_config_key_from_url_after_slash
    TestConfigureMcpServer::test_empty_server_url_returns_false
    TestConfigureMcpServer::test_exception_in_format_returns_false_and_prints_error
    TestConfigureMcpServer::test_none_server_url_returns_false
    TestConfigureMcpServer::test_returns_false_when_server_info_is_none
    TestConfigureMcpServer::test_security_upgrade_detected_when_headers_were_baked
    TestConfigureMcpServer::test_security_upgrade_when_baked_keys_overlap
    TestConfigureMcpServer::test_uses_full_url_as_key_when_no_slash
    TestConfigureMcpServer::test_uses_provided_server_name_as_config_key
    TestDispatchPackageToConfig::test_docker_package_sets_command_docker
    TestDispatchPackageToConfig::test_docker_with_runtime_args_injects_env_vars
    TestDispatchPackageToConfig::test_npm_empty_env_not_set
    TestDispatchPackageToConfig::test_npm_package_sets_command_npx
    TestDispatchPackageToConfig::test_npm_package_uses_runtime_hint_when_provided
    TestDispatchPackageToConfig::test_npm_with_env_sets_env_key
    TestDispatchPackageToConfig::test_pypi_registry_delegates_to_apply_pypi_homebrew
    TestEmitInstallRunSummaryLegacyAngle::test_legacy_angle_offenders_warning_emitted
    TestEmitInstallRunSummaryLegacyAngle::test_no_warnings_when_all_state_empty
    TestEmitInstallRunSummaryLegacyAngle::test_plural_noun_for_multiple_unset_vars
    TestEmitInstallRunSummaryLegacyAngle::test_reset_install_run_state_clears_all_buckets
    TestEmitInstallRunSummaryLegacyAngle::test_singular_noun_for_single_unset_var
    TestEmitInstallSummary::test_no_op_when_runtime_substitution_not_supported
    TestEmitInstallSummary::test_records_vars_from_env_block_in_server_config
    TestEmitInstallSummary::test_records_vars_from_headers_block_in_server_config
    TestFormatServerConfigNoPackagesNoRemotes::test_packages_path_applies_tools_override
    TestFormatServerConfigNoPackagesNoRemotes::test_raises_value_error_when_no_packages_and_no_remotes
    TestFormatServerConfigRawStdio::test_raw_stdio_with_args_containing_placeholder
    TestFormatServerConfigRawStdio::test_raw_stdio_with_env_vars_translated
    TestFormatServerConfigRawStdio::test_raw_stdio_with_tools_override
    TestFormatServerConfigRawStdio::test_raw_stdio_without_env_or_args
    TestFormatServerConfigRemoteToolsOverride::test_tools_override_applied_on_remote_path
    TestGetConfigPath::test_project_scope_lookup_does_not_create_github_dir
    TestGetConfigPath::test_project_scope_returns_github_mcp_json
    TestGetConfigPath::test_user_scope_honors_copilot_home
    TestGetConfigPath::test_user_scope_returns_path_under_home_copilot
    TestGetCurrentConfig::test_returns_config_when_file_valid
    TestGetCurrentConfig::test_returns_empty_dict_on_json_decode_error
    TestGetCurrentConfig::test_returns_empty_dict_on_os_error
    TestGetCurrentConfig::test_returns_empty_dict_when_file_missing
    TestInjectDockerEnvVars::test_empty_env_vars_no_modification
    TestInjectDockerEnvVars::test_injects_env_vars_after_run
    TestInjectDockerEnvVars::test_no_injection_when_no_run_command
    TestInjectEnvVarsIntoDockerArgs::test_adds_i_and_rm_flags_when_missing
    TestInjectEnvVarsIntoDockerArgs::test_does_not_duplicate_i_flag
    TestInjectEnvVarsIntoDockerArgs::test_e_flag_followed_by_var_name_replaced
    TestInjectEnvVarsIntoDockerArgs::test_empty_env_vars_returns_base_args_with_flags
    TestInjectEnvVarsIntoDockerArgs::test_env_var_name_placeholder_replaced_with_e_flag
    TestInjectEnvVarsIntoDockerArgs::test_env_vars_not_in_template_appended
    TestInjectEnvVarsIntoDockerArgs::test_interactive_flag_recognised
    TestIsGithubServerEdgeCases::test_api_github_com_subdomain_accepted
    TestIsGithubServerEdgeCases::test_empty_url_returns_false
    TestIsGithubServerEdgeCases::test_githubcopilot_com_hostname_accepted
    TestIsGithubServerEdgeCases::test_githubcopilot_com_root_hostname_accepted
    TestIsGithubServerEdgeCases::test_name_mismatch_returns_false_even_with_valid_host
    TestIsGithubServerEdgeCases::test_non_https_url_rejected
    TestIsGithubServerEdgeCases::test_unknown_hostname_returns_false
    TestModuleLevelHelpers::test_extract_legacy_angle_vars_non_string_returns_empty_set
    TestModuleLevelHelpers::test_has_env_placeholder_false_for_plain_string
    TestModuleLevelHelpers::test_has_env_placeholder_non_string_returns_false
    TestModuleLevelHelpers::test_has_env_placeholder_true_cases
    TestModuleLevelHelpers::test_translate_env_placeholder_non_string_passthrough
    TestModuleLevelHelpers::test_translate_env_placeholder_string_translations
    TestProcessArguments::test_empty_arguments_returns_empty_list
    TestProcessArguments::test_named_arg_appends_name_and_value
    TestProcessArguments::test_named_arg_skips_when_no_name
    TestProcessArguments::test_named_arg_value_same_as_name_not_appended
    TestProcessArguments::test_named_arg_value_starts_with_dash_not_appended
    TestProcessArguments::test_named_arg_with_empty_value_only_appends_name
    TestProcessArguments::test_positional_arg_resolved
    TestProcessArguments::test_positional_arg_uses_default_when_no_value
    TestProcessArguments::test_positional_arg_with_runtime_var
    TestProcessArguments::test_positional_empty_value_skipped
    TestProcessArguments::test_string_arg_passed_through_with_placeholder_translation
    TestResolveEnvPlaceholders::test_delegates_to_resolve_variable_placeholders
    TestResolveEnvVariableLegacyMode::test_legacy_angle_bracket_resolves
    TestResolveEnvVariableLegacyMode::test_resolves_from_env_overrides
    TestResolveEnvVariableLegacyMode::test_resolves_from_os_environ_when_no_override
    TestResolveEnvVariableLegacyMode::test_skips_prompt_in_non_interactive_env
    TestResolveEnvVariableLegacyMode::test_skips_prompt_when_e2e_flag_set
    TestResolveEnvVariableLegacyMode::test_skips_prompt_when_env_overrides_provided
    TestResolveEnvironmentVariablesLegacyMode::test_dict_env_legacy_omits_none
    TestResolveEnvironmentVariablesLegacyMode::test_dict_env_legacy_stringifies_non_string_non_none
    TestResolveEnvironmentVariablesLegacyMode::test_dict_env_resolves_string_via_resolve_env_variable
    TestResolveEnvironmentVariablesLegacyMode::test_list_env_legacy_delegates_to_resolve_env_vars_with_prompting
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_dict_env_skips_empty_name
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_dict_env_skips_none_value
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_default_github_env_preserved
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_regular_var_gets_placeholder
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_skips_empty_name
    TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_skips_non_dict_items
    TestResolveVariablePlaceholders::test_dollar_brace_not_confused_with_runtime_var
    TestResolveVariablePlaceholders::test_empty_string_returns_empty_string
    TestResolveVariablePlaceholders::test_legacy_mode_keeps_angle_bracket_when_not_in_resolved_env
    TestResolveVariablePlaceholders::test_legacy_mode_resolves_angle_bracket_from_resolved_env
    TestResolveVariablePlaceholders::test_runtime_var_not_substituted_when_no_runtime_vars
    TestResolveVariablePlaceholders::test_runtime_var_resolved_at_install_time
    TestResolveVariablePlaceholders::test_translate_mode_translates_env_placeholder
    TestSelectAndDispatchBestPackage::test_returns_none_when_no_best_package
    TestSelectAndDispatchBestPackage::test_set_type_stdio_flag_sets_config_type
    TestSelectBestPackage::test_docker_preferred_over_pypi
    TestSelectBestPackage::test_empty_packages_returns_none
    TestSelectBestPackage::test_first_package_returned_when_none_in_priority
    TestSelectBestPackage::test_npm_preferred_over_docker
    TestUpdateConfig::test_creates_file_and_mcpservers_key_when_absent
    TestUpdateConfig::test_merges_into_existing_config

added (42; every one is a merged or renamed node listed in the mapping):
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[HTTP://LOCALHOST.:5500/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://[::1]:8080/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://user:[email protected]:3000/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejected_http_remote_does_not_log_url_userinfo
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0.0.0.0/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0x7f000001/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://10.0.0.1/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://169.254.169.254/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://2130706433/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://224.0.0.1/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://8.8.8.8/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://example.com/mcp]
+ tests/unit/test_codex_adapter_compatibility.py::TestConfigureMcpServer::test_returns_false_for_http_remote_on_public_host
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_args_still_resolve_forwarded_names_from_the_environment
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_cwd_and_static_values_stay_intact
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_env_prefixed_reference_is_forwarded
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_extra_cannot_replace_forwarded_names
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_literal_value_keeps_env_block
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_reference_is_forwarded_instead_of_written
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_reference_is_forwarded_when_variable_is_unset
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_reference_under_another_key_keeps_install_time_value
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[ ${TOKEN} ]
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[${TOKEN}\n]
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnv::test_written_config_keeps_env_vars_at_server_level
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_baseline_rendering_does_not_warn
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_forwarded_reference_does_not_warn
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[False]
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[True]
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_project_scope_warns_with_names_only
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_user_scope_does_not_emit_the_forwarding_warning
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_user_scope_env_prefixed_reference_resolves
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_user_scope_never_matches_legacy_baseline
+ tests/unit/test_codex_adapter_compatibility.py::TestForwardedStdioEnvScope::test_user_scope_resolves_value_and_has_no_env_vars
+ tests/unit/test_codex_adapter_compatibility.py::TestGetConfigPath::test_project_scope_uses_project_root_with_ambient_env
+ tests/unit/test_codex_adapter_compatibility.py::TestGetCurrentConfig::test_parses_windows_path_in_literal_quoted_key
+ tests/unit/test_codex_adapter_compatibility.py::TestGetCurrentConfig::test_returns_none_on_unicode_decode_error
+ tests/unit/test_codex_adapter_compatibility.py::TestUpdateConfig::test_update_preserves_windows_literal_quoted_path_keys
+ tests/unit/test_codex_adapter_compatibility.py::TestUserScopeStdioOutputUnchanged::test_user_scope_extra_env_vars_passthrough_is_unchanged
+ tests/unit/test_codex_adapter_compatibility.py::TestUserScopeStdioOutputUnchanged::test_user_scope_written_config_matches_previous_output
+ tests/unit/test_copilot_adapter_compatibility.py::TestGetConfigPath::test_project_scope_lookup_does_not_create_github_dir
+ tests/unit/test_copilot_adapter_compatibility.py::TestGetConfigPath::test_project_scope_returns_github_mcp_json
+ tests/unit/test_copilot_adapter_compatibility.py::TestGetConfigPath::test_user_scope_honors_copilot_home
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/test_codex_adapter_phase3.py -> tests/unit/test_codex_adapter_compatibility.py (merged)": [
  "TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[HTTP://LOCALHOST.:5500/mcp]",
  "TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://[::1]:8080/mcp]",
  "TestConfigureMcpServer::test_configures_http_remote_on_loopback_host[http://user:[email protected]:3000/mcp]",
  "TestConfigureMcpServer::test_rejected_http_remote_does_not_log_url_userinfo",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0.0.0.0/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://0x7f000001/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://10.0.0.1/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://169.254.169.254/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://2130706433/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://224.0.0.1/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://8.8.8.8/mcp]",
  "TestConfigureMcpServer::test_rejects_http_remote_on_nonliteral_loopback_host[http://example.com/mcp]",
  "TestConfigureMcpServer::test_returns_false_for_http_remote_on_public_host",
  "TestForwardedStdioEnv::test_args_still_resolve_forwarded_names_from_the_environment",
  "TestForwardedStdioEnv::test_cwd_and_static_values_stay_intact",
  "TestForwardedStdioEnv::test_env_prefixed_reference_is_forwarded",
  "TestForwardedStdioEnv::test_extra_cannot_replace_forwarded_names",
  "TestForwardedStdioEnv::test_literal_value_keeps_env_block",
  "TestForwardedStdioEnv::test_reference_is_forwarded_instead_of_written",
  "TestForwardedStdioEnv::test_reference_is_forwarded_when_variable_is_unset",
  "TestForwardedStdioEnv::test_reference_under_another_key_keeps_install_time_value",
  "TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[ ${TOKEN} ]",
  "TestForwardedStdioEnv::test_value_with_surrounding_whitespace_is_not_forwarded[${TOKEN}\\n]",
  "TestForwardedStdioEnv::test_written_config_keeps_env_vars_at_server_level",
  "TestForwardedStdioEnvScope::test_baseline_rendering_does_not_warn",
  "TestForwardedStdioEnvScope::test_forwarded_reference_does_not_warn",
  "TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[False]",
  "TestForwardedStdioEnvScope::test_mismatched_and_embedded_references_resolve[True]",
  "TestForwardedStdioEnvScope::test_project_scope_warns_with_names_only",
  "TestForwardedStdioEnvScope::test_user_scope_does_not_emit_the_forwarding_warning",
  "TestForwardedStdioEnvScope::test_user_scope_env_prefixed_reference_resolves",
  "TestForwardedStdioEnvScope::test_user_scope_never_matches_legacy_baseline",
  "TestForwardedStdioEnvScope::test_user_scope_resolves_value_and_has_no_env_vars",
  "TestGetConfigPath::test_project_scope_uses_project_root -> TestGetConfigPath::test_project_scope_uses_project_root_with_ambient_env",
  "TestGetCurrentConfig::test_parses_windows_path_in_literal_quoted_key",
  "TestGetCurrentConfig::test_returns_none_on_toml_decode_error",
  "TestGetCurrentConfig::test_returns_none_on_unicode_decode_error",
  "TestUpdateConfig::test_update_preserves_windows_literal_quoted_path_keys",
  "TestUserScopeStdioOutputUnchanged::test_user_scope_extra_env_vars_passthrough_is_unchanged",
  "TestUserScopeStdioOutputUnchanged::test_user_scope_written_config_matches_previous_output"
 ],
 "tests/unit/test_codex_adapter_phase3.py -> tests/unit/test_codex_adapter_compatibility.py (deleted-equal-copy)": [
  "TestConfigureMcpServer::test_derives_key_from_url_last_segment",
  "TestConfigureMcpServer::test_returns_false_for_empty_server_url",
  "TestConfigureMcpServer::test_returns_false_for_remote_only_server",
  "TestConfigureMcpServer::test_returns_false_on_exception",
  "TestConfigureMcpServer::test_returns_false_when_server_not_found",
  "TestConfigureMcpServer::test_returns_false_when_update_config_fails",
  "TestConfigureMcpServer::test_uses_explicit_server_name_as_key",
  "TestConfigureMcpServer::test_uses_full_url_when_no_slash",
  "TestConfigureMcpServer::test_uses_server_info_cache_when_provided",
  "TestEnsureDockerEnvFlags::test_adds_missing_env_flag_before_image",
  "TestEnsureDockerEnvFlags::test_adds_to_end_when_image_not_identifiable",
  "TestEnsureDockerEnvFlags::test_does_not_duplicate_existing_env_flag",
  "TestEnsureDockerEnvFlags::test_multiple_missing_vars_all_added",
  "TestEnsureDockerEnvFlags::test_no_op_when_env_vars_empty",
  "TestFormatServerConfig::test_docker_package_command",
  "TestFormatServerConfig::test_env_vars_added_to_config",
  "TestFormatServerConfig::test_npm_package_basic",
  "TestFormatServerConfig::test_npm_package_uses_runtime_hint",
  "TestFormatServerConfig::test_npm_package_with_all_args_already_including_pkg",
  "TestFormatServerConfig::test_pypi_package_uses_runtime_hint",
  "TestFormatServerConfig::test_pypi_package_uses_uvx_by_default",
  "TestFormatServerConfig::test_raises_when_no_packages",
  "TestFormatServerConfig::test_raw_stdio_normalizes_workspace_placeholder",
  "TestFormatServerConfig::test_registry_id_is_not_a_native_setting",
  "TestFormatServerConfig::test_uses_raw_stdio_when_present",
  "TestGetConfigPath::test_config_path_ends_with_config_toml",
  "TestGetConfigPath::test_user_scope_uses_home_dir",
  "TestGetCurrentConfig::test_returns_empty_dict_when_file_missing",
  "TestGetCurrentConfig::test_returns_none_on_os_error",
  "TestGetCurrentConfig::test_returns_parsed_toml_when_file_exists",
  "TestInit::test_default_attributes",
  "TestInit::test_registry_client_created",
  "TestInit::test_registry_integration_created",
  "TestInit::test_user_scope_stored",
  "TestInjectDockerEnvVars::test_does_not_duplicate_existing_var",
  "TestInjectDockerEnvVars::test_injects_after_run",
  "TestInjectDockerEnvVars::test_no_op_when_env_vars_empty",
  "TestProcessArguments::test_empty_list_returns_empty",
  "TestProcessArguments::test_env_placeholder_resolved_in_positional",
  "TestProcessArguments::test_named_arg_with_additional_value",
  "TestProcessArguments::test_named_dict_arg_extracted",
  "TestProcessArguments::test_positional_dict_arg_extracted",
  "TestProcessArguments::test_positional_skipped_when_no_value_or_default",
  "TestProcessArguments::test_positional_uses_default_when_value_missing",
  "TestProcessArguments::test_runtime_placeholder_resolved_in_string",
  "TestProcessArguments::test_string_arg_passes_through",
  "TestProcessEnvironmentVariables::test_env_var_resolved_from_os_environ",
  "TestProcessEnvironmentVariables::test_override_takes_priority",
  "TestProcessEnvironmentVariables::test_returns_dict",
  "TestResolveEnvPlaceholders::test_delegates_to_resolve_variable_placeholders",
  "TestResolveVariablePlaceholders::test_empty_string_returned_unchanged",
  "TestResolveVariablePlaceholders::test_env_placeholder_kept_when_not_in_env",
  "TestResolveVariablePlaceholders::test_env_placeholder_replaced",
  "TestResolveVariablePlaceholders::test_multiple_placeholders_replaced",
  "TestResolveVariablePlaceholders::test_none_returned_unchanged",
  "TestResolveVariablePlaceholders::test_plain_string_returned_unchanged",
  "TestResolveVariablePlaceholders::test_runtime_placeholder_kept_when_not_in_vars",
  "TestResolveVariablePlaceholders::test_runtime_placeholder_replaced",
  "TestSelectBestPackage::test_falls_back_to_first_package",
  "TestSelectBestPackage::test_returns_none_for_empty_list",
  "TestSelectBestPackage::test_selects_docker_when_no_npm",
  "TestSelectBestPackage::test_selects_npm_over_docker",
  "TestSelectBestPackage::test_selects_pypi_over_homebrew",
  "TestUpdateConfig::test_update_creates_directory_and_writes",
  "TestUpdateConfig::test_update_creates_mcp_servers_section_if_missing",
  "TestUpdateConfig::test_update_merges_into_existing_mcp_servers",
  "TestUpdateConfig::test_update_returns_false_when_current_config_none"
 ],
 "tests/unit/test_copilot_adapter_phase3.py -> tests/unit/test_copilot_adapter_compatibility.py (deleted-equal-copy)": [
  "TestCollectPreviouslyBakedKeys::test_derives_key_from_url_when_no_server_name",
  "TestCollectPreviouslyBakedKeys::test_env_with_placeholder_value_not_counted_as_baked",
  "TestCollectPreviouslyBakedKeys::test_exception_in_get_current_config_returns_empty",
  "TestCollectPreviouslyBakedKeys::test_headers_with_literal_value_marks_baked",
  "TestCollectPreviouslyBakedKeys::test_headers_with_placeholder_not_baked",
  "TestCollectPreviouslyBakedKeys::test_returns_empty_when_existing_is_not_dict",
  "TestCollectPreviouslyBakedKeys::test_uses_full_url_when_no_slash",
  "TestCollectPreviouslyBakedKeys::test_uses_server_name_as_key_when_provided",
  "TestConfigureMcpServer::test_aggregates_legacy_angle_offenders",
  "TestConfigureMcpServer::test_derives_config_key_from_url_after_slash",
  "TestConfigureMcpServer::test_empty_server_url_returns_false",
  "TestConfigureMcpServer::test_exception_in_format_returns_false_and_prints_error",
  "TestConfigureMcpServer::test_none_server_url_returns_false",
  "TestConfigureMcpServer::test_returns_false_when_server_info_is_none",
  "TestConfigureMcpServer::test_security_upgrade_detected_when_headers_were_baked",
  "TestConfigureMcpServer::test_security_upgrade_when_baked_keys_overlap",
  "TestConfigureMcpServer::test_uses_full_url_as_key_when_no_slash",
  "TestConfigureMcpServer::test_uses_provided_server_name_as_config_key",
  "TestDispatchPackageToConfig::test_docker_package_sets_command_docker",
  "TestDispatchPackageToConfig::test_docker_with_runtime_args_injects_env_vars",
  "TestDispatchPackageToConfig::test_npm_empty_env_not_set",
  "TestDispatchPackageToConfig::test_npm_package_sets_command_npx",
  "TestDispatchPackageToConfig::test_npm_package_uses_runtime_hint_when_provided",
  "TestDispatchPackageToConfig::test_npm_with_env_sets_env_key",
  "TestDispatchPackageToConfig::test_pypi_registry_delegates_to_apply_pypi_homebrew",
  "TestEmitInstallRunSummaryLegacyAngle::test_legacy_angle_offenders_warning_emitted",
  "TestEmitInstallRunSummaryLegacyAngle::test_no_warnings_when_all_state_empty",
  "TestEmitInstallRunSummaryLegacyAngle::test_plural_noun_for_multiple_unset_vars",
  "TestEmitInstallRunSummaryLegacyAngle::test_reset_install_run_state_clears_all_buckets",
  "TestEmitInstallRunSummaryLegacyAngle::test_singular_noun_for_single_unset_var",
  "TestEmitInstallSummary::test_no_op_when_runtime_substitution_not_supported",
  "TestEmitInstallSummary::test_records_vars_from_env_block_in_server_config",
  "TestEmitInstallSummary::test_records_vars_from_headers_block_in_server_config",
  "TestFormatServerConfigNoPackagesNoRemotes::test_packages_path_applies_tools_override",
  "TestFormatServerConfigNoPackagesNoRemotes::test_raises_value_error_when_no_packages_and_no_remotes",
  "TestFormatServerConfigRawStdio::test_raw_stdio_with_args_containing_placeholder",
  "TestFormatServerConfigRawStdio::test_raw_stdio_with_env_vars_translated",
  "TestFormatServerConfigRawStdio::test_raw_stdio_with_tools_override",
  "TestFormatServerConfigRawStdio::test_raw_stdio_without_env_or_args",
  "TestFormatServerConfigRemoteToolsOverride::test_tools_override_applied_on_remote_path",
  "TestGetConfigPath::test_user_scope_returns_path_under_home_copilot -> TestGetConfigPath::test_returns_path_under_home_copilot",
  "TestGetCurrentConfig::test_returns_config_when_file_valid",
  "TestGetCurrentConfig::test_returns_empty_dict_on_json_decode_error",
  "TestGetCurrentConfig::test_returns_empty_dict_on_os_error",
  "TestGetCurrentConfig::test_returns_empty_dict_when_file_missing",
  "TestInjectDockerEnvVars::test_empty_env_vars_no_modification",
  "TestInjectDockerEnvVars::test_injects_env_vars_after_run",
  "TestInjectDockerEnvVars::test_no_injection_when_no_run_command",
  "TestInjectEnvVarsIntoDockerArgs::test_adds_i_and_rm_flags_when_missing",
  "TestInjectEnvVarsIntoDockerArgs::test_does_not_duplicate_i_flag",
  "TestInjectEnvVarsIntoDockerArgs::test_e_flag_followed_by_var_name_replaced",
  "TestInjectEnvVarsIntoDockerArgs::test_empty_env_vars_returns_base_args_with_flags",
  "TestInjectEnvVarsIntoDockerArgs::test_env_var_name_placeholder_replaced_with_e_flag",
  "TestInjectEnvVarsIntoDockerArgs::test_env_vars_not_in_template_appended",
  "TestInjectEnvVarsIntoDockerArgs::test_interactive_flag_recognised",
  "TestIsGithubServerEdgeCases::test_api_github_com_subdomain_accepted",
  "TestIsGithubServerEdgeCases::test_empty_url_returns_false",
  "TestIsGithubServerEdgeCases::test_githubcopilot_com_hostname_accepted",
  "TestIsGithubServerEdgeCases::test_githubcopilot_com_root_hostname_accepted",
  "TestIsGithubServerEdgeCases::test_name_mismatch_returns_false_even_with_valid_host",
  "TestIsGithubServerEdgeCases::test_non_https_url_rejected",
  "TestIsGithubServerEdgeCases::test_unknown_hostname_returns_false",
  "TestModuleLevelHelpers::test_extract_legacy_angle_vars_non_string_returns_empty_set",
  "TestModuleLevelHelpers::test_has_env_placeholder_false_for_plain_string",
  "TestModuleLevelHelpers::test_has_env_placeholder_non_string_returns_false",
  "TestModuleLevelHelpers::test_has_env_placeholder_true_cases",
  "TestModuleLevelHelpers::test_translate_env_placeholder_non_string_passthrough",
  "TestModuleLevelHelpers::test_translate_env_placeholder_string_translations",
  "TestProcessArguments::test_empty_arguments_returns_empty_list",
  "TestProcessArguments::test_named_arg_appends_name_and_value",
  "TestProcessArguments::test_named_arg_skips_when_no_name",
  "TestProcessArguments::test_named_arg_value_same_as_name_not_appended",
  "TestProcessArguments::test_named_arg_value_starts_with_dash_not_appended",
  "TestProcessArguments::test_named_arg_with_empty_value_only_appends_name",
  "TestProcessArguments::test_positional_arg_resolved",
  "TestProcessArguments::test_positional_arg_uses_default_when_no_value",
  "TestProcessArguments::test_positional_arg_with_runtime_var",
  "TestProcessArguments::test_positional_empty_value_skipped",
  "TestProcessArguments::test_string_arg_passed_through_with_placeholder_translation",
  "TestResolveEnvPlaceholders::test_delegates_to_resolve_variable_placeholders",
  "TestResolveEnvVariableLegacyMode::test_legacy_angle_bracket_resolves",
  "TestResolveEnvVariableLegacyMode::test_resolves_from_env_overrides",
  "TestResolveEnvVariableLegacyMode::test_resolves_from_os_environ_when_no_override",
  "TestResolveEnvVariableLegacyMode::test_skips_prompt_in_non_interactive_env",
  "TestResolveEnvVariableLegacyMode::test_skips_prompt_when_e2e_flag_set",
  "TestResolveEnvVariableLegacyMode::test_skips_prompt_when_env_overrides_provided",
  "TestResolveEnvironmentVariablesLegacyMode::test_dict_env_legacy_omits_none",
  "TestResolveEnvironmentVariablesLegacyMode::test_dict_env_legacy_stringifies_non_string_non_none",
  "TestResolveEnvironmentVariablesLegacyMode::test_dict_env_resolves_string_via_resolve_env_variable",
  "TestResolveEnvironmentVariablesLegacyMode::test_list_env_legacy_delegates_to_resolve_env_vars_with_prompting",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_dict_env_skips_empty_name",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_dict_env_skips_none_value",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_default_github_env_preserved",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_regular_var_gets_placeholder",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_skips_empty_name",
  "TestResolveEnvironmentVariablesLegacyMode::test_translate_mode_list_env_skips_non_dict_items",
  "TestResolveVariablePlaceholders::test_dollar_brace_not_confused_with_runtime_var",
  "TestResolveVariablePlaceholders::test_empty_string_returns_empty_string",
  "TestResolveVariablePlaceholders::test_legacy_mode_keeps_angle_bracket_when_not_in_resolved_env",
  "TestResolveVariablePlaceholders::test_legacy_mode_resolves_angle_bracket_from_resolved_env",
  "TestResolveVariablePlaceholders::test_runtime_var_not_substituted_when_no_runtime_vars",
  "TestResolveVariablePlaceholders::test_runtime_var_resolved_at_install_time",
  "TestResolveVariablePlaceholders::test_translate_mode_translates_env_placeholder",
  "TestSelectAndDispatchBestPackage::test_returns_none_when_no_best_package",
  "TestSelectAndDispatchBestPackage::test_set_type_stdio_flag_sets_config_type",
  "TestSelectBestPackage::test_docker_preferred_over_pypi",
  "TestSelectBestPackage::test_empty_packages_returns_none",
  "TestSelectBestPackage::test_first_package_returned_when_none_in_priority",
  "TestSelectBestPackage::test_npm_preferred_over_docker",
  "TestUpdateConfig::test_creates_file_and_mcpservers_key_when_absent",
  "TestUpdateConfig::test_merges_into_existing_config"
 ],
 "tests/unit/test_copilot_adapter_phase3.py -> tests/unit/test_copilot_adapter_compatibility.py (merged)": [
  "TestGetConfigPath::test_project_scope_lookup_does_not_create_github_dir",
  "TestGetConfigPath::test_project_scope_returns_github_mcp_json",
  "TestGetConfigPath::test_user_scope_honors_copilot_home"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 2109,
 "covered_lines_after": 2109
}

…t, audit and view tests

Delete equal copies from test_models_validation_phase3,
test_registry_operations_phase3, test_init_phase3w5, test_audit_phase3w4 and
test_view_command_phase3w5 (kept twins in their behavior-named survivors) and
move their unique tests into those survivors. Fold two extra version
assertions into the survivor skill-validation tests; three view tests whose
survivors already hold every statement plus more assertions map to those
survivors. Remap CI duration seeds.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Daniel Meppiel (danielmeppiel) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

W4 (tests/unit root: models validation, registry operations, init, audit, view) evidence: before 517 after 276 removed 257 added 16; removed = 236 deleted-equal-copy, 21 merged; unmapped 0. Covered lines 6632 before, 6632 after across 557 modules; lines whose covering-context count fell to zero: 0.

Bodies changed during merge: in tests/unit/test_models_validation_rules.py, TestValidateClaudeSkill::test_valid_skill_md_creates_package and TestValidateClaudeSkill::test_skill_md_without_name_uses_dir_name each gain assert returned.package.version == "unknown", folded from their phase3 twins (otherwise identical). No other body changed.

Subsumed pairs (removed -> kept). Both sides share the same CI lane (tests/unit), no markers and no module pytestmark. Class TestDisplayPackageInfo has no bases, decorators or setup on either side, and the helpers _make_logger and _make_package_info are identical. Each survivor runs the same inputs through the same call; it differs only by a superset of assertions:

Removed Kept Survivor adds
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_rich_rendering_no_context_files tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_rich_rendering_no_context_files the capsys capture fixture (observation only) and asserts on "No context" and "No agent"
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_import_error_fallback_text tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_import_error_fallback_text 7 output asserts (both sides already request capsys)
tests/unit/test_view_command_phase3w5.py::TestDisplayPackageInfo::test_no_project_root_skips_lockfile tests/unit/test_view_command_cli_surface.py::TestDisplayPackageInfo::test_no_project_root_skips_lockfile a spy patch on _lookup_lockfile_ref plus lookup.assert_not_called(); with project_root=None neither side reaches that function

Moved unchanged: 7 unique test_registry_operations_phase3 tests and 7 unique test_init_phase3w5 tests move into their survivors (same-named classes with identical context, or appended classes). All 37 test_audit_phase3w4 nodes are equal copies; their twins in test_audit_scan_and_render.py are kept, so no audit or security check was merged or rewritten. Import-name conflict check between merged files: none. Lifecycle and test_architecture_* files are not touched.

Node-set diff (pytest --collect-only -q, before vs after)
before=517 after=276 removed=257 added=16

- tests/unit/test_audit_phase3w4.py (37 removed)
    TestApplyStrip::test_handles_unicode_decode_error
    TestApplyStrip::test_skips_nonexistent_file
    TestApplyStrip::test_skips_outside_project_root
    TestApplyStrip::test_strips_file_with_dangerous_chars
    TestAuditCiGateNodrift::test_exits_one_when_failed
    TestAuditCiGateNodrift::test_exits_zero_when_passed
    TestAuditCiGateNodrift::test_json_output_format
    TestAuditCiGateNodrift::test_no_drift_in_text_mode_warns
    TestAuditCiGateNodrift::test_policy_disabled_auto_discovery
    TestAuditCiGateNodrift::test_sarif_output_format
    TestAuditContentScan::test_dry_run_without_strip_warns
    TestAuditContentScan::test_file_path_mode_clean_file
    TestAuditContentScan::test_format_json_incompatible_with_strip
    TestAuditContentScan::test_no_drift_flag_in_text_mode_warns
    TestAuditContentScan::test_no_lockfile_exits_zero
    TestAuditContentScan::test_strip_dry_run_exits_after_preview
    TestAuditContentScan::test_strip_mode_no_findings_exits_zero
    TestAuditContentScan::test_strip_with_critical_findings_exits_zero
    TestAuditContentScan::test_text_format_with_output_path_errors
    TestAuditContentScanPackage::test_no_deployed_files_in_lockfile
    TestAuditContentScanPackage::test_package_not_in_lockfile
    TestAuditOutcomeCause::test_absent
    TestAuditOutcomeCause::test_cache_miss_fetch_fail_shows_outcome_when_no_err
    TestAuditOutcomeCause::test_empty
    TestAuditOutcomeCause::test_malformed_shows_err_text
    TestAuditOutcomeCause::test_no_git_remote
    TestPreviewStrip::test_empty_findings_returns_zero
    TestPreviewStrip::test_nothing_to_clean_when_only_info
    TestPreviewStrip::test_shows_table_for_critical_findings
    TestPreviewStrip::test_warning_findings_show_in_preview
    TestRenderSummary::test_critical_findings
    TestRenderSummary::test_info_only_findings
    TestRenderSummary::test_info_plus_critical_shows_extra
    TestRenderSummary::test_no_findings
    TestRenderSummary::test_warning_findings
    TestScanSingleFile::test_clean_file_zero_findings
    TestScanSingleFile::test_file_with_critical_chars
- tests/unit/test_init_phase3w5.py (49 removed)
    TestConfirmSetupSummary::test_fallback_text_aborts_on_no
    TestConfirmSetupSummary::test_fallback_text_confirms_proceed
    TestConfirmSetupSummary::test_rich_path_aborts_on_no
    TestConfirmSetupSummary::test_targets_line_shows_in_summary
    TestInitCommand::test_existing_apm_yml_with_yes_overwrites
    TestInitCommand::test_invalid_project_name_exits
    TestInitCommand::test_marketplace_flag_was_removed
    TestInitCommand::test_plugin_flag_was_removed
    TestInitCommand::test_plugin_with_invalid_name_exits
    TestInitCommand::test_project_name_dot_treated_as_none
    TestInitCommand::test_target_flag_passed_through
    TestInitCommand::test_yes_mode_creates_apm_yml
    TestInteractiveProjectSetup::test_fallback_text_path
    TestParseToggleInput::test_all_keyword
    TestParseToggleInput::test_csv_numbers
    TestParseToggleInput::test_empty_response_returns_empty
    TestParseToggleInput::test_invalid_range_non_numeric
    TestParseToggleInput::test_invalid_token
    TestParseToggleInput::test_mixed_range_and_csv
    TestParseToggleInput::test_none_keyword
    TestParseToggleInput::test_number_out_of_bounds
    TestParseToggleInput::test_number_zero_out_of_bounds
    TestParseToggleInput::test_range
    TestParseToggleInput::test_range_out_of_bounds
    TestParseToggleInput::test_single_number
    TestParseToggleInput::test_whitespace_ignored
    TestReadExistingTargets::test_anchored_manifest_is_refused
    TestReadExistingTargets::test_invalid_yaml_returns_empty
    TestReadExistingTargets::test_legacy_singular_target
    TestReadExistingTargets::test_legacy_target_list
    TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared0-expected0]
    TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared1-expected1]
    TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared2-expected2]
    TestReadExistingTargets::test_no_apm_yml_returns_empty
    TestReadExistingTargets::test_no_target_field_returns_empty
    TestReadExistingTargets::test_non_dict_yaml_returns_empty
    TestReadExistingTargets::test_plural_targets_csv_string
    TestReadExistingTargets::test_plural_targets_list
    TestReadExistingTargets::test_unmappable_target_is_refused
    TestResolveInitTargets::test_anchored_existing_manifest_exits_before_writing_when_non_interactive
    TestResolveInitTargets::test_apm_yml_exists_seeds_prechecked
    TestResolveInitTargets::test_ide_target_flag_is_refused_before_writing
    TestResolveInitTargets::test_non_tty_no_signals_returns_none
    TestResolveInitTargets::test_target_flag_list_wins
    TestResolveInitTargets::test_target_flag_wins_unconditionally
    TestResolveInitTargets::test_unmappable_existing_target_exits_before_writing_when_non_interactive
    TestResolveInitTargets::test_unmappable_existing_target_warns_and_prompts_when_interactive
    TestResolveInitTargets::test_yes_flag_no_signals_returns_none
    TestResolveInitTargets::test_yes_flag_non_interactive_with_signals
- tests/unit/test_models_validation_phase3.py (81 removed)
    TestApmYmlDeclaresdependencies::test_returns_false_empty_yaml
    TestApmYmlDeclaresdependencies::test_returns_false_file_missing
    TestApmYmlDeclaresdependencies::test_returns_false_for_empty_dep_list
    TestApmYmlDeclaresdependencies::test_returns_false_no_deps_key
    TestApmYmlDeclaresdependencies::test_returns_false_on_malformed_yaml
    TestApmYmlDeclaresdependencies::test_returns_false_when_deps_block_not_dict
    TestApmYmlDeclaresdependencies::test_returns_true_for_apm_dep
    TestApmYmlDeclaresdependencies::test_returns_true_for_dev_dependencies
    TestApmYmlDeclaresdependencies::test_returns_true_for_mcp_dep
    TestDetectPackageTypeCascade::test_apm_package_with_apm_dir
    TestDetectPackageTypeCascade::test_apm_yml_no_apm_dir_no_deps_returns_invalid
    TestDetectPackageTypeCascade::test_apm_yml_with_deps_no_apm_dir_returns_apm_package
    TestDetectPackageTypeCascade::test_claude_skill_skill_md_only
    TestDetectPackageTypeCascade::test_hook_package_hook_json_only
    TestDetectPackageTypeCascade::test_hybrid_apm_yml_and_skill_md
    TestDetectPackageTypeCascade::test_invalid_nothing_recognizable
    TestDetectPackageTypeCascade::test_marketplace_plugin_via_claude_plugin_dir
    TestDetectPackageTypeCascade::test_marketplace_plugin_via_plugin_json
    TestDetectPackageTypeCascade::test_skill_bundle_nested_skills
    TestDetectionEvidence::test_has_plugin_evidence_false_by_default
    TestDetectionEvidence::test_has_plugin_evidence_true_for_claude_plugin_dir
    TestDetectionEvidence::test_has_plugin_evidence_true_when_plugin_manifest
    TestDetectionEvidence::test_plugin_dirs_present_ordering
    TestEnumValues::test_invalid_virtual_package_extension_error
    TestEnumValues::test_package_type_values
    TestEnumValues::test_validation_error_values
    TestGatherDetectionEvidence::test_detects_apm_yml
    TestGatherDetectionEvidence::test_detects_claude_plugin_dir
    TestGatherDetectionEvidence::test_detects_hook_json
    TestGatherDetectionEvidence::test_detects_nested_skill_dirs
    TestGatherDetectionEvidence::test_detects_plugin_dirs_present
    TestGatherDetectionEvidence::test_detects_skill_md
    TestGatherDetectionEvidence::test_empty_dir_returns_all_false
    TestGatherDetectionEvidence::test_nested_dir_without_skill_md_not_detected
    TestGatherDetectionEvidence::test_plugin_json_detected
    TestHasHookJson::test_returns_false_for_hooks_dir_with_no_json
    TestHasHookJson::test_returns_false_when_no_hooks_dir
    TestHasHookJson::test_returns_true_for_apm_hooks_dir_with_json
    TestHasHookJson::test_returns_true_for_hooks_dir_with_json
    TestPackageContentTypeFromString::test_empty_string_raises
    TestPackageContentTypeFromString::test_hybrid_lower
    TestPackageContentTypeFromString::test_instructions_lower
    TestPackageContentTypeFromString::test_invalid_value_lists_valid_types
    TestPackageContentTypeFromString::test_invalid_value_raises
    TestPackageContentTypeFromString::test_leading_trailing_whitespace_stripped
    TestPackageContentTypeFromString::test_mixed_case_accepted
    TestPackageContentTypeFromString::test_prompts_lower
    TestPackageContentTypeFromString::test_skill_lower
    TestPackageContentTypeFromString::test_uppercase_accepted
    TestValidateApmPackage::test_claude_skill_dispatched
    TestValidateApmPackage::test_file_instead_of_dir_error
    TestValidateApmPackage::test_hook_package_dispatched
    TestValidateApmPackage::test_hybrid_dispatched
    TestValidateApmPackage::test_invalid_apm_is_file_not_dir
    TestValidateApmPackage::test_invalid_apm_yml_with_no_apm_dir
    TestValidateApmPackage::test_invalid_nothing_present
    TestValidateApmPackage::test_marketplace_plugin_dispatched
    TestValidateApmPackage::test_nonexistent_path_error
    TestValidateApmPackage::test_skill_bundle_dispatched
    TestValidateApmPackageWithYml::test_apm_dir_is_file_fails
    TestValidateApmPackageWithYml::test_bad_semver_warns
    TestValidateApmPackageWithYml::test_dep_only_package_is_valid
    TestValidateApmPackageWithYml::test_empty_apm_dir_warns_no_primitives
    TestValidateApmPackageWithYml::test_empty_primitive_file_warns
    TestValidateApmPackageWithYml::test_no_apm_dir_no_deps_fails
    TestValidateApmPackageWithYml::test_valid_apm_package_with_instructions
    TestValidateClaudeSkill::test_skill_md_without_name_uses_dir_name
    TestValidateClaudeSkill::test_unreadable_skill_md_adds_error
    TestValidateClaudeSkill::test_valid_skill_md_creates_package
    TestValidateHookPackage::test_package_version_is_1_0_0
    TestValidateHookPackage::test_returns_valid_result_with_package
    TestValidationResult::test_add_error_sets_invalid
    TestValidationResult::test_add_multiple_errors
    TestValidationResult::test_add_warning_keeps_valid
    TestValidationResult::test_has_issues_false_when_clean
    TestValidationResult::test_has_issues_true_on_error
    TestValidationResult::test_has_issues_true_on_warning
    TestValidationResult::test_initial_state_is_valid
    TestValidationResult::test_summary_invalid_with_errors
    TestValidationResult::test_summary_valid_no_warnings
    TestValidationResult::test_summary_valid_with_warnings
- tests/unit/test_registry_operations_phase3.py (57 removed)
    TestBatchFetchServerInfo::test_returns_empty_for_empty_list
    TestBatchFetchServerInfo::test_returns_none_on_exception
    TestBatchFetchServerInfo::test_returns_server_info_for_all_refs
    TestCheckServersNeedingInstallation::test_all_installed_returns_empty
    TestCheckServersNeedingInstallation::test_empty_server_list_returns_empty
    TestCheckServersNeedingInstallation::test_prevalidated_server_cache_avoids_registry_lookup
    TestCheckServersNeedingInstallation::test_registry_exception_marks_as_needing_install
    TestCheckServersNeedingInstallation::test_registry_returns_none_marks_as_needing_install
    TestCheckServersNeedingInstallation::test_server_info_no_id_marks_as_needing_install
    TestCheckServersNeedingInstallation::test_some_missing_returns_those
    TestCollectEnvironmentVariables::test_extracts_camel_case_env_vars
    TestCollectEnvironmentVariables::test_extracts_docker_args_env_vars
    TestCollectEnvironmentVariables::test_extracts_snake_case_env_vars
    TestCollectEnvironmentVariables::test_no_duplicate_vars_across_servers
    TestCollectEnvironmentVariables::test_returns_empty_for_none_server_info
    TestCollectEnvironmentVariables::test_returns_empty_when_no_packages
    TestCollectEnvironmentVariables::test_uses_batch_fetch_when_no_cache
    TestCollectRuntimeVariables::test_ci_keeps_required_runtime_defaults_without_prompting
    TestCollectRuntimeVariables::test_collects_variables_from_runtime_arguments
    TestCollectRuntimeVariables::test_empty_secret_response_retains_hidden_registry_default
    TestCollectRuntimeVariables::test_hides_required_secret_runtime_default_while_allowing_override
    TestCollectRuntimeVariables::test_preserves_variable_default_and_secret_metadata
    TestCollectRuntimeVariables::test_prompts_for_required_runtime_default_as_an_overrideable_suggestion
    TestCollectRuntimeVariables::test_returns_empty_when_no_packages
    TestCollectRuntimeVariables::test_skips_exception_servers
    TestCollectRuntimeVariables::test_skips_non_string_runtime_variable_default
    TestCollectRuntimeVariables::test_uses_batch_fetch_when_no_cache
    TestGetInstalledServerIds::test_claude_extracts_ids
    TestGetInstalledServerIds::test_client_exception_skips_runtime
    TestGetInstalledServerIds::test_codex_extracts_ids
    TestGetInstalledServerIds::test_config_is_not_dict_skipped
    TestGetInstalledServerIds::test_copilot_extracts_ids
    TestGetInstalledServerIds::test_import_error_returns_empty
    TestGetInstalledServerIds::test_server_without_id_not_included
    TestGetInstalledServerIds::test_vscode_mcp_servers_key
    TestGetInstalledServerIds::test_vscode_servers_key
    TestMCPServerOperationsInit::test_creates_registry_client
    TestMCPServerOperationsInit::test_custom_url_passed_to_client
    TestPromptForEnvironmentVariables::test_buildkite_env_triggers_ci_mode
    TestPromptForEnvironmentVariables::test_ci_mode_uses_defaults
    TestPromptForEnvironmentVariables::test_click_fallback_prompts_for_required_default_override
    TestPromptForEnvironmentVariables::test_click_fallback_when_no_rich
    TestPromptForEnvironmentVariables::test_e2e_mode_ado_token_var
    TestPromptForEnvironmentVariables::test_e2e_mode_copilot_token_var
    TestPromptForEnvironmentVariables::test_e2e_mode_generic_token_var
    TestPromptForEnvironmentVariables::test_e2e_mode_github_dynamic_toolsets_default
    TestPromptForEnvironmentVariables::test_e2e_mode_optional_var_omitted_unless_default
    TestPromptForEnvironmentVariables::test_e2e_mode_uses_defaults
    TestPromptForEnvironmentVariables::test_e2e_mode_uses_existing_env_var
    TestPromptForEnvironmentVariables::test_github_actions_env_triggers_ci_mode
    TestPromptForEnvironmentVariables::test_rich_prompt_used_in_interactive_mode
    TestPromptForEnvironmentVariables::test_rich_uses_existing_env_var_without_prompting
    TestValidateServersExist::test_all_valid
    TestValidateServersExist::test_empty_list_returns_empty
    TestValidateServersExist::test_network_error_with_custom_url_raises
    TestValidateServersExist::test_network_error_without_custom_url_assumes_valid
    TestValidateServersExist::test_not_found_returned_as_invalid
- tests/unit/test_view_command_phase3w5.py (33 removed)
    TestDisplayMarketplacePlugin::test_dict_source_with_ref_rendered
    TestDisplayMarketplacePlugin::test_fetch_or_cache_error_exits
    TestDisplayMarketplacePlugin::test_get_marketplace_by_name_error_exits
    TestDisplayMarketplacePlugin::test_import_error_fallback_text_output
    TestDisplayMarketplacePlugin::test_no_version_no_description_no_tags
    TestDisplayMarketplacePlugin::test_plugin_not_found_exits
    TestDisplayMarketplacePlugin::test_string_source_rendered
    TestDisplayPackageInfo::test_exception_calls_sys_exit
    TestDisplayPackageInfo::test_import_error_fallback_text
    TestDisplayPackageInfo::test_no_project_root_skips_lockfile
    TestDisplayPackageInfo::test_rich_rendering_no_context_files
    TestDisplayPackageInfo::test_rich_rendering_with_hooks
    TestDisplayPackageInfo::test_rich_rendering_with_locked_ref_and_commit
    TestDisplayVersions::test_import_error_plain_text_fallback
    TestDisplayVersions::test_invalid_package_ref_exits
    TestDisplayVersions::test_list_remote_refs_runtime_error_exits
    TestDisplayVersions::test_marketplace_ref_dispatches_to_display_marketplace
    TestDisplayVersions::test_no_refs_logs_warning
    TestDisplayVersions::test_rich_table_rendered_with_refs
    TestResolvePackagePath::test_direct_match_with_apm_yml
    TestResolvePackagePath::test_direct_match_with_skill_md
    TestResolvePackagePath::test_ensure_path_within_error_returns_none
    TestResolvePackagePath::test_fallback_scan_matches_org_slash_repo
    TestResolvePackagePath::test_fallback_scan_matches_repo_name
    TestResolvePackagePath::test_fallback_skips_hidden_dirs
    TestResolvePackagePath::test_not_found_calls_sys_exit
    TestResolvePackagePath::test_validate_path_traversal_error_returns_none
    TestViewCommand::test_global_flag_uses_user_scope
    TestViewCommand::test_marketplace_ref_without_field_calls_display_plugin
    TestViewCommand::test_no_apm_modules_exits
    TestViewCommand::test_package_path_none_exits
    TestViewCommand::test_unknown_field_exits
    TestViewCommand::test_versions_field_calls_display_versions

added (16; every one is a merged or renamed node listed in the mapping):
+ tests/unit/test_init_command_selection.py::TestReadExistingTargets::test_anchored_manifest_is_refused
+ tests/unit/test_init_command_selection.py::TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared0-expected0]
+ tests/unit/test_init_command_selection.py::TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared1-expected1]
+ tests/unit/test_init_command_selection.py::TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared2-expected2]
+ tests/unit/test_init_command_selection.py::TestReadExistingTargets::test_unmappable_target_is_refused
+ tests/unit/test_init_command_selection.py::TestResolveInitTargets::test_anchored_existing_manifest_exits_before_writing_when_non_interactive
+ tests/unit/test_init_command_selection.py::TestResolveInitTargets::test_ide_target_flag_is_refused_before_writing
+ tests/unit/test_init_command_selection.py::TestResolveInitTargets::test_unmappable_existing_target_exits_before_writing_when_non_interactive
+ tests/unit/test_init_command_selection.py::TestResolveInitTargets::test_unmappable_existing_target_warns_and_prompts_when_interactive
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_ci_keeps_required_runtime_defaults_without_prompting
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_empty_secret_response_retains_hidden_registry_default
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_hides_required_secret_runtime_default_while_allowing_override
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_preserves_variable_default_and_secret_metadata
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_prompts_for_required_runtime_default_as_an_overrideable_suggestion
+ tests/unit/test_registry_operations_state.py::TestCollectRuntimeVariables::test_skips_non_string_runtime_variable_default
+ tests/unit/test_registry_operations_state.py::TestPromptForEnvironmentVariables::test_click_fallback_prompts_for_required_default_override
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/test_audit_phase3w4.py -> tests/unit/test_audit_scan_and_render.py (deleted-equal-copy)": [
  "TestApplyStrip::test_handles_unicode_decode_error",
  "TestApplyStrip::test_skips_nonexistent_file",
  "TestApplyStrip::test_skips_outside_project_root",
  "TestApplyStrip::test_strips_file_with_dangerous_chars",
  "TestAuditCiGateNodrift::test_exits_one_when_failed",
  "TestAuditCiGateNodrift::test_exits_zero_when_passed",
  "TestAuditCiGateNodrift::test_json_output_format",
  "TestAuditCiGateNodrift::test_no_drift_in_text_mode_warns",
  "TestAuditCiGateNodrift::test_policy_disabled_auto_discovery",
  "TestAuditCiGateNodrift::test_sarif_output_format",
  "TestAuditContentScan::test_dry_run_without_strip_warns",
  "TestAuditContentScan::test_file_path_mode_clean_file",
  "TestAuditContentScan::test_format_json_incompatible_with_strip",
  "TestAuditContentScan::test_no_drift_flag_in_text_mode_warns",
  "TestAuditContentScan::test_no_lockfile_exits_zero",
  "TestAuditContentScan::test_strip_dry_run_exits_after_preview",
  "TestAuditContentScan::test_strip_mode_no_findings_exits_zero",
  "TestAuditContentScan::test_strip_with_critical_findings_exits_zero",
  "TestAuditContentScan::test_text_format_with_output_path_errors",
  "TestAuditContentScanPackage::test_no_deployed_files_in_lockfile",
  "TestAuditContentScanPackage::test_package_not_in_lockfile",
  "TestAuditOutcomeCause::test_absent",
  "TestAuditOutcomeCause::test_cache_miss_fetch_fail_shows_outcome_when_no_err",
  "TestAuditOutcomeCause::test_empty",
  "TestAuditOutcomeCause::test_malformed_shows_err_text",
  "TestAuditOutcomeCause::test_no_git_remote",
  "TestPreviewStrip::test_empty_findings_returns_zero",
  "TestPreviewStrip::test_nothing_to_clean_when_only_info",
  "TestPreviewStrip::test_shows_table_for_critical_findings",
  "TestPreviewStrip::test_warning_findings_show_in_preview",
  "TestRenderSummary::test_critical_findings",
  "TestRenderSummary::test_info_only_findings",
  "TestRenderSummary::test_info_plus_critical_shows_extra",
  "TestRenderSummary::test_no_findings",
  "TestRenderSummary::test_warning_findings",
  "TestScanSingleFile::test_clean_file_zero_findings",
  "TestScanSingleFile::test_file_with_critical_chars"
 ],
 "tests/unit/test_init_phase3w5.py -> tests/unit/test_init_command_selection.py (deleted-equal-copy)": [
  "TestConfirmSetupSummary::test_fallback_text_aborts_on_no",
  "TestConfirmSetupSummary::test_fallback_text_confirms_proceed",
  "TestConfirmSetupSummary::test_rich_path_aborts_on_no",
  "TestConfirmSetupSummary::test_targets_line_shows_in_summary",
  "TestInitCommand::test_existing_apm_yml_with_yes_overwrites",
  "TestInitCommand::test_invalid_project_name_exits",
  "TestInitCommand::test_marketplace_flag_was_removed",
  "TestInitCommand::test_plugin_flag_was_removed",
  "TestInitCommand::test_plugin_with_invalid_name_exits",
  "TestInitCommand::test_project_name_dot_treated_as_none",
  "TestInitCommand::test_target_flag_passed_through",
  "TestInitCommand::test_yes_mode_creates_apm_yml",
  "TestInteractiveProjectSetup::test_fallback_text_path",
  "TestParseToggleInput::test_all_keyword",
  "TestParseToggleInput::test_csv_numbers",
  "TestParseToggleInput::test_empty_response_returns_empty",
  "TestParseToggleInput::test_invalid_range_non_numeric",
  "TestParseToggleInput::test_invalid_token",
  "TestParseToggleInput::test_mixed_range_and_csv",
  "TestParseToggleInput::test_none_keyword",
  "TestParseToggleInput::test_number_out_of_bounds",
  "TestParseToggleInput::test_number_zero_out_of_bounds",
  "TestParseToggleInput::test_range",
  "TestParseToggleInput::test_range_out_of_bounds",
  "TestParseToggleInput::test_single_number",
  "TestParseToggleInput::test_whitespace_ignored",
  "TestReadExistingTargets::test_invalid_yaml_returns_empty",
  "TestReadExistingTargets::test_legacy_singular_target",
  "TestReadExistingTargets::test_legacy_target_list",
  "TestReadExistingTargets::test_no_apm_yml_returns_empty",
  "TestReadExistingTargets::test_no_target_field_returns_empty",
  "TestReadExistingTargets::test_non_dict_yaml_returns_empty",
  "TestReadExistingTargets::test_plural_targets_csv_string",
  "TestReadExistingTargets::test_plural_targets_list",
  "TestResolveInitTargets::test_apm_yml_exists_seeds_prechecked",
  "TestResolveInitTargets::test_non_tty_no_signals_returns_none",
  "TestResolveInitTargets::test_target_flag_list_wins",
  "TestResolveInitTargets::test_target_flag_wins_unconditionally",
  "TestResolveInitTargets::test_yes_flag_no_signals_returns_none",
  "TestResolveInitTargets::test_yes_flag_non_interactive_with_signals"
 ],
 "tests/unit/test_init_phase3w5.py -> tests/unit/test_init_command_selection.py (merged)": [
  "TestReadExistingTargets::test_anchored_manifest_is_refused",
  "TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared0-expected0]",
  "TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared1-expected1]",
  "TestReadExistingTargets::test_legacy_target_uses_the_migrate_mapping[declared2-expected2]",
  "TestReadExistingTargets::test_unmappable_target_is_refused",
  "TestResolveInitTargets::test_anchored_existing_manifest_exits_before_writing_when_non_interactive",
  "TestResolveInitTargets::test_ide_target_flag_is_refused_before_writing",
  "TestResolveInitTargets::test_unmappable_existing_target_exits_before_writing_when_non_interactive",
  "TestResolveInitTargets::test_unmappable_existing_target_warns_and_prompts_when_interactive"
 ],
 "tests/unit/test_models_validation_phase3.py -> tests/unit/test_models_validation_rules.py (deleted-equal-copy)": [
  "TestApmYmlDeclaresdependencies::test_returns_false_empty_yaml",
  "TestApmYmlDeclaresdependencies::test_returns_false_file_missing",
  "TestApmYmlDeclaresdependencies::test_returns_false_for_empty_dep_list",
  "TestApmYmlDeclaresdependencies::test_returns_false_no_deps_key",
  "TestApmYmlDeclaresdependencies::test_returns_false_on_malformed_yaml",
  "TestApmYmlDeclaresdependencies::test_returns_false_when_deps_block_not_dict",
  "TestApmYmlDeclaresdependencies::test_returns_true_for_apm_dep",
  "TestApmYmlDeclaresdependencies::test_returns_true_for_dev_dependencies",
  "TestApmYmlDeclaresdependencies::test_returns_true_for_mcp_dep",
  "TestDetectPackageTypeCascade::test_apm_package_with_apm_dir",
  "TestDetectPackageTypeCascade::test_apm_yml_no_apm_dir_no_deps_returns_invalid",
  "TestDetectPackageTypeCascade::test_apm_yml_with_deps_no_apm_dir_returns_apm_package",
  "TestDetectPackageTypeCascade::test_claude_skill_skill_md_only",
  "TestDetectPackageTypeCascade::test_hook_package_hook_json_only",
  "TestDetectPackageTypeCascade::test_hybrid_apm_yml_and_skill_md",
  "TestDetectPackageTypeCascade::test_invalid_nothing_recognizable",
  "TestDetectPackageTypeCascade::test_marketplace_plugin_via_claude_plugin_dir",
  "TestDetectPackageTypeCascade::test_marketplace_plugin_via_plugin_json",
  "TestDetectPackageTypeCascade::test_skill_bundle_nested_skills",
  "TestDetectionEvidence::test_has_plugin_evidence_false_by_default",
  "TestDetectionEvidence::test_has_plugin_evidence_true_for_claude_plugin_dir",
  "TestDetectionEvidence::test_has_plugin_evidence_true_when_plugin_manifest",
  "TestDetectionEvidence::test_plugin_dirs_present_ordering",
  "TestEnumValues::test_invalid_virtual_package_extension_error",
  "TestEnumValues::test_package_type_values",
  "TestEnumValues::test_validation_error_values",
  "TestGatherDetectionEvidence::test_detects_apm_yml",
  "TestGatherDetectionEvidence::test_detects_claude_plugin_dir",
  "TestGatherDetectionEvidence::test_detects_hook_json",
  "TestGatherDetectionEvidence::test_detects_nested_skill_dirs",
  "TestGatherDetectionEvidence::test_detects_plugin_dirs_present",
  "TestGatherDetectionEvidence::test_detects_skill_md",
  "TestGatherDetectionEvidence::test_empty_dir_returns_all_false",
  "TestGatherDetectionEvidence::test_nested_dir_without_skill_md_not_detected",
  "TestGatherDetectionEvidence::test_plugin_json_detected",
  "TestHasHookJson::test_returns_false_for_hooks_dir_with_no_json",
  "TestHasHookJson::test_returns_false_when_no_hooks_dir",
  "TestHasHookJson::test_returns_true_for_apm_hooks_dir_with_json",
  "TestHasHookJson::test_returns_true_for_hooks_dir_with_json",
  "TestPackageContentTypeFromString::test_empty_string_raises",
  "TestPackageContentTypeFromString::test_hybrid_lower",
  "TestPackageContentTypeFromString::test_instructions_lower",
  "TestPackageContentTypeFromString::test_invalid_value_lists_valid_types",
  "TestPackageContentTypeFromString::test_invalid_value_raises",
  "TestPackageContentTypeFromString::test_leading_trailing_whitespace_stripped",
  "TestPackageContentTypeFromString::test_mixed_case_accepted",
  "TestPackageContentTypeFromString::test_prompts_lower",
  "TestPackageContentTypeFromString::test_skill_lower",
  "TestPackageContentTypeFromString::test_uppercase_accepted",
  "TestValidateApmPackage::test_claude_skill_dispatched",
  "TestValidateApmPackage::test_file_instead_of_dir_error",
  "TestValidateApmPackage::test_hook_package_dispatched",
  "TestValidateApmPackage::test_hybrid_dispatched",
  "TestValidateApmPackage::test_invalid_apm_is_file_not_dir",
  "TestValidateApmPackage::test_invalid_apm_yml_with_no_apm_dir",
  "TestValidateApmPackage::test_invalid_nothing_present",
  "TestValidateApmPackage::test_marketplace_plugin_dispatched",
  "TestValidateApmPackage::test_nonexistent_path_error",
  "TestValidateApmPackage::test_skill_bundle_dispatched",
  "TestValidateApmPackageWithYml::test_apm_dir_is_file_fails",
  "TestValidateApmPackageWithYml::test_bad_semver_warns",
  "TestValidateApmPackageWithYml::test_dep_only_package_is_valid",
  "TestValidateApmPackageWithYml::test_empty_apm_dir_warns_no_primitives",
  "TestValidateApmPackageWithYml::test_empty_primitive_file_warns",
  "TestValidateApmPackageWithYml::test_no_apm_dir_no_deps_fails",
  "TestValidateApmPackageWithYml::test_valid_apm_package_with_instructions",
  "TestValidateClaudeSkill::test_unreadable_skill_md_adds_error",
  "TestValidateHookPackage::test_package_version_is_1_0_0",
  "TestValidateHookPackage::test_returns_valid_result_with_package",
  "TestValidationResult::test_add_error_sets_invalid",
  "TestValidationResult::test_add_multiple_errors",
  "TestValidationResult::test_add_warning_keeps_valid",
  "TestValidationResult::test_has_issues_false_when_clean",
  "TestValidationResult::test_has_issues_true_on_error",
  "TestValidationResult::test_has_issues_true_on_warning",
  "TestValidationResult::test_initial_state_is_valid",
  "TestValidationResult::test_summary_invalid_with_errors",
  "TestValidationResult::test_summary_valid_no_warnings",
  "TestValidationResult::test_summary_valid_with_warnings"
 ],
 "tests/unit/test_models_validation_phase3.py -> tests/unit/test_models_validation_rules.py (merged)": [
  "TestValidateClaudeSkill::test_skill_md_without_name_uses_dir_name",
  "TestValidateClaudeSkill::test_valid_skill_md_creates_package"
 ],
 "tests/unit/test_registry_operations_phase3.py -> tests/unit/test_registry_operations_state.py (deleted-equal-copy)": [
  "TestBatchFetchServerInfo::test_returns_empty_for_empty_list",
  "TestBatchFetchServerInfo::test_returns_none_on_exception",
  "TestBatchFetchServerInfo::test_returns_server_info_for_all_refs",
  "TestCheckServersNeedingInstallation::test_all_installed_returns_empty",
  "TestCheckServersNeedingInstallation::test_empty_server_list_returns_empty",
  "TestCheckServersNeedingInstallation::test_prevalidated_server_cache_avoids_registry_lookup",
  "TestCheckServersNeedingInstallation::test_registry_exception_marks_as_needing_install",
  "TestCheckServersNeedingInstallation::test_registry_returns_none_marks_as_needing_install",
  "TestCheckServersNeedingInstallation::test_server_info_no_id_marks_as_needing_install",
  "TestCheckServersNeedingInstallation::test_some_missing_returns_those",
  "TestCollectEnvironmentVariables::test_extracts_camel_case_env_vars",
  "TestCollectEnvironmentVariables::test_extracts_docker_args_env_vars",
  "TestCollectEnvironmentVariables::test_extracts_snake_case_env_vars",
  "TestCollectEnvironmentVariables::test_no_duplicate_vars_across_servers",
  "TestCollectEnvironmentVariables::test_returns_empty_for_none_server_info",
  "TestCollectEnvironmentVariables::test_returns_empty_when_no_packages",
  "TestCollectEnvironmentVariables::test_uses_batch_fetch_when_no_cache",
  "TestCollectRuntimeVariables::test_collects_variables_from_runtime_arguments",
  "TestCollectRuntimeVariables::test_returns_empty_when_no_packages",
  "TestCollectRuntimeVariables::test_skips_exception_servers",
  "TestCollectRuntimeVariables::test_uses_batch_fetch_when_no_cache",
  "TestGetInstalledServerIds::test_claude_extracts_ids",
  "TestGetInstalledServerIds::test_client_exception_skips_runtime",
  "TestGetInstalledServerIds::test_codex_extracts_ids",
  "TestGetInstalledServerIds::test_config_is_not_dict_skipped",
  "TestGetInstalledServerIds::test_copilot_extracts_ids",
  "TestGetInstalledServerIds::test_import_error_returns_empty",
  "TestGetInstalledServerIds::test_server_without_id_not_included",
  "TestGetInstalledServerIds::test_vscode_mcp_servers_key",
  "TestGetInstalledServerIds::test_vscode_servers_key",
  "TestMCPServerOperationsInit::test_creates_registry_client",
  "TestMCPServerOperationsInit::test_custom_url_passed_to_client",
  "TestPromptForEnvironmentVariables::test_buildkite_env_triggers_ci_mode",
  "TestPromptForEnvironmentVariables::test_ci_mode_uses_defaults",
  "TestPromptForEnvironmentVariables::test_click_fallback_when_no_rich",
  "TestPromptForEnvironmentVariables::test_e2e_mode_ado_token_var",
  "TestPromptForEnvironmentVariables::test_e2e_mode_copilot_token_var",
  "TestPromptForEnvironmentVariables::test_e2e_mode_generic_token_var",
  "TestPromptForEnvironmentVariables::test_e2e_mode_github_dynamic_toolsets_default",
  "TestPromptForEnvironmentVariables::test_e2e_mode_optional_var_omitted_unless_default",
  "TestPromptForEnvironmentVariables::test_e2e_mode_uses_defaults",
  "TestPromptForEnvironmentVariables::test_e2e_mode_uses_existing_env_var",
  "TestPromptForEnvironmentVariables::test_github_actions_env_triggers_ci_mode",
  "TestPromptForEnvironmentVariables::test_rich_prompt_used_in_interactive_mode",
  "TestPromptForEnvironmentVariables::test_rich_uses_existing_env_var_without_prompting",
  "TestValidateServersExist::test_all_valid",
  "TestValidateServersExist::test_empty_list_returns_empty",
  "TestValidateServersExist::test_network_error_with_custom_url_raises",
  "TestValidateServersExist::test_network_error_without_custom_url_assumes_valid",
  "TestValidateServersExist::test_not_found_returned_as_invalid"
 ],
 "tests/unit/test_registry_operations_phase3.py -> tests/unit/test_registry_operations_state.py (merged)": [
  "TestCollectRuntimeVariables::test_ci_keeps_required_runtime_defaults_without_prompting",
  "TestCollectRuntimeVariables::test_empty_secret_response_retains_hidden_registry_default",
  "TestCollectRuntimeVariables::test_hides_required_secret_runtime_default_while_allowing_override",
  "TestCollectRuntimeVariables::test_preserves_variable_default_and_secret_metadata",
  "TestCollectRuntimeVariables::test_prompts_for_required_runtime_default_as_an_overrideable_suggestion",
  "TestCollectRuntimeVariables::test_skips_non_string_runtime_variable_default",
  "TestPromptForEnvironmentVariables::test_click_fallback_prompts_for_required_default_override"
 ],
 "tests/unit/test_view_command_phase3w5.py -> tests/unit/test_view_command_cli_surface.py (deleted-equal-copy)": [
  "TestDisplayMarketplacePlugin::test_dict_source_with_ref_rendered",
  "TestDisplayMarketplacePlugin::test_fetch_or_cache_error_exits",
  "TestDisplayMarketplacePlugin::test_get_marketplace_by_name_error_exits",
  "TestDisplayMarketplacePlugin::test_import_error_fallback_text_output",
  "TestDisplayMarketplacePlugin::test_no_version_no_description_no_tags",
  "TestDisplayMarketplacePlugin::test_plugin_not_found_exits",
  "TestDisplayMarketplacePlugin::test_string_source_rendered",
  "TestDisplayPackageInfo::test_exception_calls_sys_exit",
  "TestDisplayPackageInfo::test_rich_rendering_with_hooks",
  "TestDisplayPackageInfo::test_rich_rendering_with_locked_ref_and_commit",
  "TestDisplayVersions::test_import_error_plain_text_fallback",
  "TestDisplayVersions::test_invalid_package_ref_exits",
  "TestDisplayVersions::test_list_remote_refs_runtime_error_exits",
  "TestDisplayVersions::test_marketplace_ref_dispatches_to_display_marketplace",
  "TestDisplayVersions::test_no_refs_logs_warning",
  "TestDisplayVersions::test_rich_table_rendered_with_refs",
  "TestResolvePackagePath::test_direct_match_with_apm_yml",
  "TestResolvePackagePath::test_direct_match_with_skill_md",
  "TestResolvePackagePath::test_ensure_path_within_error_returns_none",
  "TestResolvePackagePath::test_fallback_scan_matches_org_slash_repo",
  "TestResolvePackagePath::test_fallback_scan_matches_repo_name",
  "TestResolvePackagePath::test_fallback_skips_hidden_dirs",
  "TestResolvePackagePath::test_not_found_calls_sys_exit",
  "TestResolvePackagePath::test_validate_path_traversal_error_returns_none",
  "TestViewCommand::test_global_flag_uses_user_scope",
  "TestViewCommand::test_marketplace_ref_without_field_calls_display_plugin",
  "TestViewCommand::test_no_apm_modules_exits",
  "TestViewCommand::test_package_path_none_exits",
  "TestViewCommand::test_unknown_field_exits",
  "TestViewCommand::test_versions_field_calls_display_versions"
 ],
 "tests/unit/test_view_command_phase3w5.py -> tests/unit/test_view_command_cli_surface.py (merged)": [
  "TestDisplayPackageInfo::test_import_error_fallback_text",
  "TestDisplayPackageInfo::test_no_project_root_skips_lockfile",
  "TestDisplayPackageInfo::test_rich_rendering_no_context_files"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 6632,
 "covered_lines_after": 6632
}

…utdated and smaller unit tests

Delete equal copies from test_skill_integrator_phase3w4,
test_mcp_integrator_install_phase3w4, test_install_pipeline_phase3w4,
test_outdated_phase3w5 and test_protocol_config_precedence, plus equal copies
inside smaller unit-root and tests-root modules. Move the unique tests into
their behavior-named survivors (distinct names where the survivor holds a
different test of the same name). Keep the outdated and install pipeline
near-twins whose inputs differ in place. Remap CI duration seeds.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copy link
Copy Markdown
Collaborator Author

W5 (integrators, install pipeline, outdated, config precedence, smaller unit-root and tests-root modules) evidence: before 1629 after 1536 removed 109 added 16; removed = 93 deleted-equal-copy, 16 merged; unmapped 0. Covered lines 8044 before, 8044 after across 557 modules; lines whose covering-context count fell to zero: 0.

Bodies changed during merge: the 10 unique test_outdated_phase3w5.py tests moved into test_outdated_marketplace_detection.py now call _make_mock_dep, which is the phase file's MagicMock helper copied verbatim under a new name because the survivor's _make_dep builds a real LockedDependency. This is an identifier-only change, and the inputs are unchanged. No other moved body changed.

Renamed on move (body unchanged; the survivor holds a different test with the same name):

  • integration/test_skill_integrator_phase3w4.py::TestPromoteSubSkillsManagedFiles::test_overwrite_warning_with_logger -> test_skill_integrator_hermetic.py::...::test_overwrite_warning_names_previous_owner. It is parametrized over owner/None and asserts the exact warning text; the survivor only asserts that a warning was called.
  • test_mcp_integrator_install_phase3w4.py::TestRunMcpInstallSingleRuntime::test_single_runtime_targets_only_that_runtime -> test_mcp_integrator_install_hermetic.py::...::test_single_runtime_targets_only_that_runtime_with_batch_fetch_stub, which uses different mock wiring.
  • test_install_pipeline_phase3w4.py::TestRunInstallPipelinePlanCallback::test_plan_callback_false_returns_early -> test_install_pipeline_orchestration.py::...::test_plan_callback_false_passes_complete_dep_keys_to_update_plan, which adds extra context and asserts the build_update_plan arguments.
  • test_install_pipeline_phase3w4.py::TestRunInstallPipelinePlanCallback::test_plan_callback_true_continues -> ...::test_plan_callback_true_continues_without_only_packages, which sets only_packages=None.

Near-twins left in place and handed to #4083 for a parametrize fold over real and mock inputs. Their bodies are identical to the survivor's, but D5 fails on inputs; #4083 deletes the phase files when it folds them:

  • tests/unit/test_outdated_phase3w5.py, 24 tests, where the module helper _make_dep returns a MagicMock while the survivor's returns a real LockedDependency: TestCheckDepsWithProgress::test_parallel_no_rich, TestCheckDepsWithProgress::test_sequential_no_rich, TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none, TestCheckMarketplaceRef::test_fetch_fails_returns_none, TestCheckMarketplaceRef::test_marketplace_not_found_returns_none, TestCheckMarketplaceRef::test_no_discovered_via_returns_none, TestCheckMarketplaceRef::test_no_installed_ref_returns_none, TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none, TestCheckMarketplaceRef::test_outdated_returns_row, TestCheckMarketplaceRef::test_plugin_not_found_returns_none, TestCheckMarketplaceRef::test_string_source_returns_none, TestCheckMarketplaceRef::test_up_to_date_returns_row, TestCheckOneDep::test_branch_no_remote_tip_returns_unknown, TestCheckOneDep::test_branch_outdated, TestCheckOneDep::test_branch_up_to_date, TestCheckOneDep::test_list_remote_refs_exception_returns_unknown, TestCheckOneDep::test_marketplace_path_dispatches, TestCheckOneDep::test_tag_no_tags_returns_unknown, TestCheckOneDep::test_tag_outdated, TestCheckOneDep::test_tag_up_to_date, TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown, TestCheckParallelPlain::test_parallel_plain_returns_results, TestOutdatedCommand::test_all_up_to_date_logs_success, TestOutdatedCommand::test_filters_local_and_registry_deps.
  • tests/unit/test_install_pipeline_phase3w4.py, 2 tests, where the class helper _make_apm_package lacks the survivor's replace_rules = None: TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result, TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install.

Promised behavior with no test. These were deleted under D5 as equal copies with coverage unchanged; each test name promises a behavior that its body never checks:

Removed test (name promises) Equal copy kept
tests/test_github_downloader.py::TestErrorHandling::test_authentication_failure_handling (auth failure handling) TestErrorHandling::test_network_timeout_handling
tests/test_github_downloader.py::TestErrorHandling::test_repository_not_found_handling (repo-not-found handling) TestErrorHandling::test_network_timeout_handling
tests/test_github_downloader.py::TestGitHubPackageDownloaderIntegration::test_download_real_package (real download) ...::test_resolve_reference_real_repo
tests/test_apm_package_models.py::TestHookPackageValidation::test_validate_empty_dir_is_invalid (hook-package validation) TestPackageValidation::test_validate_missing_apm_yml
tests/test_lockfile.py::TestLockFileSemanticEquivalence::test_new_lockfile_vs_empty (new vs empty lockfile) ...::test_removed_dependency_not_equivalent
tests/test_token_manager.py::TestIsValidCredentialToken::test_none_coerced_invalid (None coercion) ...::test_empty_string_invalid
tests/unit/integration/test_mcp_integrator.py::TestIsVscodeAvailable::test_code_on_path_takes_precedence_over_missing_dir (precedence over missing dir) ...::test_returns_true_when_code_on_path
tests/unit/test_protocol_config_precedence.py::TestProtocolPrefPrecedence::test_cli_flag_ssh_wins_over_env_and_config (CLI flag precedence) test_config_command.py::TestGetApmProtocolPref::test_returns_none_when_both_unset
tests/unit/test_artifactory_support.py::TestProxyRegistryOnlyMode::test_proxy_registry_only_is_canonical (canonical proxy-only mode) ...::test_download_package_errors_without_base_url
tests/unit/test_build_mcp_entry.py::TestExplicitTransportOverride::test_explicit_transport_overrides_remote_inference (explicit transport override) TestRemoteShape::test_remote_url_explicit_sse
tests/unit/test_install_update_refs.py::TestAlreadyResolvedSkipLogic::test_cacheable_skips_normal_install (cacheable skip) ...::test_ref_changed_defaults_false_preserving_legacy_calls
tests/unit/test_install_update_refs.py::TestForceRefRecheck::test_git_semver_forces_resolve_on_update (git semver path) ...::test_registry_semver_forces_resolve_on_update
tests/unit/test_mcp_integrator_remove_stale.py::TestRemoveStaleCharacterisation::test_remove_stale_empty_names (empty names) ...::test_remove_stale_no_logger
tests/unit/test_mcp_integrator_remove_stale.py::TestRemoveStaleCharacterisation::test_remove_stale_returns_none (return value) ...::test_remove_stale_with_logger
tests/unit/test_mcp_overlays.py::TestMCPDependencyHardening::test_from_dict_self_defined_runs_strict_checks (from_dict strict checks) TestMCPDependencyModel::test_validate_self_defined_stdio_missing_command
tests/unit/test_transitive_mcp.py::TestCollectTransitiveMCPDeps::test_no_lockfile_conservative (no-lockfile behavior) ...::test_skips_self_defined_by_default

The hardening-named case keeps its identical twin, so the trap's shape is preserved; only the name-promised from_dict path lacks a test. No exploit-shape trap was merged or rewritten. Deferred to a later wave because open PRs touch the files: test_uninstall_engine_* (now unblocked; #4021 merged), integration/test_data_driven_dispatch.py, integration/test_base_integrator.py, integration/test_hook_integrator.py and test_prune_command.py. The tests/test_lockfile.py::TestLockFile::test_write_parses_legacy_lockfile_once failure exists both before and after this change; that root module is outside the PR CI lanes.

Node-set diff (pytest --collect-only -q, before vs after)
before=1629 after=1536 removed=109 added=16

- tests/test_apm_package_models.py (1 removed)
    TestHookPackageValidation::test_validate_empty_dir_is_invalid
- tests/test_github_downloader.py (3 removed)
    TestErrorHandling::test_authentication_failure_handling
    TestErrorHandling::test_repository_not_found_handling
    TestGitHubPackageDownloaderIntegration::test_download_real_package
- tests/test_lockfile.py (1 removed)
    TestLockFileSemanticEquivalence::test_new_lockfile_vs_empty
- tests/test_token_manager.py (1 removed)
    TestIsValidCredentialToken::test_none_coerced_invalid
- tests/unit/integration/test_mcp_integrator.py (1 removed)
    TestIsVscodeAvailable::test_code_on_path_takes_precedence_over_missing_dir
- tests/unit/integration/test_skill_integrator_phase3w4.py (38 removed)
    TestBuildOwnershipMaps::test_build_native_skill_owner_map_empty_lockfile
    TestBuildOwnershipMaps::test_build_skill_ownership_map_empty_lockfile
    TestCopySkillToTarget::test_auto_create_false_no_target_dir_skips
    TestCopySkillToTarget::test_no_skill_md_returns_empty
    TestCopySkillToTarget::test_should_not_install_skill_returns_empty
    TestDircmpEqual::test_empty_dirs_returns_true
    TestDircmpEqual::test_funny_files_returns_false
    TestDircmpEqual::test_identical_dirs_returns_true
    TestDircmpEqual::test_left_only_files_returns_false
    TestDircmpEqual::test_mismatched_files_returns_false
    TestDircmpEqual::test_right_only_files_returns_false
    TestIntegrateNativeSkillCollision::test_collision_warning_with_logger
    TestIntegrateNativeSkillNameNormalization::test_invalid_name_no_logger_no_diagnostics_calls_rich_warning
    TestIntegrateNativeSkillNameNormalization::test_invalid_name_with_diagnostics_warns
    TestIntegrateNativeSkillNameNormalization::test_invalid_name_with_logger_warns
    TestIntegrateSkillBundle::test_skill_bundle_routes_to_integrate_skill_bundle
    TestIntegrateSkillBundleDedup::test_dedup_second_target_logs_progress
    TestIntegrateSkillSubsetWarning::test_skill_subset_with_native_skill_warns
    TestIntegrateSubSkillsStandalone::test_no_skill_md_promotes_sub_skills
    TestIntegrateVirtualFileSkip::test_virtual_file_returns_skipped
    TestIntegrateVirtualFileSkip::test_virtual_subdirectory_is_not_skipped
    TestPromoteSubSkillsManagedFiles::test_overwrite_warning_with_logger[None]
    TestPromoteSubSkillsManagedFiles::test_overwrite_warning_with_logger[other-pkg]
    TestPromoteSubSkillsManagedFiles::test_unmanaged_skill_no_logger_no_diagnostics_calls_rich_warning
    TestPromoteSubSkillsManagedFiles::test_unmanaged_skill_with_logger_warns_and_skips
    TestPromoteSubSkillsNonDir::test_non_dir_in_sub_skills_dir_is_skipped
    TestPromoteSubSkillsStandaloneDedup::test_duplicate_target_skips_with_logger
    TestPromoteSubSkillsStandaloneDedup::test_plugin_manifest_subset_promotes_only_selected_nested_skill
    TestShouldCompileInstructions::test_hybrid_type_compiles
    TestShouldCompileInstructions::test_instructions_type_compiles
    TestShouldCompileInstructions::test_prompts_type_does_not_compile
    TestShouldCompileInstructions::test_skill_type_does_not_compile
    TestValidateSkillNameFallthrough::test_digit_only_is_valid
    TestValidateSkillNameFallthrough::test_mixed_case_triggers_uppercase_error
    TestValidateSkillNameFallthrough::test_single_hyphen_only
    TestValidateSkillNameFallthrough::test_space_triggers_space_error
    TestValidateSkillNameFallthrough::test_special_char_triggers_invalid_chars_error
    TestValidateSkillNameFallthrough::test_underscore_triggers_underscore_error
- tests/unit/test_artifactory_support.py (1 removed)
    TestProxyRegistryOnlyMode::test_proxy_registry_only_is_canonical
- tests/unit/test_build_mcp_entry.py (1 removed)
    TestExplicitTransportOverride::test_explicit_transport_overrides_remote_inference
- tests/unit/test_canonicalization.py (1 removed)
    TestToCanonical::test_default_github_host_stripped
- tests/unit/test_docker_args_and_installer.py (1 removed)
    TestInstallationSummary::test_empty_summary
- tests/unit/test_install_pipeline_phase3w4.py (11 removed)
    TestPreflightAuthCheck::test_auth_success_does_not_raise
    TestPreflightAuthCheck::test_skips_deps_without_host
    TestPreflightAuthCheck::test_skips_github_hosts
    TestRunInstallPipelineExceptionHandling::test_generic_exception_wrapped_in_runtime_error
    TestRunInstallPipelineExceptionHandling::test_policy_violation_propagates
    TestRunInstallPipelinePlanCallback::test_plan_callback_false_returns_early
    TestRunInstallPipelinePlanCallback::test_plan_callback_true_continues
    TestRunPhase::test_no_logger_falls_through
    TestRunPhase::test_non_verbose_calls_phase
    TestRunPhase::test_verbose_calls_phase_and_logs
    TestRunPhase::test_verbose_phase_exception_propagates
- tests/unit/test_install_update_refs.py (2 removed)
    TestAlreadyResolvedSkipLogic::test_cacheable_skips_normal_install
    TestForceRefRecheck::test_git_semver_forces_resolve_on_update
- tests/unit/test_mcp_integrator_install_phase3w4.py (15 removed)
    TestRunMcpInstallEmpty::test_no_mcp_deps_returns_zero
    TestRunMcpInstallEmpty::test_none_mcp_deps_warns_and_returns_zero
    TestRunMcpInstallImportErrorFallback::test_import_error_falls_back_gracefully
    TestRunMcpInstallInvalidServer::test_invalid_servers_raise_runtime_error
    TestRunMcpInstallNoRuntimes::test_all_excluded_warns_and_returns_zero
    TestRunMcpInstallNoRuntimes::test_no_runtimes_installed_logs_warning
    TestRunMcpInstallOptInRuntimes::test_cursor_detected_when_dir_exists
    TestRunMcpInstallOptInRuntimes::test_gemini_detected_when_dir_exists
    TestRunMcpInstallOptInRuntimes::test_opencode_detected_when_dir_exists
    TestRunMcpInstallOptInRuntimes::test_windsurf_detected_when_dir_exists
    TestRunMcpInstallScopeFiltering::test_project_scope_sets_user_scope_false
    TestRunMcpInstallScopeFiltering::test_user_scope_skips_workspace_only_runtimes
    TestRunMcpInstallScriptsDetection::test_scripts_no_installed_runtime_warns
    TestRunMcpInstallScriptsDetection::test_scripts_runtime_not_installed_warns
    TestRunMcpInstallSingleRuntime::test_single_runtime_targets_only_that_runtime
- tests/unit/test_mcp_integrator_remove_stale.py (2 removed)
    TestRemoveStaleCharacterisation::test_remove_stale_empty_names
    TestRemoveStaleCharacterisation::test_remove_stale_returns_none
- tests/unit/test_mcp_overlays.py (1 removed)
    TestMCPDependencyHardening::test_from_dict_self_defined_runs_strict_checks
- tests/unit/test_outdated_phase3w5.py (19 removed)
    TestCheckMarketplaceRefImportError::test_import_error_returns_none
    TestCheckMarketplaceRefWithVersion::test_mkt_version_shown_in_latest_display
    TestCheckOneDep::test_dep_ref_parse_exception_returns_unknown
    TestCheckOneDep::test_name_underscore_v_version_tag_outdated
    TestCheckParallelException::test_exception_in_parallel_future_yields_unknown
    TestFindRemoteTip::test_no_main_or_master_returns_first_branch
    TestFindRemoteTip::test_no_remote_refs_returns_none
    TestFindRemoteTip::test_only_tag_refs_returns_none
    TestFindRemoteTip::test_ref_name_empty_returns_main
    TestFindRemoteTip::test_ref_name_found
    TestFindRemoteTip::test_ref_name_none_returns_master_fallback
    TestFindRemoteTip::test_ref_name_not_found_returns_none
    TestOutdatedCommand::test_empty_lockfile_deps_succeeds
    TestOutdatedCommand::test_no_lockfile_exits
    TestOutdatedCommandCoverage::test_apm_no_cache_skips_git_cache
    TestOutdatedCommandCoverage::test_check_deps_returns_empty_rows
    TestOutdatedCommandCoverage::test_git_cache_oserror_skipped
    TestOutdatedCommandCoverage::test_plain_text_fallback_when_no_console
    TestOutdatedCommandCoverage::test_unknown_rows_logs_some_not_checked
- tests/unit/test_protocol_config_precedence.py (7 removed)
    TestAllowProtocolFallbackPrecedence::test_env_var_empty_falls_through_to_config
    TestProtocolPrefPrecedence::test_cli_flag_ssh_wins_over_env_and_config
    TestProtocolPrefPrecedence::test_config_prefer_ssh_true_used_when_env_absent
    TestProtocolPrefPrecedence::test_env_var_https_wins_over_config_ssh_true
    TestProtocolPrefPrecedence::test_env_var_ssh_wins_over_config_false
    TestProtocolPrefPrecedence::test_returns_none_when_no_preference_set
    TestProtocolPrefPrecedence::test_unrecognised_env_val_falls_through_to_config
- tests/unit/test_transitive_mcp.py (3 removed)
    TestCollectTransitiveMCPDeps::test_no_lockfile_conservative
    TestDeduplicateMCPDeps::test_empty_list
    TestGetServerConfigs::test_empty_list

added (16; every one is a merged or renamed node listed in the mapping):
+ tests/unit/integration/test_skill_integrator_hermetic.py::TestPromoteSubSkillsManagedFiles::test_overwrite_warning_names_previous_owner[None]
+ tests/unit/integration/test_skill_integrator_hermetic.py::TestPromoteSubSkillsManagedFiles::test_overwrite_warning_names_previous_owner[other-pkg]
+ tests/unit/integration/test_skill_integrator_hermetic.py::TestPromoteSubSkillsStandaloneDedup::test_plugin_manifest_subset_promotes_only_selected_nested_skill
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelinePlanCallback::test_plan_callback_false_passes_complete_dep_keys_to_update_plan
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelinePlanCallback::test_plan_callback_true_continues_without_only_packages
+ tests/unit/test_mcp_integrator_install_hermetic.py::TestRunMcpInstallSingleRuntime::test_single_runtime_targets_only_that_runtime_with_batch_fetch_stub
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRefImportError::test_import_error_returns_none
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRefWithVersion::test_mkt_version_shown_in_latest_display
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_dep_ref_parse_exception_returns_unknown
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_name_underscore_v_version_tag_outdated
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckParallelException::test_exception_in_parallel_future_yields_unknown
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommandCoverage::test_apm_no_cache_skips_git_cache
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommandCoverage::test_check_deps_returns_empty_rows
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommandCoverage::test_git_cache_oserror_skipped
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommandCoverage::test_plain_text_fallback_when_no_console
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommandCoverage::test_unknown_rows_logs_some_not_checked
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/test_apm_package_models.py -> tests/test_apm_package_models.py (deleted-equal-copy)": [
  "TestHookPackageValidation::test_validate_empty_dir_is_invalid -> TestPackageValidation::test_validate_missing_apm_yml"
 ],
 "tests/test_github_downloader.py -> tests/test_github_downloader.py (deleted-equal-copy)": [
  "TestErrorHandling::test_authentication_failure_handling -> TestErrorHandling::test_network_timeout_handling",
  "TestErrorHandling::test_repository_not_found_handling -> TestErrorHandling::test_network_timeout_handling",
  "TestGitHubPackageDownloaderIntegration::test_download_real_package -> TestGitHubPackageDownloaderIntegration::test_resolve_reference_real_repo"
 ],
 "tests/test_lockfile.py -> tests/test_lockfile.py (deleted-equal-copy)": [
  "TestLockFileSemanticEquivalence::test_new_lockfile_vs_empty -> TestLockFileSemanticEquivalence::test_removed_dependency_not_equivalent"
 ],
 "tests/test_token_manager.py -> tests/test_token_manager.py (deleted-equal-copy)": [
  "TestIsValidCredentialToken::test_none_coerced_invalid -> TestIsValidCredentialToken::test_empty_string_invalid"
 ],
 "tests/unit/integration/test_mcp_integrator.py -> tests/unit/integration/test_mcp_integrator.py (deleted-equal-copy)": [
  "TestIsVscodeAvailable::test_code_on_path_takes_precedence_over_missing_dir -> TestIsVscodeAvailable::test_returns_true_when_code_on_path"
 ],
 "tests/unit/integration/test_skill_integrator_phase3w4.py -> tests/unit/integration/test_skill_integrator_hermetic.py (deleted-equal-copy)": [
  "TestBuildOwnershipMaps::test_build_native_skill_owner_map_empty_lockfile",
  "TestBuildOwnershipMaps::test_build_skill_ownership_map_empty_lockfile",
  "TestCopySkillToTarget::test_auto_create_false_no_target_dir_skips",
  "TestCopySkillToTarget::test_no_skill_md_returns_empty",
  "TestCopySkillToTarget::test_should_not_install_skill_returns_empty",
  "TestDircmpEqual::test_empty_dirs_returns_true",
  "TestDircmpEqual::test_funny_files_returns_false",
  "TestDircmpEqual::test_identical_dirs_returns_true",
  "TestDircmpEqual::test_left_only_files_returns_false",
  "TestDircmpEqual::test_mismatched_files_returns_false",
  "TestDircmpEqual::test_right_only_files_returns_false",
  "TestIntegrateNativeSkillCollision::test_collision_warning_with_logger",
  "TestIntegrateNativeSkillNameNormalization::test_invalid_name_no_logger_no_diagnostics_calls_rich_warning",
  "TestIntegrateNativeSkillNameNormalization::test_invalid_name_with_diagnostics_warns",
  "TestIntegrateNativeSkillNameNormalization::test_invalid_name_with_logger_warns",
  "TestIntegrateSkillBundle::test_skill_bundle_routes_to_integrate_skill_bundle",
  "TestIntegrateSkillBundleDedup::test_dedup_second_target_logs_progress",
  "TestIntegrateSkillSubsetWarning::test_skill_subset_with_native_skill_warns",
  "TestIntegrateSubSkillsStandalone::test_no_skill_md_promotes_sub_skills",
  "TestIntegrateVirtualFileSkip::test_virtual_file_returns_skipped",
  "TestIntegrateVirtualFileSkip::test_virtual_subdirectory_is_not_skipped",
  "TestPromoteSubSkillsManagedFiles::test_unmanaged_skill_no_logger_no_diagnostics_calls_rich_warning",
  "TestPromoteSubSkillsManagedFiles::test_unmanaged_skill_with_logger_warns_and_skips",
  "TestPromoteSubSkillsNonDir::test_non_dir_in_sub_skills_dir_is_skipped",
  "TestPromoteSubSkillsStandaloneDedup::test_duplicate_target_skips_with_logger",
  "TestShouldCompileInstructions::test_hybrid_type_compiles",
  "TestShouldCompileInstructions::test_instructions_type_compiles",
  "TestShouldCompileInstructions::test_prompts_type_does_not_compile",
  "TestShouldCompileInstructions::test_skill_type_does_not_compile",
  "TestValidateSkillNameFallthrough::test_digit_only_is_valid",
  "TestValidateSkillNameFallthrough::test_mixed_case_triggers_uppercase_error",
  "TestValidateSkillNameFallthrough::test_single_hyphen_only",
  "TestValidateSkillNameFallthrough::test_space_triggers_space_error",
  "TestValidateSkillNameFallthrough::test_special_char_triggers_invalid_chars_error",
  "TestValidateSkillNameFallthrough::test_underscore_triggers_underscore_error"
 ],
 "tests/unit/integration/test_skill_integrator_phase3w4.py -> tests/unit/integration/test_skill_integrator_hermetic.py (merged)": [
  "TestPromoteSubSkillsManagedFiles::test_overwrite_warning_with_logger[None] -> TestPromoteSubSkillsManagedFiles::test_overwrite_warning_names_previous_owner[None]",
  "TestPromoteSubSkillsManagedFiles::test_overwrite_warning_with_logger[other-pkg] -> TestPromoteSubSkillsManagedFiles::test_overwrite_warning_names_previous_owner[other-pkg]",
  "TestPromoteSubSkillsStandaloneDedup::test_plugin_manifest_subset_promotes_only_selected_nested_skill"
 ],
 "tests/unit/test_artifactory_support.py -> tests/unit/test_artifactory_support.py (deleted-equal-copy)": [
  "TestProxyRegistryOnlyMode::test_proxy_registry_only_is_canonical -> TestProxyRegistryOnlyMode::test_download_package_errors_without_base_url"
 ],
 "tests/unit/test_build_mcp_entry.py -> tests/unit/test_build_mcp_entry.py (deleted-equal-copy)": [
  "TestExplicitTransportOverride::test_explicit_transport_overrides_remote_inference -> TestRemoteShape::test_remote_url_explicit_sse"
 ],
 "tests/unit/test_canonicalization.py -> tests/unit/test_canonicalization.py (deleted-equal-copy)": [
  "TestToCanonical::test_default_github_host_stripped -> TestToCanonical::test_fqdn_github"
 ],
 "tests/unit/test_docker_args_and_installer.py -> tests/unit/test_safe_installer.py (deleted-equal-copy)": [
  "TestInstallationSummary::test_empty_summary"
 ],
 "tests/unit/test_install_pipeline_phase3w4.py -> tests/unit/test_install_pipeline_orchestration.py (deleted-equal-copy)": [
  "TestPreflightAuthCheck::test_auth_success_does_not_raise",
  "TestPreflightAuthCheck::test_skips_deps_without_host",
  "TestPreflightAuthCheck::test_skips_github_hosts",
  "TestRunInstallPipelineExceptionHandling::test_generic_exception_wrapped_in_runtime_error",
  "TestRunInstallPipelineExceptionHandling::test_policy_violation_propagates",
  "TestRunPhase::test_no_logger_falls_through",
  "TestRunPhase::test_non_verbose_calls_phase",
  "TestRunPhase::test_verbose_calls_phase_and_logs",
  "TestRunPhase::test_verbose_phase_exception_propagates"
 ],
 "tests/unit/test_install_pipeline_phase3w4.py -> tests/unit/test_install_pipeline_orchestration.py (merged)": [
  "TestRunInstallPipelinePlanCallback::test_plan_callback_false_returns_early -> TestRunInstallPipelinePlanCallback::test_plan_callback_false_passes_complete_dep_keys_to_update_plan",
  "TestRunInstallPipelinePlanCallback::test_plan_callback_true_continues -> TestRunInstallPipelinePlanCallback::test_plan_callback_true_continues_without_only_packages"
 ],
 "tests/unit/test_install_update_refs.py -> tests/unit/test_install_update_refs.py (deleted-equal-copy)": [
  "TestAlreadyResolvedSkipLogic::test_cacheable_skips_normal_install -> TestAlreadyResolvedSkipLogic::test_ref_changed_defaults_false_preserving_legacy_calls",
  "TestForceRefRecheck::test_git_semver_forces_resolve_on_update -> TestForceRefRecheck::test_registry_semver_forces_resolve_on_update"
 ],
 "tests/unit/test_mcp_integrator_install_phase3w4.py -> tests/unit/test_mcp_integrator_install_hermetic.py (deleted-equal-copy)": [
  "TestRunMcpInstallEmpty::test_no_mcp_deps_returns_zero",
  "TestRunMcpInstallEmpty::test_none_mcp_deps_warns_and_returns_zero",
  "TestRunMcpInstallImportErrorFallback::test_import_error_falls_back_gracefully",
  "TestRunMcpInstallInvalidServer::test_invalid_servers_raise_runtime_error",
  "TestRunMcpInstallNoRuntimes::test_all_excluded_warns_and_returns_zero",
  "TestRunMcpInstallNoRuntimes::test_no_runtimes_installed_logs_warning",
  "TestRunMcpInstallOptInRuntimes::test_cursor_detected_when_dir_exists",
  "TestRunMcpInstallOptInRuntimes::test_gemini_detected_when_dir_exists",
  "TestRunMcpInstallOptInRuntimes::test_opencode_detected_when_dir_exists",
  "TestRunMcpInstallOptInRuntimes::test_windsurf_detected_when_dir_exists",
  "TestRunMcpInstallScopeFiltering::test_project_scope_sets_user_scope_false",
  "TestRunMcpInstallScopeFiltering::test_user_scope_skips_workspace_only_runtimes",
  "TestRunMcpInstallScriptsDetection::test_scripts_no_installed_runtime_warns",
  "TestRunMcpInstallScriptsDetection::test_scripts_runtime_not_installed_warns"
 ],
 "tests/unit/test_mcp_integrator_install_phase3w4.py -> tests/unit/test_mcp_integrator_install_hermetic.py (merged)": [
  "TestRunMcpInstallSingleRuntime::test_single_runtime_targets_only_that_runtime -> TestRunMcpInstallSingleRuntime::test_single_runtime_targets_only_that_runtime_with_batch_fetch_stub"
 ],
 "tests/unit/test_mcp_integrator_remove_stale.py -> tests/unit/test_mcp_integrator_remove_stale.py (deleted-equal-copy)": [
  "TestRemoveStaleCharacterisation::test_remove_stale_empty_names -> TestRemoveStaleCharacterisation::test_remove_stale_no_logger",
  "TestRemoveStaleCharacterisation::test_remove_stale_returns_none -> TestRemoveStaleCharacterisation::test_remove_stale_with_logger"
 ],
 "tests/unit/test_mcp_overlays.py -> tests/unit/test_mcp_overlays.py (deleted-equal-copy)": [
  "TestMCPDependencyHardening::test_from_dict_self_defined_runs_strict_checks -> TestMCPDependencyModel::test_validate_self_defined_stdio_missing_command"
 ],
 "tests/unit/test_outdated_phase3w5.py -> tests/unit/test_outdated_marketplace_detection.py (merged)": [
  "TestCheckMarketplaceRefImportError::test_import_error_returns_none",
  "TestCheckMarketplaceRefWithVersion::test_mkt_version_shown_in_latest_display",
  "TestCheckOneDep::test_dep_ref_parse_exception_returns_unknown",
  "TestCheckOneDep::test_name_underscore_v_version_tag_outdated",
  "TestCheckParallelException::test_exception_in_parallel_future_yields_unknown",
  "TestOutdatedCommandCoverage::test_apm_no_cache_skips_git_cache",
  "TestOutdatedCommandCoverage::test_check_deps_returns_empty_rows",
  "TestOutdatedCommandCoverage::test_git_cache_oserror_skipped",
  "TestOutdatedCommandCoverage::test_plain_text_fallback_when_no_console",
  "TestOutdatedCommandCoverage::test_unknown_rows_logs_some_not_checked"
 ],
 "tests/unit/test_outdated_phase3w5.py -> tests/unit/test_outdated_marketplace_detection.py (deleted-equal-copy)": [
  "TestFindRemoteTip::test_no_main_or_master_returns_first_branch",
  "TestFindRemoteTip::test_no_remote_refs_returns_none",
  "TestFindRemoteTip::test_only_tag_refs_returns_none",
  "TestFindRemoteTip::test_ref_name_empty_returns_main",
  "TestFindRemoteTip::test_ref_name_found",
  "TestFindRemoteTip::test_ref_name_none_returns_master_fallback",
  "TestFindRemoteTip::test_ref_name_not_found_returns_none",
  "TestOutdatedCommand::test_empty_lockfile_deps_succeeds",
  "TestOutdatedCommand::test_no_lockfile_exits"
 ],
 "tests/unit/test_protocol_config_precedence.py -> tests/unit/test_config_command.py (deleted-equal-copy)": [
  "TestAllowProtocolFallbackPrecedence::test_env_var_empty_falls_through_to_config -> TestGetApmAllowProtocolFallback::test_empty_env_var_falls_through_to_config",
  "TestProtocolPrefPrecedence::test_cli_flag_ssh_wins_over_env_and_config -> TestGetApmProtocolPref::test_returns_none_when_both_unset",
  "TestProtocolPrefPrecedence::test_config_prefer_ssh_true_used_when_env_absent -> TestGetApmProtocolPref::test_config_prefer_ssh_used_when_env_unset",
  "TestProtocolPrefPrecedence::test_env_var_https_wins_over_config_ssh_true -> TestGetApmProtocolPref::test_env_var_https_wins",
  "TestProtocolPrefPrecedence::test_env_var_ssh_wins_over_config_false -> TestGetApmProtocolPref::test_env_var_ssh_wins_over_config",
  "TestProtocolPrefPrecedence::test_returns_none_when_no_preference_set -> TestGetApmProtocolPref::test_returns_none_when_both_unset",
  "TestProtocolPrefPrecedence::test_unrecognised_env_val_falls_through_to_config -> TestGetApmProtocolPref::test_invalid_env_var_ignored"
 ],
 "tests/unit/test_transitive_mcp.py -> tests/unit/test_transitive_mcp.py (deleted-equal-copy)": [
  "TestCollectTransitiveMCPDeps::test_no_lockfile_conservative -> TestCollectTransitiveMCPDeps::test_skips_self_defined_by_default"
 ],
 "tests/unit/test_transitive_mcp.py -> tests/unit/integration/test_mcp_integrator.py (deleted-equal-copy)": [
  "TestDeduplicateMCPDeps::test_empty_list -> TestDeduplicate::test_empty_list",
  "TestGetServerConfigs::test_empty_list -> TestGetServerConfigs::test_empty"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 8044,
 "covered_lines_after": 8044
}

Delete equal copies from test_uninstall_engine_phase3w5 (kept twins in
test_uninstall_engine_validation). Tests whose module helpers differ from the
survivor's stay in place.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copy link
Copy Markdown
Collaborator Author

W6a (tests/unit uninstall engine) evidence: before 56 after 41 removed 15 added 0; removed = 15 deleted-equal-copy; unmapped 0. Covered lines 2260 before, 2260 after across 557 modules; lines whose covering-context count fell to zero: 0.

No bodies changed and no tests moved. Left in place as residue for the unit-root C1 worker: 7 near-twins and 3 unique tests in test_uninstall_engine_phase3w5.py. They use module helpers _make_locked_dep and _make_lockfile, which differ from the survivor's.

Node-set diff (pytest --collect-only -q, before vs after)
before=56 after=41 removed=15 added=0

- tests/unit/test_uninstall_engine_phase3w5.py (15 removed)
    TestCleanupTransitiveOrphans::test_no_lockfile_returns_zero
    TestDryRunUninstall::test_no_lockfile
    TestDryRunUninstall::test_package_exists_on_disk
    TestRemovePackagesFromDisk::test_fallback_path_single_segment
    TestRemovePackagesFromDisk::test_no_modules_dir_returns_zero
    TestRemovePackagesFromDisk::test_package_not_on_disk_warns
    TestRemovePackagesFromDisk::test_path_traversal_error_propagates
    TestRemovePackagesFromDisk::test_removes_existing_package
    TestResolveMarketplacePackages::test_dry_run_skips_registry
    TestResolveMarketplacePackages::test_no_lockfile_trusts_registry
    TestResolveMarketplacePackages::test_registry_fallback_exception_logged
    TestValidateUninstallPackages::test_invalid_format_no_slash
    TestValidateUninstallPackages::test_marketplace_resolved_none_adds_to_not_found
    TestValidateUninstallPackages::test_package_not_in_current_deps
    TestValidateUninstallPackages::test_valid_package_found

added (0; every one is a merged or renamed node listed in the mapping):
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/test_uninstall_engine_phase3w5.py -> tests/unit/test_uninstall_engine_validation.py (deleted-equal-copy)": [
  "TestCleanupTransitiveOrphans::test_no_lockfile_returns_zero",
  "TestDryRunUninstall::test_no_lockfile",
  "TestDryRunUninstall::test_package_exists_on_disk",
  "TestRemovePackagesFromDisk::test_fallback_path_single_segment",
  "TestRemovePackagesFromDisk::test_no_modules_dir_returns_zero",
  "TestRemovePackagesFromDisk::test_package_not_on_disk_warns",
  "TestRemovePackagesFromDisk::test_path_traversal_error_propagates",
  "TestRemovePackagesFromDisk::test_removes_existing_package",
  "TestResolveMarketplacePackages::test_dry_run_skips_registry",
  "TestResolveMarketplacePackages::test_no_lockfile_trusts_registry",
  "TestResolveMarketplacePackages::test_registry_fallback_exception_logged",
  "TestValidateUninstallPackages::test_invalid_format_no_slash",
  "TestValidateUninstallPackages::test_marketplace_resolved_none_adds_to_not_found",
  "TestValidateUninstallPackages::test_package_not_in_current_deps",
  "TestValidateUninstallPackages::test_valid_package_found"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {},
 "modules_with_changed_covered_set": [],
 "covered_lines_before": 2260,
 "covered_lines_after": 2260
}

Parametrize the outdated, install pipeline short-circuit and uninstall engine
tests whose bodies were duplicated across phase files with different inputs
(real lockfile objects vs MagicMock stand-ins, replace_rules set vs unset), so
one test runs both inputs. Move the remaining unique uninstall tests into the
survivor and delete the three phase files. Remap CI duration seeds.

Part of #4083

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copy link
Copy Markdown
Collaborator Author

R1 (C1 unit-root residue: near-twin folds for outdated, install pipeline and uninstall) evidence: before 127 after 127 removed 69 added 69; removed = 69 merged; unmapped 0. Covered lines 7105 before, 7111 after across 557 modules; lines whose covering-context count fell to zero: 2.

Folds (#4083 scope). For each near-twin pair the bodies were identical and only the inputs differed. The survivor now runs both inputs through one parametrized fixture, and the phase file is deleted:

  • test_outdated_marketplace_detection.py (24 tests): the make_dep fixture [locked] builds a real LockedDependency and [mock] uses the former phase MagicMock helper, kept verbatim as _make_mock_dep. The survivor node X maps to X[locked], and the phase node X maps to X[mock].
  • test_install_pipeline_orchestration.py::TestRunInstallPipelineShortCircuit (2 tests): parametrized as [replace-rules-none] (survivor helper) and [replace-rules-unset] (phase helper).
  • test_uninstall_engine_validation.py (7 tests): the dep_kind fixture drives make_lockfile/make_locked_dep as [locked] (real objects) or [mock] (former phase helpers, kept verbatim as _make_mock_lockfile/_make_mock_locked_dep). An AST check confirmed each phase body equals its survivor body modulo the helper name.

Bodies changed: the 33 folded survivor tests now take the dep or flag fixture and call it in place of the module helper; there are no other statement changes. Moved with new names, because each survivor holds a weaker test of the same name:

  • test_uninstall_engine_phase3w5.py::TestCleanupTransitiveOrphans::test_orphan_removed -> test_orphan_install_dir_removed_on_every_platform. It keeps @pytest.mark.windows_compat and asserts removed == 1, the orphan set and that the directory is gone; windows-compat.json carries the module weight.
  • TestCleanupTransitiveOrphans::test_orphan_removal_error_logged -> test_orphan_removal_error_logged_with_mock_lockfile.
  • TestDryRunUninstall::test_with_lockfile_and_orphans -> test_with_mock_lockfile_and_orphans.

Coverage note: deps/download_strategies.py lines 80 and 87 are in the _close_git_file_transports finalizer path. Before, their only context was test_uninstall_engine_phase3w5.py::TestDryRunUninstall::test_with_lockfile_and_orphans, but that same test run alone on the old tree does not cover them. The hit came from a garbage-collection finalizer firing during that test, not from the test itself. The combined full-suite coverage diff, which C1 will report, is the binding zero-loss check.

Node-set diff (pytest --collect-only -q, before vs after)
before=127 after=127 removed=69 added=69

- tests/unit/test_install_pipeline_orchestration.py (2 removed)
    TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result
    TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install
- tests/unit/test_install_pipeline_phase3w4.py (2 removed)
    TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result
    TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install
- tests/unit/test_outdated_marketplace_detection.py (24 removed)
    TestCheckDepsWithProgress::test_parallel_no_rich
    TestCheckDepsWithProgress::test_sequential_no_rich
    TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none
    TestCheckMarketplaceRef::test_fetch_fails_returns_none
    TestCheckMarketplaceRef::test_marketplace_not_found_returns_none
    TestCheckMarketplaceRef::test_no_discovered_via_returns_none
    TestCheckMarketplaceRef::test_no_installed_ref_returns_none
    TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none
    TestCheckMarketplaceRef::test_outdated_returns_row
    TestCheckMarketplaceRef::test_plugin_not_found_returns_none
    TestCheckMarketplaceRef::test_string_source_returns_none
    TestCheckMarketplaceRef::test_up_to_date_returns_row
    TestCheckOneDep::test_branch_no_remote_tip_returns_unknown
    TestCheckOneDep::test_branch_outdated
    TestCheckOneDep::test_branch_up_to_date
    TestCheckOneDep::test_list_remote_refs_exception_returns_unknown
    TestCheckOneDep::test_marketplace_path_dispatches
    TestCheckOneDep::test_tag_no_tags_returns_unknown
    TestCheckOneDep::test_tag_outdated
    TestCheckOneDep::test_tag_up_to_date
    TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown
    TestCheckParallelPlain::test_parallel_plain_returns_results
    TestOutdatedCommand::test_all_up_to_date_logs_success
    TestOutdatedCommand::test_filters_local_and_registry_deps
- tests/unit/test_outdated_phase3w5.py (24 removed)
    TestCheckDepsWithProgress::test_parallel_no_rich
    TestCheckDepsWithProgress::test_sequential_no_rich
    TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none
    TestCheckMarketplaceRef::test_fetch_fails_returns_none
    TestCheckMarketplaceRef::test_marketplace_not_found_returns_none
    TestCheckMarketplaceRef::test_no_discovered_via_returns_none
    TestCheckMarketplaceRef::test_no_installed_ref_returns_none
    TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none
    TestCheckMarketplaceRef::test_outdated_returns_row
    TestCheckMarketplaceRef::test_plugin_not_found_returns_none
    TestCheckMarketplaceRef::test_string_source_returns_none
    TestCheckMarketplaceRef::test_up_to_date_returns_row
    TestCheckOneDep::test_branch_no_remote_tip_returns_unknown
    TestCheckOneDep::test_branch_outdated
    TestCheckOneDep::test_branch_up_to_date
    TestCheckOneDep::test_list_remote_refs_exception_returns_unknown
    TestCheckOneDep::test_marketplace_path_dispatches
    TestCheckOneDep::test_tag_no_tags_returns_unknown
    TestCheckOneDep::test_tag_outdated
    TestCheckOneDep::test_tag_up_to_date
    TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown
    TestCheckParallelPlain::test_parallel_plain_returns_results
    TestOutdatedCommand::test_all_up_to_date_logs_success
    TestOutdatedCommand::test_filters_local_and_registry_deps
- tests/unit/test_uninstall_engine_phase3w5.py (10 removed)
    TestBuildChildrenIndex::test_empty_deps
    TestBuildChildrenIndex::test_no_resolved_by_skipped
    TestBuildChildrenIndex::test_resolved_by_populated
    TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero
    TestCleanupTransitiveOrphans::test_no_orphans_returns_zero
    TestCleanupTransitiveOrphans::test_orphan_removal_error_logged
    TestCleanupTransitiveOrphans::test_orphan_removed
    TestDryRunUninstall::test_with_lockfile_and_orphans
    TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused
    TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical
- tests/unit/test_uninstall_engine_validation.py (7 removed)
    TestBuildChildrenIndex::test_empty_deps
    TestBuildChildrenIndex::test_no_resolved_by_skipped
    TestBuildChildrenIndex::test_resolved_by_populated
    TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero
    TestCleanupTransitiveOrphans::test_no_orphans_returns_zero
    TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused
    TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical

added (69; every one is a merged or renamed node listed in the mapping):
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result[replace-rules-none]
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result[replace-rules-unset]
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install[replace-rules-none]
+ tests/unit/test_install_pipeline_orchestration.py::TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install[replace-rules-unset]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckDepsWithProgress::test_parallel_no_rich[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckDepsWithProgress::test_parallel_no_rich[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckDepsWithProgress::test_sequential_no_rich[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckDepsWithProgress::test_sequential_no_rich[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_fetch_fails_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_fetch_fails_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_marketplace_not_found_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_marketplace_not_found_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_discovered_via_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_discovered_via_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_installed_ref_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_installed_ref_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_outdated_returns_row[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_outdated_returns_row[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_plugin_not_found_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_plugin_not_found_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_string_source_returns_none[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_string_source_returns_none[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_up_to_date_returns_row[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckMarketplaceRef::test_up_to_date_returns_row[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_no_remote_tip_returns_unknown[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_no_remote_tip_returns_unknown[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_outdated[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_outdated[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_up_to_date[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_branch_up_to_date[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_list_remote_refs_exception_returns_unknown[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_list_remote_refs_exception_returns_unknown[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_marketplace_path_dispatches[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_marketplace_path_dispatches[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_no_tags_returns_unknown[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_no_tags_returns_unknown[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_outdated[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_outdated[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_up_to_date[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckOneDep::test_tag_up_to_date[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckParallelPlain::test_parallel_plain_returns_results[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestCheckParallelPlain::test_parallel_plain_returns_results[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommand::test_all_up_to_date_logs_success[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommand::test_all_up_to_date_logs_success[mock]
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommand::test_filters_local_and_registry_deps[locked]
+ tests/unit/test_outdated_marketplace_detection.py::TestOutdatedCommand::test_filters_local_and_registry_deps[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_empty_deps[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_empty_deps[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_no_resolved_by_skipped[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_no_resolved_by_skipped[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_resolved_by_populated[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestBuildChildrenIndex::test_resolved_by_populated[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_no_orphans_returns_zero[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_no_orphans_returns_zero[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_orphan_install_dir_removed_on_every_platform
+ tests/unit/test_uninstall_engine_validation.py::TestCleanupTransitiveOrphans::test_orphan_removal_error_logged_with_mock_lockfile
+ tests/unit/test_uninstall_engine_validation.py::TestDryRunUninstall::test_with_mock_lockfile_and_orphans
+ tests/unit/test_uninstall_engine_validation.py::TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused[mock]
+ tests/unit/test_uninstall_engine_validation.py::TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical[locked]
+ tests/unit/test_uninstall_engine_validation.py::TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical[mock]
removed -> kept mapping (grouped by source file, kept file and kind)
{
 "tests/unit/test_install_pipeline_orchestration.py -> tests/unit/test_install_pipeline_orchestration.py (merged)": [
  "TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result -> TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result[replace-rules-none]",
  "TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install -> TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install[replace-rules-none]"
 ],
 "tests/unit/test_install_pipeline_phase3w4.py -> tests/unit/test_install_pipeline_orchestration.py (merged)": [
  "TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result -> TestRunInstallPipelineShortCircuit::test_no_deps_no_local_returns_install_result[replace-rules-unset]",
  "TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install -> TestRunInstallPipelineShortCircuit::test_resolve_phase_returns_no_deps_calls_nothing_to_install[replace-rules-unset]"
 ],
 "tests/unit/test_outdated_marketplace_detection.py -> tests/unit/test_outdated_marketplace_detection.py (merged)": [
  "TestCheckDepsWithProgress::test_parallel_no_rich -> TestCheckDepsWithProgress::test_parallel_no_rich[locked]",
  "TestCheckDepsWithProgress::test_sequential_no_rich -> TestCheckDepsWithProgress::test_sequential_no_rich[locked]",
  "TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none -> TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none[locked]",
  "TestCheckMarketplaceRef::test_fetch_fails_returns_none -> TestCheckMarketplaceRef::test_fetch_fails_returns_none[locked]",
  "TestCheckMarketplaceRef::test_marketplace_not_found_returns_none -> TestCheckMarketplaceRef::test_marketplace_not_found_returns_none[locked]",
  "TestCheckMarketplaceRef::test_no_discovered_via_returns_none -> TestCheckMarketplaceRef::test_no_discovered_via_returns_none[locked]",
  "TestCheckMarketplaceRef::test_no_installed_ref_returns_none -> TestCheckMarketplaceRef::test_no_installed_ref_returns_none[locked]",
  "TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none -> TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none[locked]",
  "TestCheckMarketplaceRef::test_outdated_returns_row -> TestCheckMarketplaceRef::test_outdated_returns_row[locked]",
  "TestCheckMarketplaceRef::test_plugin_not_found_returns_none -> TestCheckMarketplaceRef::test_plugin_not_found_returns_none[locked]",
  "TestCheckMarketplaceRef::test_string_source_returns_none -> TestCheckMarketplaceRef::test_string_source_returns_none[locked]",
  "TestCheckMarketplaceRef::test_up_to_date_returns_row -> TestCheckMarketplaceRef::test_up_to_date_returns_row[locked]",
  "TestCheckOneDep::test_branch_no_remote_tip_returns_unknown -> TestCheckOneDep::test_branch_no_remote_tip_returns_unknown[locked]",
  "TestCheckOneDep::test_branch_outdated -> TestCheckOneDep::test_branch_outdated[locked]",
  "TestCheckOneDep::test_branch_up_to_date -> TestCheckOneDep::test_branch_up_to_date[locked]",
  "TestCheckOneDep::test_list_remote_refs_exception_returns_unknown -> TestCheckOneDep::test_list_remote_refs_exception_returns_unknown[locked]",
  "TestCheckOneDep::test_marketplace_path_dispatches -> TestCheckOneDep::test_marketplace_path_dispatches[locked]",
  "TestCheckOneDep::test_tag_no_tags_returns_unknown -> TestCheckOneDep::test_tag_no_tags_returns_unknown[locked]",
  "TestCheckOneDep::test_tag_outdated -> TestCheckOneDep::test_tag_outdated[locked]",
  "TestCheckOneDep::test_tag_up_to_date -> TestCheckOneDep::test_tag_up_to_date[locked]",
  "TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown -> TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown[locked]",
  "TestCheckParallelPlain::test_parallel_plain_returns_results -> TestCheckParallelPlain::test_parallel_plain_returns_results[locked]",
  "TestOutdatedCommand::test_all_up_to_date_logs_success -> TestOutdatedCommand::test_all_up_to_date_logs_success[locked]",
  "TestOutdatedCommand::test_filters_local_and_registry_deps -> TestOutdatedCommand::test_filters_local_and_registry_deps[locked]"
 ],
 "tests/unit/test_outdated_phase3w5.py -> tests/unit/test_outdated_marketplace_detection.py (merged)": [
  "TestCheckDepsWithProgress::test_parallel_no_rich -> TestCheckDepsWithProgress::test_parallel_no_rich[mock]",
  "TestCheckDepsWithProgress::test_sequential_no_rich -> TestCheckDepsWithProgress::test_sequential_no_rich[mock]",
  "TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none -> TestCheckMarketplaceRef::test_dict_source_empty_ref_returns_none[mock]",
  "TestCheckMarketplaceRef::test_fetch_fails_returns_none -> TestCheckMarketplaceRef::test_fetch_fails_returns_none[mock]",
  "TestCheckMarketplaceRef::test_marketplace_not_found_returns_none -> TestCheckMarketplaceRef::test_marketplace_not_found_returns_none[mock]",
  "TestCheckMarketplaceRef::test_no_discovered_via_returns_none -> TestCheckMarketplaceRef::test_no_discovered_via_returns_none[mock]",
  "TestCheckMarketplaceRef::test_no_installed_ref_returns_none -> TestCheckMarketplaceRef::test_no_installed_ref_returns_none[mock]",
  "TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none -> TestCheckMarketplaceRef::test_no_marketplace_plugin_name_returns_none[mock]",
  "TestCheckMarketplaceRef::test_outdated_returns_row -> TestCheckMarketplaceRef::test_outdated_returns_row[mock]",
  "TestCheckMarketplaceRef::test_plugin_not_found_returns_none -> TestCheckMarketplaceRef::test_plugin_not_found_returns_none[mock]",
  "TestCheckMarketplaceRef::test_string_source_returns_none -> TestCheckMarketplaceRef::test_string_source_returns_none[mock]",
  "TestCheckMarketplaceRef::test_up_to_date_returns_row -> TestCheckMarketplaceRef::test_up_to_date_returns_row[mock]",
  "TestCheckOneDep::test_branch_no_remote_tip_returns_unknown -> TestCheckOneDep::test_branch_no_remote_tip_returns_unknown[mock]",
  "TestCheckOneDep::test_branch_outdated -> TestCheckOneDep::test_branch_outdated[mock]",
  "TestCheckOneDep::test_branch_up_to_date -> TestCheckOneDep::test_branch_up_to_date[mock]",
  "TestCheckOneDep::test_list_remote_refs_exception_returns_unknown -> TestCheckOneDep::test_list_remote_refs_exception_returns_unknown[mock]",
  "TestCheckOneDep::test_marketplace_path_dispatches -> TestCheckOneDep::test_marketplace_path_dispatches[mock]",
  "TestCheckOneDep::test_tag_no_tags_returns_unknown -> TestCheckOneDep::test_tag_no_tags_returns_unknown[mock]",
  "TestCheckOneDep::test_tag_outdated -> TestCheckOneDep::test_tag_outdated[mock]",
  "TestCheckOneDep::test_tag_up_to_date -> TestCheckOneDep::test_tag_up_to_date[mock]",
  "TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown -> TestCheckParallelPlain::test_parallel_plain_exception_yields_unknown[mock]",
  "TestCheckParallelPlain::test_parallel_plain_returns_results -> TestCheckParallelPlain::test_parallel_plain_returns_results[mock]",
  "TestOutdatedCommand::test_all_up_to_date_logs_success -> TestOutdatedCommand::test_all_up_to_date_logs_success[mock]",
  "TestOutdatedCommand::test_filters_local_and_registry_deps -> TestOutdatedCommand::test_filters_local_and_registry_deps[mock]"
 ],
 "tests/unit/test_uninstall_engine_phase3w5.py -> tests/unit/test_uninstall_engine_validation.py (merged)": [
  "TestBuildChildrenIndex::test_empty_deps -> TestBuildChildrenIndex::test_empty_deps[mock]",
  "TestBuildChildrenIndex::test_no_resolved_by_skipped -> TestBuildChildrenIndex::test_no_resolved_by_skipped[mock]",
  "TestBuildChildrenIndex::test_resolved_by_populated -> TestBuildChildrenIndex::test_resolved_by_populated[mock]",
  "TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero -> TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero[mock]",
  "TestCleanupTransitiveOrphans::test_no_orphans_returns_zero -> TestCleanupTransitiveOrphans::test_no_orphans_returns_zero[mock]",
  "TestCleanupTransitiveOrphans::test_orphan_removal_error_logged -> TestCleanupTransitiveOrphans::test_orphan_removal_error_logged_with_mock_lockfile",
  "TestCleanupTransitiveOrphans::test_orphan_removed -> TestCleanupTransitiveOrphans::test_orphan_install_dir_removed_on_every_platform",
  "TestDryRunUninstall::test_with_lockfile_and_orphans -> TestDryRunUninstall::test_with_mock_lockfile_and_orphans",
  "TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused -> TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused[mock]",
  "TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical -> TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical[mock]"
 ],
 "tests/unit/test_uninstall_engine_validation.py -> tests/unit/test_uninstall_engine_validation.py (merged)": [
  "TestBuildChildrenIndex::test_empty_deps -> TestBuildChildrenIndex::test_empty_deps[locked]",
  "TestBuildChildrenIndex::test_no_resolved_by_skipped -> TestBuildChildrenIndex::test_no_resolved_by_skipped[locked]",
  "TestBuildChildrenIndex::test_resolved_by_populated -> TestBuildChildrenIndex::test_resolved_by_populated[locked]",
  "TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero -> TestCleanupTransitiveOrphans::test_no_modules_dir_returns_zero[locked]",
  "TestCleanupTransitiveOrphans::test_no_orphans_returns_zero -> TestCleanupTransitiveOrphans::test_no_orphans_returns_zero[locked]",
  "TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused -> TestResolveMarketplacePackages::test_registry_fallback_not_in_lockfile_refused[locked]",
  "TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical -> TestResolveMarketplacePackages::test_registry_fallback_resolves_canonical[locked]"
 ]
}
Coverage-context diff (--cov=apm_cli --cov-context=test, -n 0)
{
 "lines_fell_to_zero": {
  "deps/download_strategies.py": [
   80,
   87
  ]
 },
 "modules_with_changed_covered_set": [
  "core/auth.py",
  "deps/download_strategies.py",
  "utils/git_env.py"
 ],
 "covered_lines_before": 7105,
 "covered_lines_after": 7111
}

…odules

Keep the owner- or behavior-named module of nine near-twin pairs, move
the tests unique to each twin into the survivor, and drop the twin.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Re-add 16 tests under their original names with bodies that exercise the
behavior each name promises (auth and not-found clone errors, real package
download, empty hook package validation, CLI ssh flag precedence, explicit
MCP transport override, proxy-only mode precedence, stale MCP removal and
transitive MCP collection without a lockfile, among others).

Part of #4083

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Remove same-body copies whose kept twin shares fixtures, class context
and lane, and an assertion-free placeholder test.

Part of #4082

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… ratchets

Part of #4028.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The GitLab routing tests violate the pure-unit contract with unmocked Git configuration probes, while the new output-mode module bypasses promise-link enforcement through an exemption reserved for existing modules.

2 open issues
What changed in this PR

This PR advances APM's test-corpus consolidation and classification work for #4081, #4082, #4083, and #4028. The reviewed changes primarily add explicit behavioral markers so the existing taxonomy checks can distinguish pure logic from component tests.

Changes:

  • Classifies test modules while preserving existing Windows and opt-in scheduling markers.
  • Separates a pure output-mode regression and strengthens selected filesystem assertions.
  • Corrects the Unix installer test's repository-relative path.
File Description
tests/​unit/​utils/​test_url_host_agreement.py Adds unit classification.
tests/​unit/​utils/​test_real_git_tls_config.py Adds unit classification.
tests/​unit/​utils/​test_patterns.py Adds unit classification.
tests/​unit/​utils/​test_paths.py Adds component classification; retains Windows selection.
tests/​unit/​utils/​test_net.py Adds unit classification.
tests/​unit/​utils/​test_http_credentials.py Adds component classification.
tests/​unit/​utils/​test_has_aliases.py Adds unit classification.
tests/​unit/​utils/​test_frontmatter_horizontal_rules.py Adds component classification.
tests/​unit/​test_windsurf_adapter.py Adds component classification.
tests/​unit/​test_windows_signing_contract.py Adds component classification.
tests/​unit/​test_windows_installer_launchers.py Adds component classification.
tests/​unit/​test_view_versions.py Adds unit classification.
tests/​unit/​test_view_file_provenance.py Adds component classification.
tests/​unit/​test_view_command.py Adds component classification.
tests/​unit/​test_update_policy.py Adds unit classification.
tests/​unit/​test_uninstall_shared_ownership.py Adds component classification.
tests/​unit/​test_uninstall_dev_dependencies.py Adds component classification.
tests/​unit/​test_uninstall_default_host.py Adds component classification.
tests/​unit/​test_triage_panel_lock.py Adds component classification.
tests/​unit/​test_transitive_deps.py Adds component classification.
tests/​unit/​test_tls_docs_scope.py Adds component classification.
tests/​unit/​test_symlink_containment.py Adds component classification.
tests/​unit/​test_subprocess_env.py Adds unit classification.
tests/​unit/​test_stale_file_detection.py Adds unit classification.
tests/​unit/​test_ssl_cert_hook.py Adds component classification.
tests/​unit/​test_ssh_user_threading.py Adds unit classification.
tests/​unit/​test_skip_env_prompts.py Adds unit classification.
tests/​unit/​test_shepherd_driver_evals.py Adds component classification.
tests/​unit/​test_shepherd_driver_completion_schema.py Adds component classification.
tests/​unit/​test_shared_artifact_file_modes.py Adds component classification; retains Windows selection.
tests/​unit/​test_shared_apm_workflow_contract.py Adds component classification.
tests/​unit/​test_selective_install.py Adds unit classification.
tests/​unit/​test_security_workflow_contracts.py Adds component classification.
tests/​unit/​test_security_file_scanner.py Adds component classification.
tests/​unit/​test_script_formatters.py Adds unit classification.
tests/​unit/​test_safe_installer.py Adds unit classification.
tests/​unit/​test_runtime_import_declarations.py Adds component classification.
tests/​unit/​test_runtime_factory.py Adds component classification.
tests/​unit/​test_runtime_detection.py Adds unit classification.
tests/​unit/​test_runtime_args.py Adds unit classification.
tests/​unit/​test_removal_compile_hint.py Adds component classification.
tests/​unit/​test_registry_integration.py Adds unit classification.
tests/​unit/​test_registry_entry_alias_traversal.py Adds unit classification.
tests/​unit/​test_registry_client.py Adds unit classification.
tests/​unit/​test_registry_client_http_cache.py Adds component classification.
tests/​unit/​test_redaction_helpers.py Adds unit classification.
tests/​unit/​test_python_paths.py Adds unit classification.
tests/​unit/​test_protocol_fallback_warning.py Adds component classification.
tests/​unit/​test_plugin.py Adds component classification.
tests/​unit/​test_plugin_synthesis.py Adds component classification.
tests/​unit/​test_plugin_exporter_schema.py Adds component classification.
tests/​unit/​test_platform_contract_workflow.py Adds component classification.
tests/​unit/​test_path_home_override.py Adds component classification.
tests/​unit/​test_package_manager.py Adds unit classification.
tests/​unit/​test_package_manager_base.py Adds unit classification.
tests/​unit/​test_package_identity.py Adds unit classification.
tests/​unit/​test_outdated_marketplace.py Adds unit classification.
tests/​unit/​test_orphan_announce_parity.py Adds component classification.
tests/​unit/​test_mcp_integrator_coverage.py Adds unit classification.
tests/​unit/​test_mcp_integrator_characterisation.py Adds unit classification.
tests/​unit/​test_mcp_command.py Adds component classification.
tests/​unit/​test_lockfile_self_entry.py Adds unit classification.
tests/​unit/​test_lockfile_exec_status.py Adds unit classification.
tests/​unit/​test_lockfile_enrichment.py Adds unit classification.
tests/​unit/​test_lockfile_declared_license.py Adds unit classification.
tests/​unit/​test_local_content_install.py Adds component classification.
tests/​unit/​test_llm_runtime.py Adds unit classification.
tests/​unit/​test_list_command.py Adds component classification.
tests/​unit/​test_integration_coverage.py Adds unit classification.
tests/​unit/​test_install_update.py Adds unit classification.
tests/​unit/​test_install_tui.py Adds unit classification.
tests/​unit/​test_install_path_declaration_invariant.py Adds component classification.
tests/​unit/​test_install_output.py Adds unit classification.
tests/​unit/​test_install_default_host.py Adds component classification.
tests/​unit/​test_init_plugin.py Adds component classification.
tests/​unit/​test_ignore_non_content.py Adds component classification.
tests/​unit/​test_github_host.py Adds unit classification.
tests/​unit/​test_github_downloader_temp_dir.py Adds component classification.
tests/​unit/​test_git_reference_resolver_resolution.py Adds unit classification.
tests/​unit/​test_git_parent_reference.py Adds unit classification.
tests/​unit/​test_generic_git_urls.py Adds unit classification.
tests/​unit/​test_external_runner.py Adds unit classification.
tests/​unit/​test_env_variables.py Adds component classification.
tests/​unit/​test_drift_registry.py Adds unit classification.
tests/​unit/​test_drift_registry_proxy_route.py Adds unit classification.
tests/​unit/​test_download_strategies.py Adds component classification.
tests/​unit/​test_docs_contract_workflow.py Adds component classification.
tests/​unit/​test_docker_args.py Adds unit classification.
tests/​unit/​test_diagnostics.py Adds unit classification.
tests/​unit/​test_deps.py Adds component classification.
tests/​unit/​test_deps_utils.py Adds component classification.
tests/​unit/​test_deps_reachability.py Adds component classification.
tests/​unit/​test_deps_clean_command.py Adds component classification.
tests/​unit/​test_dependency_types.py Adds unit classification.
tests/​unit/​test_dep_targets_persistence.py Adds unit classification.
tests/​unit/​test_dep_only_package.py Adds component classification.
tests/​unit/​test_dead_workflow_code_removed.py Adds unit classification.
tests/​unit/​test_copilot_runtime.py Adds component classification.
tests/​unit/​test_content_hash.py Adds component classification.
tests/​unit/​test_constitution_hash.py Adds unit classification.
tests/​unit/​test_conflict_detection.py Adds unit classification.
tests/​unit/​test_codex_runtime.py Adds unit classification.
tests/​unit/​test_cli_encoding.py Adds unit classification.
tests/​unit/​test_bundle_formats.py Adds unit classification.
tests/​unit/​test_build_spec.py Adds component classification.
tests/​unit/​test_bootstrap_mirror.py Adds unit classification.
tests/​unit/​test_azure_cli.py Adds component classification.
tests/​unit/​test_audit_fail_on_drift.py Adds component classification.
tests/​unit/​test_audit_deployment_owners.py Adds component classification.
tests/​unit/​test_audit_command.py Adds component classification.
tests/​unit/​test_audit_ci_command.py Adds component classification.
tests/​unit/​test_audit_ci_auto_discovery.py Adds component classification.
tests/​unit/​test_apm_yml_registries.py Adds component classification.
tests/​unit/​test_apm_spec_guardian_synthesizer_schema.py Adds component classification.
tests/​unit/​test_apm_package.py Adds component classification.
tests/​unit/​test_agent_plugin_exporter.py Adds component classification.
tests/​unit/​scripts/​test_run_mutation_pilot.py Adds component classification.
tests/​unit/​scripts/​test_ratchet_baseline.py Adds component classification; retains Windows selection.
tests/​unit/​scripts/​test_contracts_strip_charset.py Adds component classification.
tests/​unit/​scripts/​test_check_complexity_ratchet.py Adds component classification.
tests/​unit/​runtime/​test_runtime_utils.py Adds component classification.
tests/​unit/​regressions/​test_issue_2551_mcp_uninstall_cleanup.py Adds unit classification.
tests/​unit/​registry/​test_semver.py Adds unit classification.
tests/​unit/​registry/​test_outdated.py Adds component classification.
tests/​unit/​registry/​test_extractor.py Adds component classification.
tests/​unit/​registry/​test_config_loader.py Adds unit classification.
tests/​unit/​registry/​test_compat_matrix.py Adds component classification.
tests/​unit/​registry/​test_client.py Adds unit classification.
tests/​unit/​registry/​test_auth.py Adds unit classification.
tests/​unit/​policy/​test_trust_policy_outcome.py Adds component classification.
tests/​unit/​policy/​test_schema.py Adds unit classification.
tests/​unit/​policy/​test_schema_pinned_constraint.py Adds unit classification.
tests/​unit/​policy/​test_policy_serialization_properties.py Adds component classification.
tests/​unit/​policy/​test_policy_golden.py Adds component classification.
tests/​unit/​policy/​test_fixtures.py Adds component classification.
tests/​unit/​policy/​test_dependency_identity_case.py Adds unit classification.
tests/​unit/​policy/​test_chain_discovery_shared.py Adds unit classification.
tests/​unit/​models/​test_manifest_deprecation_warning.py Adds component classification.
tests/​unit/​models/​test_manifest_bootstrap.py Adds component classification.
tests/​unit/​models/​test_dependency_reference_semver_routing.py Adds unit classification.
tests/​unit/​models/​test_dependency_materialization.py Adds component classification.
tests/​unit/​marketplace/​test_yml_schema.py Adds component classification.
tests/​unit/​marketplace/​test_yml_editor.py Adds component classification.
tests/​unit/​marketplace/​test_versioned_resolver.py Adds unit classification.
tests/​unit/​marketplace/​test_versioned_directory_resolution.py Adds unit classification.
tests/​unit/​marketplace/​test_version_check.py Adds component classification.
tests/​unit/​marketplace/​test_user_manifest_marketplaces.py Adds component classification.
tests/​unit/​marketplace/​test_tag_pattern.py Adds unit classification.
tests/​unit/​marketplace/​test_shared.py Adds unit classification.
tests/​unit/​marketplace/​test_semver.py Adds unit classification.
tests/​unit/​marketplace/​test_schema_conformance.py Adds component classification.
tests/​unit/​marketplace/​test_registry_integration.py Adds unit classification.
tests/​unit/​marketplace/​test_output_profiles.py Adds unit classification.
tests/​unit/​marketplace/​test_name_sanitisation.py Adds unit classification.
tests/​unit/​marketplace/​test_migrate_command.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_validator.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_source_base.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_resolver.py Adds unit classification.
tests/​unit/​marketplace/​test_marketplace_registry.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_models.py Adds unit classification.
tests/​unit/​marketplace/​test_marketplace_errors.py Adds unit classification.
tests/​unit/​marketplace/​test_marketplace_commands.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_client.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_catalog_path.py Adds component classification.
tests/​unit/​marketplace/​test_marketplace_audit.py Adds component classification.
tests/​unit/​marketplace/​test_lockfile_provenance.py Adds unit classification.
tests/​unit/​marketplace/​test_local_path_compose.py Adds component classification.
tests/​unit/​marketplace/​test_io.py Adds component classification.
tests/​unit/​marketplace/​test_git_utils.py Adds unit classification.
tests/​unit/​marketplace/​test_git_stderr.py Adds unit classification.
tests/​unit/​marketplace/​test_dependency_confusion.py Adds unit classification.
tests/​unit/​marketplace/​test_client_ado.py Adds unit classification.
tests/​unit/​marketplace/​test_catalog_origin.py Adds unit classification.
tests/​unit/​marketplace/​test_builder_logging.py Adds component classification.
tests/​unit/​marketplace/​test_builder_json.py Adds unit classification.
tests/​unit/​marketplace/​test_auth_helpers.py Adds unit classification.
tests/​unit/​integration/​test_utils.py Adds unit classification.
tests/​unit/​integration/​test_targets_registry_completeness.py Adds unit classification.
tests/​unit/​integration/​test_sync_integration_url_normalization.py Adds component classification.
tests/​unit/​integration/​test_symlink_rejection.py Adds component classification.
tests/​unit/​integration/​test_skill_dir_has_content.py Adds component classification.
tests/​unit/​integration/​test_skill_cleanup_containment.py Adds component classification.
tests/​unit/​integration/​test_skill_adoption.py Adds component classification.
tests/​unit/​integration/​test_scope_integration.py Adds component classification.
tests/​unit/​integration/​test_mcp_registry_parallel.py Adds unit classification.
tests/​unit/​integration/​test_mcp_per_dep_registry.py Adds unit classification.
tests/​unit/​integration/​test_integration_wiring_invariants.py Adds component classification.
tests/​unit/​integration/​test_hook_target_deprecation.py Adds component classification.
tests/​unit/​integration/​test_hook_naked_format.py Adds component classification.
tests/​unit/​integration/​test_hook_merge_config_links.py Adds component classification.
tests/​unit/​integration/​test_hook_integrator_reconcile_dropped_targets.py Adds component classification.
tests/​unit/​integration/​test_hook_integrator_issue1892.py Adds component classification.
tests/​unit/​integration/​test_copilot_cowork_target.py Adds component classification.
tests/​unit/​integration/​test_copilot_app_target.py Adds component classification.
tests/​unit/​integration/​test_copilot_app_error_ux.py Adds component classification.
tests/​unit/​integration/​test_content_identical_adopt.py Adds component classification.
tests/​unit/​integration/​test_check_collision.py Adds component classification.
tests/​unit/​install/​test_windows_shim_template.py Adds component classification.
tests/​unit/​install/​test_validation_transient_probe.py Adds unit classification.
tests/​unit/​install/​test_validation_rate_limit.py Adds unit classification.
tests/​unit/​install/​test_validation_proxy.py Adds unit classification.
tests/​unit/​install/​test_validation_gitlab_ssh.py Adds unit classification.
tests/​unit/​install/​test_validation_github_ssh_subdir.py Adds unit classification.
tests/​unit/​install/​test_validation_credential_env.py Adds unit classification.
tests/​unit/​install/​test_validation_ado_bearer.py Adds unit classification.
tests/​unit/​install/​test_template_exec_trust.py Adds component classification.
tests/​unit/​install/​test_summary.py Adds unit classification.
tests/​unit/​install/​test_sources_classification.py Adds unit classification.
tests/​unit/​install/​test_short_sha.py Adds unit classification.
tests/​unit/​install/​test_service.py Adds unit classification.
tests/​unit/​install/​test_security_scan_helper.py Adds component classification.
tests/​unit/​install/​test_root_redirect.py Adds component classification.
tests/​unit/​install/​test_resolving_heartbeat.py Adds unit classification.
tests/​unit/​install/​test_resolve_spec_drift.py Adds unit classification.
tests/​unit/​install/​test_resolution_transactionality.py Adds component classification.
tests/​unit/​install/​test_resolution_staging_relocate.py Adds component classification.
tests/​unit/​install/​test_registry_wiring.py Adds unit classification.
tests/​unit/​install/​test_policy_gate_phase.py Adds unit classification.
tests/​unit/​install/​test_plan.py Adds unit classification.
tests/​unit/​install/​test_pipeline_auth_preflight.py Adds unit classification.
tests/​unit/​install/​test_pipeline_auth_preflight_env_leak.py Adds unit classification.
tests/​unit/​install/​test_phase_timing.py Adds unit classification.
tests/​unit/​install/​test_orphan_removal_owner.py Adds unit classification.
tests/​unit/​install/​test_obstructed_path_diagnostics.py Adds component classification; retains Windows selection.
tests/​unit/​install/​test_noop_summary.py Adds component classification.
tests/​unit/​install/​test_mcp_warnings.py Adds unit classification.
tests/​unit/​install/​test_mcp_self_defined_declared_keys.py Adds component classification.
tests/​unit/​install/​test_mcp_retired_shape_heal.py Changes classification to component.
tests/​unit/​install/​test_mcp_ownership.py Adds component classification.
tests/​unit/​install/​test_mcp_lookup_heartbeat.py Adds unit classification.
tests/​unit/​install/​test_mcp_lockfile_determinism.py Adds component classification.
tests/​unit/​install/​test_mcp_args.py Adds unit classification.
tests/​unit/​install/​test_manifest_reconcile_dropped_hook_targets.py Adds component classification.
tests/​unit/​install/​test_local_rows_need_reconciling.py Changes classification to component.
tests/​unit/​install/​test_local_content_symlink_deref.py Adds component classification.
tests/​unit/​install/​test_install_pkg_policy_rollback.py Adds component classification.
tests/​unit/​install/​test_install_logger_policy.py Adds unit classification.
tests/​unit/​install/​test_install_exit_owner_invariant.py Adds component classification.
tests/​unit/​install/​test_gitlab_resolver.py Adds unit classification.
tests/​unit/​install/​test_finalize_phase.py Adds unit classification.
tests/​unit/​install/​test_file_scanner.py Adds component classification.
tests/​unit/​install/​test_drift_perf.py Adds component classification.
tests/​unit/​install/​test_direct_dep_failure.py Adds component classification.
tests/​unit/​install/​test_command_logger_elapsed.py Adds unit classification.
tests/​unit/​install/​test_ci_audit_materialization.py Adds component classification.
tests/​unit/​install/​test_carried_license_install.py Adds component classification.
tests/​unit/​install/​test_cached_source_lockfile_only.py Adds component classification.
tests/​unit/​install/​test_cached_semver_rebuild.py Adds unit classification.
tests/​unit/​install/​test_cached_label.py Adds component classification.
tests/​unit/​install/​test_bootstrap_preflight.py Adds component classification.
tests/​unit/​install/​test_artifactory_resolver.py Adds unit classification.
tests/​unit/​install/​test_antigravity_user_skills_root.py Adds component classification.
tests/​unit/​install/​phases/​test_targets_phase_v2.py Adds component classification.
tests/​unit/​install/​phases/​test_resolve_selective_update_plan.py Adds unit classification.
tests/​unit/​install/​phases/​test_resolve_seed_from_lockfile.py Adds unit classification.
tests/​unit/​install/​phases/​test_read_yaml_targets_list_form.py Adds component classification.
tests/​unit/​install/​phases/​test_lockfile_declared_license.py Adds unit classification.
tests/​unit/​install/​phases/​test_integrate_phase.py Adds component classification.
tests/​unit/​install/​phases/​test_integrate_held_headers.py Adds component classification.
tests/​unit/​install/​phases/​test_audit_phase.py Adds unit classification.
tests/​unit/​install/​heals/​test_chain_dispatch.py Adds unit classification.
tests/​unit/​export/​test_spdx.py Adds unit classification.
tests/​unit/​export/​test_sbom.py Adds unit classification.
tests/​unit/​export/​test_sbom_golden.py Adds component classification.
tests/​unit/​export/​test_declared_license.py Adds component classification.
tests/​unit/​deps/​test_why_walker.py Adds unit classification.
tests/​unit/​deps/​test_virtual_package_cdn_first_sweep.py Adds unit classification.
tests/​unit/​deps/​test_virtual_file.py Adds component classification.
tests/​unit/​deps/​test_stamp_plugin_version.py Adds component classification.
tests/​unit/​deps/​test_shared.py Adds component classification.
tests/​unit/​deps/​test_plugin_root_render.py Adds component classification.
tests/​unit/​deps/​test_path_anchoring.py Adds component classification.
tests/​unit/​deps/​test_package_validator_validation.py Adds component classification.
tests/​unit/​deps/​test_lsp_dependency.py Adds unit classification.
tests/​unit/​deps/​test_lockfile_replacement.py Adds unit classification.
tests/​unit/​deps/​test_lockfile_deployment_paths.py Adds unit classification.
tests/​unit/​deps/​test_host_backends.py Adds unit classification.
tests/​unit/​deps/​test_github_rate_limit.py Adds unit classification.
tests/​unit/​deps/​test_github_downloader_single_file_sha.py Adds component classification.
tests/​unit/​deps/​test_github_downloader_gitlab_routing.py Adds unit classification; retains Windows selection.
tests/​unit/​deps/​test_git_semver_resolver.py Adds unit classification.
tests/​unit/​deps/​test_git_remote_ops.py Adds unit classification.
tests/​unit/​deps/​test_carried_license.py Adds component classification.
tests/​unit/​deps/​test_apm_resolver_staging_paths.py Adds component classification; retains Windows selection.
tests/​unit/​core/​test_script_trust.py Adds component classification.
tests/​unit/​core/​test_output_mode_logic.py Separates a pure output-mode regression.
tests/​unit/​core/​test_null_logger.py Adds unit classification.
tests/​unit/​core/​test_host_providers.py Adds unit classification.
tests/​unit/​core/​test_effective_target_decision.py Adds component classification.
tests/​unit/​core/​test_build_orchestrator.py Adds component classification.
tests/​unit/​copilot_plugins/​test_pr2705_ergonomics_units.py Adds component classification.
tests/​unit/​compilation/​test_token_overhead_opt_in.py Adds component classification.
tests/​unit/​compilation/​test_output_writer.py Adds component classification.
tests/​unit/​compilation/​test_mathematical_optimization.py Adds component classification.
tests/​unit/​compilation/​test_managed_section.py Adds component classification.
tests/​unit/​compilation/​test_global_instructions_1072.py Adds component classification.
tests/​unit/​compilation/​test_global_claude_protection.py Asserts the absent directory remains absent.
tests/​unit/​compilation/​test_coverage_guarantees.py Adds component classification.
tests/​unit/​compilation/​test_context_optimizer.py Adds component classification.
tests/​unit/​compilation/​test_context_optimizer_symlinked_files.py Adds component classification.
tests/​unit/​compilation/​test_context_optimizer_perf_regressions.py Adds component classification.
tests/​unit/​compilation/​test_context_optimizer_cache_and_placement.py Adds component classification.
tests/​unit/​compilation/​test_compile_clean_last_primitive_2130.py Adds component classification.
tests/​unit/​compilation/​test_claude_formatter.py Adds component classification.
tests/​unit/​compilation/​test_agents_md_source_attribution_2634.py Adds component classification.
tests/​unit/​commands/​test_unpack_deprecation.py Adds component classification.
tests/​unit/​commands/​test_targets_command.py Adds component classification.
tests/​unit/​commands/​test_publish_cli_surface.py Adds component classification.
tests/​unit/​commands/​test_preview_run_hint.py Adds component classification.
tests/​unit/​commands/​test_policy_status.py Adds component classification.
tests/​unit/​commands/​test_plugin_init_command.py Adds component classification.
tests/​unit/​commands/​test_pack_cli_flags.py Adds component classification.
tests/​unit/​commands/​test_marketplace_migrate.py Adds component classification.
tests/​unit/​commands/​test_marketplace_doctor.py Adds component classification.
tests/​unit/​commands/​test_lock_export_command.py Adds component classification.
tests/​unit/​commands/​test_lock_command.py Adds component classification.
tests/​unit/​commands/​test_lifecycle.py Adds component classification.
tests/​unit/​commands/​test_helpers_version.py Adds component classification.
tests/​unit/​commands/​test_help_examples.py Adds component classification.
tests/​unit/​commands/​test_find_reverse_index.py Adds unit classification.
tests/​unit/​commands/​test_find_cli_surface.py Adds component classification.
tests/​unit/​commands/​test_export_patch.py Adds component classification.
tests/​unit/​commands/​test_doctor.py Adds component classification.
tests/​unit/​commands/​test_deps_alias_readers.py Asserts listed package directories exist.
tests/​unit/​commands/​test_cache_command.py Adds component classification.
tests/​unit/​commands/​deps/​test_why_command.py Adds component classification.
tests/​unit/​commands/​compile/​test_watch_target_forwarding.py Adds unit classification.
tests/​unit/​commands/​compile/​test_watch_live_reload_and_clean_warning.py Adds component classification.
tests/​unit/​cache/​test_url_normalize.py Adds unit classification.
tests/​unit/​cache/​test_git_cache_symlinks.py Asserts the materialized package directory exists.
tests/​unit/​cache/​test_git_cache_hardening.py Adds component classification.
tests/​unit/​cache/​test_cleanup.py Asserts cleanup does not create missing buckets.
tests/​unit/​cache/​test_cache_cli.py Adds component classification.
tests/​unit/​bundle/​test_plugin_exporter_lockfile.py Adds component classification.
tests/​unit/​bundle/​test_attest.py Adds component classification.
tests/​unit/​agent_plugins/​test_loader.py Adds component classification.
tests/​unit/​adapters/​test_vscode_docker_runtime_args.py Adds unit classification.
tests/​unit/​adapters/​test_project_mcp_config_links.py Adds component classification.
tests/​unit/​adapters/​test_mcp_json_config_merge_safety.py Adds component classification.
tests/​test_virtual_package_multi_install.py Adds component classification.
tests/​test_runtime_manager_token_precedence.py Adds component classification.
tests/​test_runnable_prompts.py Adds component classification.
tests/​test_gitlab_git_transport.py Adds component classification.
tests/​test_enhanced_discovery.py Adds component classification.
tests/​test_empty_string_and_defaults.py Adds component classification.
tests/​test_distributed_compilation.py Adds component classification.
tests/​test_console.py Adds component classification.
tests/​test_collision_integration.py Adds component classification.
tests/​test_codex_empty_string_and_defaults.py Adds component classification.
tests/​test_codex_docker_args_fix.py Adds component classification.
tests/​spec_conformance/​test_user_scope_executable_gate_reqs.py Adds component classification.
tests/​spec_conformance/​test_round_trip.py Adds component classification.
tests/​spec_conformance/​test_resolution_reqs.py Adds component classification.
tests/​spec_conformance/​test_registry_reqs.py Adds component classification.
tests/​spec_conformance/​test_portable_mcp_approval_reqs.py Adds component classification.
tests/​spec_conformance/​test_policy_reqs.py Adds component classification.
tests/​spec_conformance/​test_native_activation_profile_reqs.py Adds component classification.
tests/​spec_conformance/​test_mode_b_detector.py Adds component classification.
tests/​spec_conformance/​test_manifest_reqs.py Adds component classification.
tests/​spec_conformance/​test_manifest_extension_reqs.py Adds component classification.
tests/​spec_conformance/​test_gen_statement.py Adds component classification.
tests/​spec_conformance/​test_cursor_hook_reqs.py Adds component classification.
tests/​spec_conformance/​test_cowork_deployed_hash_reqs.py Adds component classification.
tests/​spec_conformance/​test_copilot_plugins_reqs.py Adds component classification.
tests/​red_team/​trust/​test_trust_store_integrity.py Adds component classification.
tests/​red_team/​trust/​test_toctou_read_swap.py Adds component classification.
tests/​red_team/​trust/​test_tier_confusion.py Adds component classification.
tests/​red_team/​trust/​test_path_identity.py Adds component classification.
tests/​red_team/​trust/​test_kill_switch.py Adds component classification.
tests/​red_team/​trust/​test_hash_domain_completeness.py Adds component classification.
tests/​red_team/​trust/​test_canonicalization.py Adds component classification.
tests/​red_team/​parser/​test_yaml_bomb.py Adds component classification.
tests/​red_team/​parser/​test_validate_cli.py Adds component classification.
tests/​red_team/​parser/​test_toplevel_shape.py Adds component classification.
tests/​red_team/​parser/​test_timeout_subprocess.py Adds component classification.
tests/​red_team/​parser/​test_resolve_cwd.py Adds component classification.
tests/​red_team/​parser/​test_policy_json_chaos.py Adds component classification.
tests/​red_team/​parser/​test_nonascii_control.py Adds component classification.
tests/​red_team/​parser/​test_malformed_shapes.py Adds component classification.
tests/​red_team/​parser/​test_huge_manifest.py Adds component classification.
tests/​red_team/​parser/​test_duplicate_keys.py Adds component classification.
tests/​red_team/​install/​test_orphan_process.py Adds component classification.
tests/​red_team/​install/​test_idempotency_and_log.py Adds component classification.
tests/​red_team/​install/​test_firing_trust_gate.py Adds component classification.
tests/​red_team/​install/​test_failure_isolation.py Adds component classification.
tests/​red_team/​install/​test_execute_bypass.py Adds component classification.
tests/​red_team/​install/​test_event_ordering.py Adds component classification.
tests/​red_team/​install/​test_concurrency.py Adds component classification.
tests/​red_team/​install/​test_alias_path_escape.py Adds component classification.
tests/​red_team/​http/​test_ssrf_ip_encodings.py Adds unit classification.
tests/​red_team/​http/​test_ssrf_fixture_e2e.py Adds component classification.
tests/​red_team/​http/​test_ssrf_destinations.py Adds component classification.
tests/​red_team/​http/​test_scheme_and_credentials.py Adds component classification.
tests/​red_team/​http/​test_resource_exhaustion.py Adds component classification.
tests/​red_team/​http/​test_redirect_and_timeout.py Adds component classification.
tests/​red_team/​http/​test_header_injection.py Adds component classification.
tests/​red_team/​env/​test_never_expand.py Adds component classification.
tests/​red_team/​env/​test_log_redaction.py Adds component classification.
tests/​red_team/​env/​test_header_expansion.py Adds unit classification.
tests/​red_team/​env/​test_denylist_suffix_gaps.py Adds component classification.
tests/​red_team/​env/​test_command_env.py Adds component classification.
tests/​perf/​test_install_scenarios.py Adds component classification; retains opt-in gating.
tests/​integration/​test_workspace_locking.py Adds component classification; retains Windows selection.
tests/​integration/​test_windows_installer_binary_test.py Adds component classification; retains Windows selection.
tests/​integration/​test_windows_installer_archive_fallback.py Adds component classification; retains Windows selection.
tests/​integration/​test_windows_compat_gate_workflow.py Adds component classification.
tests/​integration/​test_versioned_directory_probe.py Adds component classification.
tests/​integration/​test_unix_install_ownership.py Corrects the installer path after relocation.
tests/​integration/​test_shepherd_owner_touch_gate.py Adds component classification; retains Windows selection.
tests/​integration/​test_shared_clone_cache.py Adds component classification.
tests/​integration/​test_persistent_cache_ssh_transport.py Adds component classification.
tests/​integration/​test_lazy_import.py Adds component classification.
tests/​integration/​test_install_transaction.py Adds component classification; retains Windows selection.
tests/​integration/​test_install_target_copilot_app_e2e.py Adds component classification.
tests/​integration/​test_git_output_decoding.py Adds component classification; retains Windows selection.
tests/​integration/​test_git_cache_sparse.py Adds component classification.
tests/​integration/​test_git_cache_materialization.py Adds component classification.
tests/​integration/​test_enterprise_bootstrap_installers.py Adds component classification.
tests/​integration/​test_devcontainer_feature_retired.py Adds component classification.
tests/​integration/​test_config.py Adds component classification.
tests/​integration/​test_compile_rich_output.py Adds component classification.
tests/​integration/​test_cli_sigterm.py Adds component classification; retains POSIX restriction.
tests/​integration/​test_cli_consistency_checker_workflow.py Adds component classification.
tests/​integration/​test_cache_pin.py Adds component classification.
tests/​integration/​test_bare_cache_sparse.py Adds component classification.
tests/​integration/​test_annotated_tag_source_sha.py Adds component classification.
tests/​benchmarks/​test_security_and_resolver_benchmarks.py Adds component classification.
tests/​benchmarks/​test_scaling_guards.py Adds component classification.
tests/​benchmarks/​test_perf_benchmarks.py Adds component classification.
tests/​benchmarks/​test_lookup_and_cache_benchmarks.py Adds component classification.
tests/​benchmarks/​test_install_hot_paths.py Adds component classification.
tests/​benchmarks/​test_git_and_compiler_benchmarks.py Adds component classification.
tests/​benchmarks/​test_compilation_hot_paths.py Adds component classification.
tests/​benchmarks/​test_audit_benchmarks.py Adds component classification.

Review effort: Balanced


import pytest

pytestmark = pytest.mark.unit
@@ -13,7 +13,7 @@

# The GitLab REST fallback reads git config, so the cleared environment must
# still let git be found (Windows has no trusted-directory fallback).
pytestmark = pytest.mark.windows_compat
pytestmark = [pytest.mark.unit, pytest.mark.windows_compat]
Take main's ratchet infrastructure merged with this branch's gate rules;
union the duplicate, taxonomy and assertion baselines; keep this branch's
consolidated unit modules and port main's process-global patch rewrites
(AQ005) onto every moved or split copy, including the deleted phase3
module's surviving tests. No test that main added is dropped.

Co-authored-by: Copilot App <[email protected]>
- Point the resolve behavior spec test at the integration module that now
  holds the replacement-source helpers.
- Keep the Unix installer checksum module in tests/unit so its
  grandfathered complexity entry still applies.
- Give split and moved modules the promise id of the architecture owner
  they exercise, and drop their allowance entries.

Co-authored-by: Copilot App <[email protected]>
These split or moved modules exercise code with no registered architecture
owner, so they cannot carry an owner promise id and the shrink-only
taxonomy allowances reject them as new entries. Restore the parent modules
from main and drop the children until those areas have owners. No test is
lost: every test in a child maps back to its parent.

Co-authored-by: Copilot App <[email protected]>
Resolve the gate-cell obligation imports to the lifecycle family paths and
keep the module's component marker; set the merged tests instruction hash
in apm.lock.yaml.

Co-authored-by: Copilot App <[email protected]>
AQ003, AQ004 and AQ006 start in this pull request, so their baseline
records the debt observed in the merged tree, including modules that main
added and the parent modules restored from main. AQ001, AQ002 and AQ005
are unchanged and show no growth.

Co-authored-by: Copilot App <[email protected]>
Port the requirement markers that main added to tests this branch moved:
req-lk-009 onto the locked semver replay tests and req-sc-008 onto the
clone fallback test. Keep main's new primitive attribution tests.

Co-authored-by: Copilot App <[email protected]>
Port main's credential and egress test updates onto this branch's moved
copies: the two renamed URL-builder tests, the clone URL build calls
without token arguments, and the registry-only environment patch.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit a2aa8d1 into main Nov 20, 2026
26 of 37 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-refactored-happiness branch November 20, 2026 14:23
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Tests moved by main's split are carried to their new modules:
test_auth_phase3 -> test_auth_validation, drift advisory header ->
test_drift_pure_helpers.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel

Copy link
Copy Markdown
Collaborator Author

Post-merge coverage check (lines_fell_to_zero over src/apm_cli)

  • Before: unit coverage from a pre-merge PR head with no test deletions (CI run 44748478278, 115,840 covered lines). After: unit coverage at this PR's final head (run 44752575427, 114,893 lines). Compared by line text, because the source differs between the two commits.
  • 1,083 lines in 51 files lost their unit-test coverage. Most of them were tests moved to tests/integration, which PR CI does not run under coverage.
  • Measurement: the 30 moved integration modules, run under --cov=apm_cli on main a2aa8d1: 676 passed. They cover 1,078 of the 1,083 lines.
  • 5 lines stayed uncovered: commands/outdated.py (the locked-origin conflict row and the unregistered-alias fallback) and commands/_helpers.py (two early returns in the orphan check). test: restore coverage for two paths the consolidation left untested #4374 restores them, and the covered lines are verified.
  • Result after test: restore coverage for two paths the consolidation left untested #4374: lines_fell_to_zero = {}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-integration Run the full integration suite (ci-integration.yml) on this PR before merge

Projects

None yet

2 participants