Skip to content

fix(install): post-install scripts fire after MCP/LSP reconciliation - #4486

Merged
Daniel Meppiel (danielmeppiel) merged 5 commits into
mainfrom
bug-sweep/p4319
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 5 commits into
mainfrom
bug-sweep/p4319

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

apm install and apm update fire post-install lifecycle scripts after MCP and LSP service reconciliation, so a script sees the final apm.lock.yaml and the command writes the lockfile once. The install-commit-order architecture rule (install_entry_and_commit) pins the order. Code by H-D (danielmeppiel-hd-4319-post-install @475c3a5e), carried as is; this vehicle adds only the ledger row and CHANGELOG line.

Stacked on #4255 (base: danielmeppiel-h2b-install-commit); the integrator folds it after #4255.

Also carries two #4329 test commits (not fixed here; #4329's milestone depends on its failure-path cell): a strict known cell for the native Claude registration ordering and an I1 lock = disk pin for a native Claude install with MCP. Refs #4329.

Issue and approved scope

Issue: Fixes #4319

Human scope-approval comment: #4319 (comment)

Does this PR complete the issue, or what remains? Completes the 0.37 scope of #4319. Native Claude plugin registration ordering remains in #4329.

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 test: tests/integration/test_lockfile_commit_point_lifecycle.py::test_post_install_script_sees_the_final_lockfile_written_once (install adds an MCP server with a trusted post-install script; count_lockfile_writes asserts one write, and the script's copy equals the final lockfile including the server).

  • tests/integration/test_claude_native_hook_lifecycle.py: strict install: reconcile MCP/LSP before native plugin registration commits the lockfile #4329 cell plus I1 failure-path probe (lock = disk).

  • Not run locally (host load; PM instruction); CI validates.

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.

apm install and apm update reconcile MCP/LSP services before firing
post-install scripts, so a script sees the final lockfile and the command
writes it once. The install-commit-order rule pins the order.

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

An install that registers a native Claude plugin and an MCP server is
expected to write apm.lock.yaml once; the strict known cell tracks #4329.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Base automatically changed from danielmeppiel-h2b-install-commit to main November 21, 2026 05:24
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit ba944b8 into main Nov 21, 2026
4 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the bug-sweep/p4319 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 fires post-install scripts before MCP/LSP reconciliation commits the lockfile

1 participant