apm icon indicating copy to clipboard operation
apm copied to clipboard

[BUG] Skills-only frozen replay rejects a recorded only-apm MCP omission in v0.38.1

Open Melivo opened this issue 1 week ago • 2 comments

Describe the bug

On APM 0.38.1, installing a local skill package with --only apm succeeds and records its intentionally omitted MCP server in apm.lock.yaml (reason: only-apm). Immediately repeating the same selection with --frozen exits 1, saying the omission evidence is missing, damaged or stale. This prevents CI from verifying a locked skills-only install.

To Reproduce

Run in a fresh temporary directory with APM 0.38.1 on PATH:

mkdir -p source/skills/demo consumer
cat > source/apm.yml <<'YAML'
name: frozen-mcp-repro
version: 1.0.0
includes:
  - skills/demo/
dependencies:
  mcp:
    - name: sample
      registry: false
      transport: stdio
      command: example-command-not-executed
YAML
printf '%s\n' '---' 'name: demo' 'description: Minimal test skill.' '---' 'Test.' > source/skills/demo/SKILL.md
cd consumer
apm install ../source --target agent-skills --only apm
apm install --target agent-skills --only apm --frozen

The first command exits 0 and writes mcp_omissions.sample.reason: only-apm with a declaration fingerprint. The second command exits 1. A repeat with apm install --no-frozen --target agent-skills --only apm does not change the frozen result. The same failure occurs with --target opencode and with the local dependency predeclared in the consumer manifest rather than added through a positional argument.

Expected behavior

The unchanged skills-only install replays successfully without enabling MCP or rewriting the lockfile, as documented under Frozen skills-only replay. Missing or stale omission evidence should still fail.

Environment

  • OS: Linux x86_64
  • APM: 0.38.1 (a243ac3), standalone binary
  • Targets tested: agent-skills and opencode; no IDE required

Logs

[x] --frozen: restored MCP declarations differ from apm.lock.yaml.
  - sample: MCP selection is unknown: omission evidence is missing, damaged or stale. Repeat the intended install selection ('--only apm' for skills-only); do not enable MCP just to pass this check
  - MCP server 'sample' is missing from apm.lock.yaml

Additional context

  • In a fresh control without the MCP declaration, the frozen replay passes. apm audit --ci --no-fail-fast also passes on the skills-only deployment with the declaration, but it does not exercise the failing install replay.
  • Related to #3925 / #3938, which reproduced a gate-parked server (unapproved-executables). This reproduction instead uses explicit --only apm (only-apm) on a released build. The dependency is local throughout; no failed Git re-download is required, unlike #4909. I have not established the underlying cause.

Melivo avatar Nov 25 '26 00:11 Melivo

Decision: approve Area: project Scope: Install, frozen replay (restores the documented "Frozen skills-only replay" behavior). After apm install --only apm records an intentionally omitted MCP server in apm.lock.yaml (reason: only-apm, with its declaration fingerprint), repeating the same selection with --frozen accepts that recorded omission. The replay exits 0, enables no MCP server, and does not rewrite the lockfile. Omission evidence that is missing, damaged or stale, or whose fingerprint does not match the current declaration, still fails --frozen with today's message. A different selection (MCP enabled) is unchanged. Done when: A red-first lifecycle cell follows the issue's repro (a local skill package that declares a stdio MCP server; install with --only apm, then --frozen --only apm). The frozen run exits 0, no MCP is configured, and apm.lock.yaml is byte-identical. The cell covers the agent-skills and opencode targets, and the dependency both as a positional argument and predeclared in the manifest. Negative cells: a removed or damaged omission entry, and a changed MCP declaration, still fail --frozen. QL H8. A CHANGELOG fragment and CI green. Out of scope: Gate-parked servers (#3925, #3938); re-download failures (#4909); changes to how omissions are recorded. Review contact: @danielmeppiel

danielmeppiel avatar Nov 25 '26 01:11 danielmeppiel

Thank you @Melivo for the precise, self-contained repro and the cross-check against the related issues. The scope for the fix is approved above, and it is being worked on now.

danielmeppiel avatar Nov 25 '26 01:11 danielmeppiel