Skip to content

pm merge install omits managed extension registry from pm-json coverage and rejects a protective rule as fence drift #780

Closed

Description

@unbraind

Summary

pm merge install in @unbrained/pm-cli 2026.7.27 protects tracker settings and schema JSON with the field-aware pm-json merge driver, but omits the PM-owned extension registry at .agents/pm/extensions/.managed-extensions.json.

Adding the natural protective rule manually is not a stable workaround: pm validate classifies it as a stale merge-fence pattern, and the next pm merge install removes it.

Reproduction

pm merge install
rg "pm-json" .gitattributes

Generated coverage:

".agents/pm/settings.json" merge=pm-json
".agents/pm/schema/*.json" merge=pm-json

The managed registry is absent. Add:

".agents/pm/extensions/.managed-extensions.json" merge=pm-json

Then:

pm validate --json | jq ".checks[] | select(.name == \"storage_integrity\") | .details.merge_fence"

Observed:

{
  "status": "drift",
  "stale_patterns": [
    "\".agents/pm/extensions/.managed-extensions.json\" merge=pm-json"
  ]
}

Running pm merge install again removes the rule.

Impact

Package upgrades rewrite the shared managed-extension registry. Concurrent package/extension upgrades therefore use Git text merge for PM-owned structured state, while the installed field-aware JSON driver already exists and is used for adjacent tracker JSON. A user cannot opt into protection without making the canonical merge-fence validator permanently warn.

Expected

Include ${prefix}extensions/.managed-extensions.json in buildMergeAttributePatterns() with merge=pm-json, and cover install, audit, dry-run, custom tracker roots, and idempotent refresh tests. If the registry has semantics beyond ordinary key-level JSON merge, provide a dedicated driver rather than leaving it unprotected.

Duplicate search

Searched open and closed issues in unbraind/pm-cli for managed-extensions gitattributes merge pm-json, merge install managed extension registry, gitattributes pm-json, merge driver, and managed extensions. Existing merge-driver issues cover item/history/config/schema behavior, receipt visibility, lifecycle sandboxes, and driver path health; none covers the managed extension registry omission or the stale-pattern trap.

Environment

  • @unbraind/pm-cli 2026.7.27 (global and repo-local)
  • Linux, Git worktree with .agents/pm

Activity

  1. coderabbitai commented on Jul 27, 2026

    @coderabbitai
    🔗 Related PRs

    #406 - feat(mcp): extension-aware built-in actions + action-scoped name schema (pm-zumn, pm-fq80) [merged]
    #428 - Harden SDK extension runtime packaging [merged]
    #479 - feat(package): isolate project doctor diagnostics [merged]
    #491 - Harden init target safety and package install verification [merged]
    #614 - SDK-first field-aware merge safety and storage integrity [merged]
    #673 - feat(sdk): harden workspace mutation and migration primitives [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. unbraind commented on Jul 27, 2026

    @unbraind
    OwnerAuthor

    Canonical PM owner: pm-gjicmx. The existing all-status item covers tracked non-item JSON merge-fence completeness and is now actively claimed in the broad SDK/CLI context-integrity bundle.

  3. unbraind commented on Jul 28, 2026

    @unbraind
    OwnerAuthor

    Merged resolution: #783. Canonical PM item: pm-gjicmx. The implementation applies field-aware JSON protection across the tracker JSON tree, including the managed-extension registry, with aligned install, audit, and idempotence behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions