Repository navigation
fix(output): MCP passthrough warning, registry lookup line and frozen trust notice print once (#4242, #4244, #4256) - #4405
Merged
Conversation
…and frozen trust notice once (#4242, #4244, #4256) - #4242: MCPDependency.from_dict warns about passthrough keys once per server per process; one command parses the same manifest several times. - #4244: CommandLogger.mcp_lookup_heartbeat names the registry it queries; the registry validation caller passes the redacted registry URL. - #4256: the locked MCP view prints the direct-dependency trust notice once per server per process; install collects that view in several passes. The three STRICT output cells are removed, so the global I9 oracle now fails any regression. Each fix has an installed-CLI regression assertion that fails before (6, identical lines, 3) and passes after, and a ledger row. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 16:22
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Servers sharing a registry but using different targets still emit identical lookup lines, violating the I9 duplicate-output check and leaving the shared-registry case uncovered by the installed-CLI regression.
1 open issue
What changed in this PR
This PR addresses three MCP output defects: repeated passthrough warnings, ambiguous registry lookup progress, and repeated frozen-install trust notices.
Changes:
- Deduplicates passthrough warnings and locked-view trust notices within each process.
- Adds the redacted registry URL to lookup progress messages.
- Strengthens lifecycle regressions, removes three known-output exceptions, and records the fixes.
| File | Description |
|---|---|
tests/utils/lifecycle_evidence.py |
Removes three known-output exceptions. |
tests/integration/test_mcp_remote_transport_harness_lifecycle.py |
Checks lookup messages identify each registry. |
tests/integration/test_hermes_mcp_fidelity_lifecycle.py |
Asserts the passthrough warning appears once. |
tests/integration/test_frozen_native_service_lifecycle.py |
Asserts the direct-dependency trust notice appears once. |
tests/fixtures/lifecycle_bug_ledger.json |
Links all three fixes to regression tests. |
tests/conftest.py |
Resets notice-deduplication state between tests. |
src/apm_cli/models/dependency/mcp.py |
Deduplicates passthrough-key warnings. |
src/apm_cli/integration/mcp_integrator_install.py |
Passes the redacted registry URL to the heartbeat. |
src/apm_cli/integration/mcp_config_view.py |
Deduplicates locked-view trust notices. |
src/apm_cli/core/null_logger.py |
Supports registry-specific lookup messages. |
src/apm_cli/core/command_logger.py |
Supports registry-specific lookup messages. |
CHANGELOG.md |
Documents the three output fixes. |
Review effort: Balanced
Comment on lines
+141
to
+143
| logger.mcp_lookup_heartbeat( | ||
| len(server_names), registry=redact_mcp_registry_url(registry_url) | ||
| ) |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Three I9 output defects found by the global output oracle (#4113), each fixed at the owner that emits the line.
MCPDependency.from_dict(src/apm_cli/models/dependency/mcp.py)CommandLogger.mcp_lookup_heartbeat(and itsNullCommandLoggermirror)registry, and_validate_registry_servers, its only caller, passes the redacted registry URL. The line now reads[>] Looking up 1 MCP server in registry <url>..., one per registry.src/apm_cli/integration/mcp_config_view.py)The once-per-process sets follow the #4332 precedent (
warn_unreadable_config_once). The roottests/conftest.pyclears them around every test, so in-process tests stay order-independent. No exit code or durable state changes.Strict cells flipped
Removed from
KNOWN_OUTPUT_CELLSintests/utils/lifecycle_evidence.py(steward pre-approved); the global I9 oracle now fails any regression:install-mcp-passthrough-warning-per-parse(MCP passthrough warning 'unknown key(s) preserved in extra' repeats for the same server #4242)install-registry-lookup-per-registry(MCP registry lookup progress line repeats without naming the registry #4244)install-frozen-trust-notice-repeats(apm install --frozen repeats '[i] Trusting direct dependency MCP' for the same server #4256)Issue and approved scope
Issue: Fixes #4242 (scope record: #4242 (comment)), Fixes #4244 (scope record: #4244 (comment)), Fixes #4256 (scope record: #4256 (comment))
Human scope-approval comment: the three scope records above (
apm-scope:v1, Decision: approve, review contact Daniel Meppiel (@danielmeppiel)).Does this PR complete the issue, or what remains? It completes all three.
Type of change
Testing
Installed-CLI regression tests (
APM_E2E_TESTS=1,-n 0). Each failed on main and passes with the fix:tests/integration/test_hermes_mcp_fidelity_lifecycle.py::test_hermes_package_uninstall_removes_only_its_entries. The warning count wasassert 6 == 1before the fix.tests/integration/test_mcp_remote_transport_harness_lifecycle.py::test_each_registry_lookup_line_names_its_registry. Before the fix, two identicalLooking up 1 MCP server in registry...lines.tests/integration/test_frozen_native_service_lifecycle.py::test_frozen_direct_package_services_keep_trust_and_recorded_ownership. The notice count wasassert 3 == 1before the fix.With the cells removed, those three modules plus
tests/unit/install/test_mcp_lookup_heartbeat.pyandtests/unit/scripts/test_lifecycle_evidence.pypassed (248 passed).tests/quality/test_lifecycle_bug_ledger.pypassed.Lint mirror on the merge base:
uvx [email protected] check/format --checkon the changed files: passed.lint-auth-signals.sh: clean.lint-architecture-boundaries.sh: exit 0.check_complexity_ratchet.py --base-ref origin/main: clean.Changelog
## [Unreleased]inCHANGELOG.md: one Fixed line per issue, each mapped to its ledger row.Spec conformance (OpenAPM v0.1)