Repository navigation
fix(install): delete the emptied .github/mcp.json APM created on the 0.36 move (#4524) - #4527
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits intoNov 20, 2026
Conversation
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 22:18
…#4524) Co-authored-by: Copilot App <[email protected]>
…0.36 move When the Copilot MCP move empties .github/mcp.json and every server it held was APM's (or a frozen heal already emptied a file the pre-0.37 lock claims), the heal deletes it and names it in the move summary. It stays when it holds any other entry, when copilot would lose its only detection signal (apm.yml does not declare copilot and no other copilot signal remains), and under --frozen, whose unrestamped lock still needs the file as proof of the move; the next install deletes it. Updates the two lifecycle cells that pinned the old keep, adds the ledger row and a CHANGELOG line. Fixes #4524 apm-spec-waiver: retired Copilot MCP destination cleanup only; no OpenAPM contract change Co-authored-by: Copilot App <[email protected]>
…on the 0.36.1 upgrade (#4524) C7 seeds the released 0.36.1 Copilot + Kiro fixture's .github/mcp.json in the user's own style with a user server 'mine' beside APM's 'notes'. After the 0.37 install the file is kept and its parsed content is the user's file minus APM's entry; 'mine' is unchanged and does not move to .mcp.json; the lock matches disk; audit --ci and install --frozen are clean; a repeat install changes no bytes. Co-authored-by: Copilot App <[email protected]>
…b/mcp.json move (#4524) After --frozen the emptied file stays as {"mcpServers": {}} and audit --ci passes; the next plain install deletes it with the summary line, audit and --frozen stay clean, and a repeat install prints no Removed line. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
fix/4524-empty-legacy-mcp
branch
from
November 20, 2026 22:25
f3d2a01 to
aa429d0
Compare
Daniel Meppiel (danielmeppiel)
merged commit Nov 20, 2026
5e2f234
into
train/0.37-final-2
4 checks passed
5 of 14 tasks
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
After upgrading from 0.36.1, the Copilot MCP move to the root
.mcp.jsonleft.github/mcp.jsonbehind as an empty{"mcpServers": {}}, even when APM had created it.The fix is in the retired-destination owner (
install/mcp/retired_destinations.py,heal_retired_project_mcp_destinations):Removed empty .github/mcp.json (APM created it and no longer writes it), when APM provably created it. That means every server it held was APM's and this heal removed it, or it holds none while the pre-0.37 lock claims names there.copilotwould lose its only detection signal (.github/mcp.jsonis inSIGNAL_WHITELIST). In that caseapm.ymldoes not declare copilot and no other copilot signal remains.--frozen. A frozen install cannot restamp the lock, so the file is the only proof of the move (split_mcp_claims). The next install deletes it.Two lifecycle assertions that pinned the old "never delete" decision (#3866) now expect deletion for projects that declare copilot.
Issue and approved scope
Issue: Fixes #4524
Human scope-approval comment: #4524 (comment)
Does this PR complete the issue, or what remains? It completes the issue. Rebased onto train-2 b51f2bb, which already holds #4522; the branch carries only the #4524 delta (4 commits: C6 extension, fix, C7 by the C lead, --frozen pins).
Type of change
Testing
Validation evidence (targeted runs only, via the host guard):
pytest -p no:xdist tests/integration/test_legacy_lock_upgrade_lifecycle.py::test_c6_036_copilot_kiro_mcp_project_converges_to_the_037_layoutExtra items in the left set: '.github/mcp.json'.pytest -p no:xdist tests/integration/test_legacy_lock_upgrade_lifecycle.py::test_c7_036_user_created_copilot_mcp_file_keeps_user_server_on_upgrade: passed. It is a guard that a user file is kept, so it passes with or without the fix.pytest -p no:xdist tests/integration/test_copilot_root_mcp_json_lifecycle.py tests/unit/install/test_copilot_project_mcp_destination.pyplus C6: 65 passed. An earlier version of the fix deleted under--frozen, and the four frozen-upgrade cells caught it; they pass now.pytest -p no:xdist tests/quality/test_lifecycle_bug_ledger.py: 2 passed.uvx [email protected] checkandformat --checkon the touched files: clean.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.
Follow-up pins (steward):
test_frozen_upgrade_keeps_the_root_entry_apm_wrote[copilot]now checks:install --frozen,.github/mcp.jsonis exactly{"mcpServers": {}}andaudit --ciexits 0;audit --ciandinstall --frozenstay clean;Removedline.The frozen test, C6, C7, the two updated lifecycle cells and the ledger quality test all pass on the rebased head (2 + 2 + 6 passed).