Skip to content

[FEATURE] Exact per-edge skills x targets pairing for diamond dependencies, plus a normative subset-merge requirement #3763

Closed

Description

Proposals are welcome before implementation. For substantive changes, wait
for a responsible human maintainer to approve the scope and identify a review
contact. An automated recommendation, label alone, or silence is not approval.
See Contributing.

Is your feature request related to a problem? Please describe.
When two parents in a dependency graph declare different skills: and targets: subsets for the same skill bundle, 0.36.1 (#3735) merges each field independently: the node gets the union of skills and the union of targets. That is a cross-product: a skill that only parent A asked for (for claude) also deploys to the harness only parent B asked for (copilot). Example: A -> bundle skills: [alpha], targets: [claude]; B -> bundle skills: [gamma], targets: [copilot]. Expected: alpha in .claude/skills, gamma in .github/skills. 0.36.1: alpha and gamma in both.

There is also no normative OpenAPM requirement for how per-edge selections merge, so other consumers may pick first-wins.

Describe the solution you'd like

  • Exact per-edge pairing: the deployment plan carries a per-target skill set derived from the edges (union over edges of skills(edge) x targets(edge), with "all" absorbing per edge), replacing the per-field union. Single owner in models/dependency/subsets.py.
  • Lockfile records the pairing deterministically (no identity-key change); audit, uninstall shrink and --frozen read the same owner.
  • A normative OpenAPM requirement for subset merging (order independence, no silent first-wins, all-absorbs, exact pairing), with conformance tests and a sec 9.3 amendment row, reviewed by the spec panel.

Describe alternatives you've considered
Keep the per-field union (shipped in 0.36.1, over-approximates). Fail closed on divergence (breaks valid diamonds).

Additional context
Design: 0.36.1 T4 resolution brief, decision D1 option B deferred to 0.37 (approved 2026-11-17). Builds on #3735.

Activity

  1. added
    type/enhancement
    on Nov 17, 2026
  2. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision: approve
    Area: project
    Scope: Replace the per-field union of skills: and targets: subsets on a shared dependency node with exact per-edge pairing (each edge contributes its skills only to its targets, all absorbs per edge) through the single selection owner in models/dependency/subsets.py, recorded deterministically in the lockfile and read by deploy, audit, uninstall and frozen install; add a normative OpenAPM subset-merge requirement with conformance tests and a sec 9.3 amendment row.
    Done when: Divergent diamonds deploy each skill only to the harnesses its declaring edges selected, independent of manifest order; lockfile output is byte-identical across declaration orders; audit and uninstall agree with install; a static guard and mutation case protect the owner; the spec requirement and conformance tests pass and the spec panel has reviewed them.
    Out of scope: Dependency identity keys; alias and transport-hint merging; agents: subsets (#2491); exclude-mode subsets (#3203).
    Review contact: Daniel Meppiel (@danielmeppiel)

  3. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Context: this scope is decision D1 option B from the 0.36.1 resolution design, deferred to 0.37 and approved by Daniel Meppiel (@danielmeppiel) on 2026-11-17. It builds on the #3735 selection-merge owner. PRs are held until v0.36.1 is tagged.

  4. added
    status/accepted
    on Nov 17, 2026
  5. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Follow-up of #3735 (exact pairing deferred from the 0.36.1 fix).

  6. 21 remaining items

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

    area/dependenciesspecstatus/acceptedtype/enhancement

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions