Skip to content

fix(output): MCP passthrough warning, registry lookup line and frozen trust notice print once (#4242, #4244, #4256) - #4405

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
bug-sweep/i9-b
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
bug-sweep/i9-b

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Three I9 output defects found by the global output oracle (#4113), each fixed at the owner that emits the line.

Issue Owner Fix
#4242 MCPDependency.from_dict (src/apm_cli/models/dependency/mcp.py) The passthrough-key warnings ("unknown key(s) preserved in extra", "reserved passthrough key(s) ignored") print once per server per process. One command parses the same manifest up to six times.
#4244 CommandLogger.mcp_lookup_heartbeat (and its NullCommandLogger mirror) The heartbeat takes an optional 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.
#4256 the locked MCP view (src/apm_cli/integration/mcp_config_view.py) The direct-dependency trust notice prints once per server per process. Install collects the locked view in up to three passes.

The once-per-process sets follow the #4332 precedent (warn_unreadable_config_once). The root tests/conftest.py clears 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_CELLS in tests/utils/lifecycle_evidence.py (steward pre-approved); the global I9 oracle now fails any regression:

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

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Installed-CLI regression tests (APM_E2E_TESTS=1, -n 0). Each failed on main and passes with the fix:

With the cells removed, those three modules plus tests/unit/install/test_mcp_lookup_heartbeat.py and tests/unit/scripts/test_lifecycle_evidence.py passed (248 passed). tests/quality/test_lifecycle_bug_ledger.py passed.

Lint mirror on the merge base:

  • uvx [email protected] check / format --check on the changed files: passed.
  • pylint R0801: 10.00/10.
  • lint-auth-signals.sh: clean.
  • lint-architecture-boundaries.sh: exit 0.
  • check_complexity_ratchet.py --base-ref origin/main: clean.

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md: one Fixed line per issue, each mapped to its ledger row.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

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

…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]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
Copilot AI balanced review requested due to automatic review settings November 20, 2026 16:22
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

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)
)
This was referenced Nov 20, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 7e5fd4c into main Nov 21, 2026
37 of 42 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the bug-sweep/i9-b branch November 21, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants