Skip to content

fix(frozen): report a parked MCP server once - #4440

Merged
Daniel Meppiel (danielmeppiel) merged 4 commits into
mainfrom
fix/frozen-exec-park-notice-4422
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 4 commits into
mainfrom
fix/frozen-exec-park-notice-4422

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

apm install --frozen printed Parked MCP server '<srv>' (<pkg>): executables not approved twice. The hydrated frozen MCP check printed it at top level, then the MCP phase printed it again inside the package block. Both frozen MCP checks (the pre-pipeline check and the hydrated check in install/service.py) now pass a logger view (without_parked_notices, next to parked_mcp_message in integration/mcp_config_view.py) that drops only Parked MCP server notices; every other line (verbose cold-cache restoration, warnings) is kept. The MCP phase is the single printer of parked servers. #4255 passes logger=None on the pre-pipeline line for #4299; the two overlap on that one argument, and either resolution keeps the notice single.

File Change
src/apm_cli/integration/mcp_config_view.py, src/apm_cli/install/service.py without_parked_notices(logger) beside the parked-notice printer; passed to _frozen_mcp_reasons in enforce_frozen and enforce_hydrated_mcp.
tests/integration/test_frozen_parked_executables_notice_lifecycle.py New installed-CLI test: a dependency's self-defined MCP server with the gate on (executables: {allow: {}}); install, then install --frozen; the notice appears exactly once in each.
ledger, CHANGELOG.md One #4422 row; one Fixed line.

Failing before (fix reverted): the frozen run printed the notice twice (assertion count == 1 fails). After: 1 passed.

Note

T1's #4384 adds a strict I9 cell install-frozen-parked-executables-notice-twice keyed to #4422; it has not landed. Whichever lands second must drop that cell. Coordinated via the H lead.

Issue and approved scope

Fixes #4422 (scope record: #4422 (comment))

Does this PR complete the issue, or what remains? It completes it.

Type of change

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

Testing

  • Tested locally: the new test fails before and passes after; frozen and MCP lifecycle neighbours run.
  • All existing tests pass (CI)
  • Added tests for new functionality (if applicable)

Changelog

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

Spec conformance (OpenAPM v0.1)

apm-spec-waiver: diagnostic de-duplication only; no OpenAPM-observable behaviour change

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

Co-authored-by: Copilot [email protected]

The pre-pipeline and hydrated --frozen checks compute MCP drift without
printing parked servers; the MCP phase is the one printer, so a server
parked for unapproved executables is reported once.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.

🔵 Needs a closer look

Passing logger=None suppresses cold-cache verbose diagnostics along with parked notices, breaking two existing tests; the logging behavior or tests must be reconciled while preserving cold-cache acceptance checks.

No open issues 🎉

What changed in this PR

This PR addresses #4422 by making the MCP phase the single source of parked-server notices during frozen installs.

Changes:

  • Suppresses logging in both frozen MCP drift checks to avoid duplicate notices.
  • Adds an installed-CLI regression test asserting one notice for normal and frozen installs.
  • Records the fix in the lifecycle bug ledger and changelog.
File Description
tests/​integration/​test_frozen_parked_executables_notice_lifecycle.py Checks that an unapproved MCP server is reported exactly once per install.
tests/​fixtures/​lifecycle_bug_ledger.json Links #4422 to its regression test.
src/​apm_cli/​install/​service.py Disables logging in preflight and hydrated frozen MCP checks.
CHANGELOG.md Documents the duplicate-notice fix.

Review effort: Balanced

…-notice printer (#4422)

Keeps install/service.py within its LOC budget.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
#4255)

#4255 passed logger=None to the pre-pipeline admission check to avoid a duplicate parked notice; #4440 owns that with without_parked_notices(), which drops only parked notices and keeps the cold-cache verbose log that test_frozen expects. Verified by #4440's owner (bcb09e24): the notice prints exactly once and both unit tests pass.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit c643973 into main Nov 21, 2026
43 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the fix/frozen-exec-park-notice-4422 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

Development

Successfully merging this pull request may close these issues.

install --frozen repeats the parked notice for packages with unapproved executables

2 participants