Skip to content

fix(install): frozen skills-only replay accepts its recorded only-apm MCP omission (#5415) - #5416

Merged
Daniel Meppiel (danielmeppiel) merged 4 commits into
mainfrom
danielmeppiel-turbo-telegram
Nov 25, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 4 commits into
mainfrom
danielmeppiel-turbo-telegram

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: a8a72db018f3c1fa7cc2b3f21eea03a140cdea55

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Four target and dependency-entry combinations exercise success, missing evidence, and changed declarations.
↑ Existing admitted-baseline and gate omission suites pass.
↓ Full CI and Windows are not yet observed.
Diagnosis confidence 9.5/10 ↑ Reproduction fails on main and succeeds when the selection reaches both frozen gates.
↑ Exact fingerprint validation remains in the MCP view owner.
Evidence fit 9.5/10 ↑ Local-package reproduction matches the reported failure and both targets and dependency forms.

Description

apm install --only apm --frozen on a skills-only package rejected the package's own recorded only-apm MCP omission ("MCP selection is unknown: omission evidence is missing, damaged or stale"), so the documented frozen skills-only replay failed and CI for skills-only consumers could not verify a locked install. The omission fingerprint was stable. The frozen preflight and hydrated checks dropped the --only apm selection and derived MCP as enabled.

Fix: the install's MCP selection now reaches both frozen gates, and the canonical MCP view still verifies any previously admitted MCP baseline instead of masking it. An unchanged skills-only frozen replay exits 0 without enabling MCP or rewriting apm.lock.yaml. Missing or stale omission evidence still fails, and leaves the project unchanged.

Issue and approved scope

Issue: Fixes #5415

Human scope-approval comment: #5415 (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

  • All existing tests pass (focused modules only; CI runs the rest)

  • Added tests for new functionality (if applicable)

  • uv run --extra dev pytest tests/lifecycle/scenarios/test_frozen_only_apm_omission.py -x -q -p no:cacheprovider -> 4 passed. Failing before: frozen replay exited 1 on main 1e4a208. Cases: agent-skills and opencode targets, a positional and a predeclared local dependency, missing omission evidence (fails, state unchanged) and a changed MCP declaration (fails, state unchanged).

  • uv run --extra dev pytest tests/unit/integration/test_mcp_config_view.py -x -q -p no:cacheprovider -> 93 passed.

  • uv run --extra dev pytest tests/unit/integration/test_frozen_mcp_evidence.py -x -q -p no:cacheprovider -> 29 passed.

  • APM_BINARY_PATH="$(uv run --extra dev which apm)" uv run --extra dev pytest tests/integration/test_mcp_omission_lifecycle.py -x -q -p no:cacheprovider -> 6 passed.

  • APM_BINARY_PATH="$(uv run --extra dev which apm)" uv run --extra dev pytest tests/integration/test_mcp_deliberate_omission_audit_lifecycle.py -x -q -p no:cacheprovider -> 6 passed.

  • uv run --extra dev pytest tests/quality/test_lifecycle_bug_ledger.py -x -q -p no:cacheprovider -> 2 passed.

  • Lint mirror: ruff check and format, pylint R0801, auth boundary, complexity, architecture, YAML, file-length, relative-path and taxonomy checks pass.

  • uv run --extra dev python .apm/skills/cut-release/scripts/changelog_fragments.py check -> failed on pre-existing changelog.d/5385.fixed.md; the new fragment passes fragment_problems independently.

Changelog

  • One fragment per section, changelog.d/<pr>.<section>.md, holding
    one line: user-visible effect first, 25 words or fewer, ending with
    (#PR); breaking changes only under upgrade notes; no Highlights; no
    new lines under ## [Unreleased]. See changelog.d/README.md and
    .github/instructions/changelog.instructions.md.
  • N/A -- internal-only change (CI, tests, refactor).

Added changelog.d/5416.fixed.md.

Spec conformance (OpenAPM v0.1)

If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual in the
development guide:

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed <a id="req-XXX"></a> anchor + prose + Appendix C
    row).
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.
  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.
  • N/A -- this PR does not change OpenAPM-observable behaviour.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
apm-spec-waiver: restores documented frozen replay without changing OpenAPM normative requirements

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 01:18
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.39.0 milestone Nov 25, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

The supplied review evidence identifies no active issues requiring resolution.

No open issues 🎉

What changed in this PR

Fixes #5415 so apm install --only apm --frozen accepts matching recorded MCP omissions for skills-only installs, without enabling MCP or rewriting the lockfile. Previously admitted MCP configurations remain subject to verification.

Changes:

  • Carries the MCP selection through both frozen validation gates.
  • Accepts matching only-apm omission evidence while continuing to reject missing, damaged, or stale evidence.
  • Adds unit and lifecycle regression coverage, records the bug, and updates documentation.
File Description
tests/​unit/​integration/​test_mcp_config_view.py Tests matching evidence and invalid evidence or selection cases.
tests/​lifecycle/​scenarios/​test_frozen_only_apm_omission.py Tests successful frozen replay and unchanged state on rejected evidence.
tests/​fixtures/​lifecycle_bug_ledger/​bugs/​5415.json Links issue #5415 to its regression test.
src/​apm_cli/​integration/​mcp_config_view.py Keeps admitted MCP configurations checked during exact skills-only validation.
src/​apm_cli/​install/​service.py Passes MCP selection into frozen checks and considers omission-only lockfiles.
src/​apm_cli/​install/​phases/​integrate.py Forwards MCP selection to hydrated validation.
src/​apm_cli/​commands/​install.py Includes the selected install mode in the frozen request.
packages/​apm-guide/​.apm/​skills/​apm-usage/​commands.md Clarifies frozen omission handling in the usage guide.
docs/​src/​content/​docs/​reference/​baseline-checks.md Documents acceptance of matching evidence and rejection of invalid evidence.
changelog.d/​5416.fixed.md Adds a release note for the frozen replay fix.

Review effort: Balanced

install/service.py was over its 1000-line module budget. The reason
formatting for frozen MCP drift moves to install/frozen_mcp_drift.py;
InstallService still selects the view, computes the pending set and the
config diff, and raises. Behaviour unchanged.

The skills-only omission cell now reads the evidence back from the
lockfile on disk before the frozen selection, and the new lifecycle
scenario carries the module markers its siblings use.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues were identified for the frozen skills-only replay change.

No open issues 🎉

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 8f56b43 into main Nov 25, 2026
76 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-turbo-telegram branch November 25, 2026 06:56
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.

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

2 participants