Skip to content

Package semantics vary on two axes the resource model fixes by assumption: is the version part of identity, and is the install global or local #872

Open

Description

@David-Noble-at-work

Raised 2026-09-09 while sizing #814, when a merge rule had to decide what happens if a general manifest claims jq and a platform manifest claims [email protected]. The answer devlore gives today is an assumption, not a ruling, and it is worth ruling deliberately before the pkg design record (#868) writes it down as fact.

Axis 1: is the version part of a package's identity?

pkg.Resource's URI is versionless by construction: buildCandidate builds the identity purl without the @version, so jq and [email protected] intern to one catalog entry and the version is mutable state on it. Two claims that differ only in version are therefore a conflict to be resolved, not two resources.

That holds for some ecosystems and not others:

Ecosystem Two versions at once? So the versionless URI is
apt, winget no, one version per package correct
brew not per formula — but [email protected] is a different formula, so a different name correct, by a different route
nix yes, by design, many generations in the store wrong
npm, pip, cargo, maven yes, per project or per environment wrong

Note the asymmetry the purl fix (#813) introduced without meaning to settle this: qualifiers are identity — scope=machine and scope=user are two installations — while the version is not. Both are attributes of a purl; they were ruled opposite ways, one deliberately and one by inheritance.

Axis 2: is the install global or local?

Every package the provider models today installs globally: one machine-wide location the platform's manager owns, which is what makes "installed" a question with one answer and reconciliation a machine-wide read. Language ecosystems install locally — node_modules beside a project, a virtualenv, Cargo.toml's lockfile, a nix profile — where "installed" is only a question relative to a location.

The resource model has no place to say which a claim means. A local install would need the location in the identity (otherwise two projects' claims on one package collide), which loops back to axis 1: for a local ecosystem, both the version and the location are identity.

What this issue is for

Not to add an ecosystem. To rule what the model asserts, and to write it where a reader meets it, so the assumption stops being invisible:

  1. Rule whether the versionless URI is a general rule or a rule scoped to global, one-version-per-name managers — and if scoped, what the model does when an ecosystem outside that scope arrives.
  2. Rule whether install location belongs in a package resource's identity, and what a local claim would look like if so.
  3. Reconcile the asymmetry with qualifiers, either by making the version identity too or by stating why the two differ.
  4. Record the ruling in the pkg design document (The pkg provider has no design document: 3.5.x has an entry for every provider but this one #868) and in 4.1-resource-identity.md.

Acceptance

Related

The shape the answer probably takes (USER, 2026-09-09)

we need a consistent package management interface that accepts a purl and answers questions about it. Questions
such as are these the same or different packages? What is my install location type, global or local? Where am I
installed globally? Where am I installed locally? These are sample questions that we might need to answer. we need
to enumerate the full set and implement the interface on each of our package managers. We need to flesh out the
broker model for this. What we'd like to do is pass a purl to the broker who routes it to the correct package
manager which actually answers the questions we ask.

So the two rulings above are not answered by the resource model alone: they are answered per manager, behind one
interface, because the answers are the ecosystems' and differ by ecosystem. The provider should not learn any
manager's vocabulary; it should ask.

The broker exists in embryo. compositeManager (pkg/platform/composite.go) already takes a PURL, routes by
Purl.Type through byType / nameToType, and fans a batch out to the leaf that owns each type. What it routes
today are verbs, not questions:

Today, on PackageManager Kind
Install, Remove, Upgrade, Update do something
Installed, Available, Present, Version, Search ask something, narrowly

Missing is the question surface these two axes need. The user's samples, as a starting enumeration rather than the
set:

  • Identity. Are these two purls the same package? (Is the version part of identity here? Are qualifiers? Is
    [email protected] a different package from [email protected], as in brew's versioned formulae, or the same package at another
    version, as in apt?)
  • Location kind. Is an install of this package global or local to a place?
  • Location. Where is it installed globally? Where is it installed locally, given a place?

Enumerating the full set is part of this issue's work, and is what turns two rulings into an interface. Each
question is only worth adding if some caller needs it: pre-flight, reconciliation, drift reporting, or the merge in
#814. The enumeration should name the caller beside each question.

Then: implement it on every leaf (apt, brew, port, winget, and whatever the Linux specs register), and let the
broker route. The leaf interface already carries name() and purlType(), so the routing half is in place.

Acceptance

Related

Plan and design documents

Kind Document
Plan no branch has opened; the plan arrives with it
Design docs/architecture/4.1-resource-identity.md
Design docs/architecture/4-resource-management.md
Design docs/architecture/3.4-platform-package-managers.md

Activity

  1. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Prior art for breaking a version tie, and the choice it poses (2026-09-09)

    Raised on #814's delta 1: two manifests claim one package at different versions. The uncommitted implementation refuses, the way Puppet, Terraform, and the pip and apt resolvers do. Whether that is right is this issue's question, so the discussion moves here.

    Precedent

    Two declarations of one package that disagree on version, from the tools whose manifests are closest to a packages manifest:

    Tool Model Unpinned + pinned Two different pins
    Puppet declarative compile error: duplicate declaration of Package[jq] same error
    Terraform declarative error: duplicate resource address same error
    pip (≥ 20.3) resolver the pin satisfies both; the resolver picks it error: conflicting versions
    apt resolver resolver constraint unified; the pin satisfies error: unmet dependencies
    Cargo resolver the pin satisfies within its semver range error for an exact-pin conflict
    Go modules MVS the pin satisfies (the higher required version is chosen) the highest pin wins, no error
    Gradle resolver highest version in the graph wins highest wins; strictly constraints can fail
    Maven resolver nearest to the root wins nearest wins, declaration order breaks ties
    Ansible imperative tasks run in order; the last task's state stands last task wins
    Chef imperative both resources run in order; the last converged state stands last wins
    apt CLI imperative the last version named on the command line is used last wins
    Brewfile declarative no pin syntax; jq and [email protected] are two formulae both install
    nix, npm multi-version both coexist both coexist

    The split is by model, not by taste: declarative and resolver tools refuse a conflict; imperative tools let order decide; multi-version stores have no conflict to break.

    The Go model, since it is the odd one out

    Minimal Version Selection (Russ Cox, 2018). Every module states the minimum version of each dependency it needs; Go collects every requirement reachable in the build and, for each dependency, picks the highest of the stated minimums. No ranges, no preference for the newest release, no search.

    • Deterministic without a lock file: the answer is a pure function of the requirement set. go.sum checks integrity, not selection.
    • Never fails on a version disagreement: a stated minimum is satisfied by anything at or above it, so two different pins are not a conflict; the higher wins.
    • The trade: it works only because semantic import versioning promises compatibility within a major version, and an incompatible change is a new major version and so a different import path, a different dependency altogether.

    Gradle looks similar and is not. Same tie-break, highest wins, but Gradle resolves against the repository: a dynamic version like 1.+ means the highest candidate is whatever the repository holds today, so the same build file can resolve differently next month, which is why Gradle offers dependency locking as an opt-in. MVS resolves against the requirements alone. And Gradle's rich constraints (strictly) can fail, where MVS has no way to say "exactly this and nothing higher" and so no failure mode at all.

    MVS is only applicable if a manifest's [email protected] means "at least 1.7". If it means "exactly 1.7", MVS does not apply. Nothing in schema/packages-manifest.json says which.

    The choice (USER, 2026-09-09)

    right now: we error on version mismatch the way that Puppet, Terraform, and--maybe--pip and apt do. The choice that I see: do we do the same thing with every package manager that we support or do we recognize their differences and respect each package manager's rules?

    Thoughts

    The two options are not quite opposites, and separating what is policy from what is fact makes them one design.

    Uniform. One rule for every manager, decided by the resource model: the URI is versionless, so two versions are one entry, so two different pins are a conflict, and a conflict is refused (or last-wins; that is #814's delta 1, not this issue). This is what exists today. It is simple, predictable, and correct for every manager writ targets now: apt, winget, brew. It is wrong the moment nix or npm arrive, but so is the versionless identity itself, which is axis 1 above. Uniform means the deploy layer decides the tie with no knowledge of the ecosystem.

    Per manager. The broker model this issue already describes: the merge does not decide; it asks. Are these two claims the same package? Can both be satisfied? For apt and winget the broker answers "one package, one version, not both"; for nix it answers "both, and both can be installed"; for brew it answers "jq and [email protected] are two packages". This is right because the semantics genuinely are the ecosystems', not ours. Its cost is that it cannot be built until the broker's question surface exists, which is this issue's own work.

    The split that reconciles them: uniform policy, per-manager facts.

    • Policy is ours and uniform: a claim asks for a package; two claims that can both be satisfied are one installation; two claims that cannot both be satisfied are an error naming both manifests, because silently dropping a claim is the one outcome no manifest author would choose. Puppet and Terraform refuse by policy; this is that policy.
    • Facts are the manager's, answered through the broker: can two versions of this package coexist here? does 1.7 satisfy a claim of 1.6? are these two names one package? pip and apt refuse by resolver fact; this is where their knowledge lives, and it is per manager by nature.

    Under that split, apt and winget behave like Puppet (a version conflict is an error), nix behaves like nix (no conflict, two installs), and brew behaves like Brewfile (two names, two packages), and the deploy layer's merge code is the same in every case: it asks the broker whether the two claims can both be satisfied and errors only when told no.

    Two things this settles regardless of the choice.

    1. The manifest schema must say whether @version means exactly or at least. Until it does, no tie-break rule is well-defined, MVS included. That is uniform, it is a schema question, and it should be ruled once.
    2. The interim, before the broker exists, is whatever packages-manifest.yaml files collide like deployed files: the most specific one shadows the rest, so a layer's general packages are never planned #814 decides for delta 1. That decision is about today's three managers, all of which are one-version-per-name, so any of the three options is defensible there; this issue is about the target state.

    My recommendation: uniform policy, per-manager facts, through the broker — and rule the @version semantics in the schema first, because everything else depends on it.

  2. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    The algorithm (RULED, USER, 2026-09-09)

    we need to be crystal clear on the algorithm here. it is a critical piece of design AND user documentation. A key to the implementation is being able to ask the relevant package manager, can two versions of this package coexist here? If so, we install. If not, we have a version conflict. We error only when told no by the relevant package manager.

    Stated so that it can be implemented, tested, and read by a manifest author, in that order.

    The rule

    Manifests combine. When the union holds two claims on one package, the merge asks the relevant package manager one question through the broker:

    Can two versions of this package coexist here?

    • Yes → both claims are installed. There is no conflict; there is nothing to break.
    • No → the two claims are a version conflict, and the deploy errors, naming both manifests and both versions.

    The merge never breaks a tie by order, layer, specificity, or a highest-wins rule. It errors only when told no by the relevant package manager, and it installs in every other case.

    The algorithm, step by step

    For each package name that appears in more than one manifest, in contribution order:

    1. Same package? Ask the broker whether the two claims name one package. (jq and brew:jq are one; on brew, jq and [email protected] are two formulae and therefore two packages; on apt they are one package at two versions.) If they are two packages, there is nothing to merge: both are installed as written.
    2. Same version? If one package and the claims agree on version, or one of them asks for any version, they are one installation. Features union. Nothing to ask.
    3. Different versions. Ask the broker: can two versions of this package coexist here?
      • Yes: install both. Two installations of one package, as the ecosystem intends (nix, npm, a versioned brew formula).
      • No: version conflict. Error, naming both manifests and both versions. Nothing is installed from this run; the author resolves the claims.

    Step 2's "asks for any version" means an unpinned claim. Whether @1.7 means exactly 1.7 or at least 1.7 is the schema ruling still owed by this issue; step 3's "different" is read against that ruling once it exists.

    What this decides, and what it retires

    What the broker must answer, minimum

    From this algorithm alone, two questions per manager, both pure:

    Question Signature (sketch) Needed by
    Are these one package? SamePackage(a, b PURL) bool step 1
    Can two versions coexist? VersionsCoexist(p PURL) bool step 3

    The user's fuller enumeration on this issue (location kind, global location, local location) stands; these two are the ones the merge cannot do without.

    Documentation

    This section is the source for both:

    • Design: the pkg design document (The pkg provider has no design document: 3.5.x has an entry for every provider but this one #868) and 4.1-resource-identity.md, stating the algorithm and that the answers are the manager's.
    • User: docs/guides/writ/packages-manifest.md under Layer merging, in the author's terms: a package you claim in two manifests is installed once; if you claim two versions, it is installed twice where the package manager allows that, and refused where it does not — the error names both manifests.
  3. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: what satisfies a claim, and what the router asks (USER, 2026-09-09)

    Reached on #814's delta 2 (identity for deduplication) and extended to the whole question of routing, preference, and an install already present. "This is our ruling." Recorded in the order the reasoning ran, then stated as rules.

    The discussion

    Routing first. The router (the package-manager broker) dispatches each claim to one manager, not many. A bare jq asks what is the manager for jq? — the platform preference answers. A brew:jq asks is brew available on this platform? Once a claim has its manager, that manager answers, for any two packages: do they exist; are they the same or different; can they be installed together, and if not, which to take.

    Equality is a within-manager question. Two claims are compared only after each has routed. Claims on different managers are different packages by construction — each manager owns its namespace. So on a Mac with port preferred, jq routes to port:jq, which is a different package from brew:jq. The user's own Install-Dependencies script shows the namespace is the manager's: it installs gsed and gmake through port and gnu-sed and make through brew — one utility, two names, and only the manager knows which is which.

    Explicit beats implicit. A bare name says "I want jq, route it for me." brew:jq says "I want brew's jq", deliberately. Preference must not silently turn an explicit claim into the preferred manager's package. The rule that respects both: an unqualified claim is satisfied by a qualified one — jq plus brew:jq installs brew's jq once, and the bare claim is met by it. Preference decides only bare claims that nothing qualifies. This is the same shape as a version pin satisfying an unpinned claim.

    Two explicit claims on two managers are two packages, and both install. brew:jq plus port:jq was written twice on purpose. Honor both, and say something: the hazard is not disk but PATH, two managers providing one command name with PATH order choosing.

    Never uninstall from a deploy. Already ruled on #851: deploy is additive with persistence; decommission subtracts by name. Removing the other manager's package would make deploy destructive.

    "Already installed" is a pre-flight question, not a merge question. The merge is pure and routes; pre-flight owns world facts and asks the installed question. The fork was whether preference means (1) what to install when installing — a bare claim is satisfied by any installed provider, so with brew's jq present and port preferred, nothing installs; or (2) which jq you want — install port's regardless. Ruled: reading 1. Preference governs what to install when installing; if the package is already installed, the installation is skipped.

    Must the router ask every manager? Only for a bare claim, which named no manager: the router asks every manager available on the platform, and any yes satisfies it. An explicit claim asks its named manager and nobody else.

    brew:jq claimed, port:jq installed. Brew's jq installs. The claim was explicit; port's jq is a different package and cannot satisfy it. Both end up present, and reconcile reports two providers of one command. The user's Install-Tuckr does the same for an explicit origin: "installed but not from git master. Reinstalling" — a tuckr from elsewhere does not meet the claim. (That script replaces rather than installing beside, because cargo has one binary path and cannot install beside; brew and port can. Under the no-uninstall rule writ installs beside — the coexistence answer being the manager's: cargo says no, brew and port say yes.)

    "Installed" means installed at a version that satisfies the claim. [email protected] claimed with 1.6 present is not met. The user's Install-Dotnet checks the requested channel in --list-sdks, not merely that dotnet exists. Whether the mismatch becomes an upgrade or a conflict is the manager's coexistence answer against the host, the same question this issue already routes to the broker.

    The rules

    1. Route, then compare. Every claim routes to exactly one manager: a bare name by platform preference, a prefixed name by its prefix, refused if that manager is not available. Equality is asked only of claims that routed to the same manager; claims on different managers are different packages.
    2. A qualified claim satisfies an unqualified one. Same package, one explicit and one bare: one installation, the explicit one. Features union.
    3. Two explicit claims on two managers both install, and reconcile reports two providers of one command.
    4. Preference governs what to install when installing. A bare claim already met by any installed provider installs nothing; the router asks every available manager for a bare claim, and only the named manager for an explicit one.
    5. An explicit claim is met only by its own manager. Another manager's package of the same name does not satisfy it; the claimed one installs beside.
    6. Installed means installed at a satisfying version. A pin not met by what is present is not "installed"; what follows is the manager's coexistence answer against the host.
    7. Deploy never uninstalls. Ruled on writ decommission: --all removes everything writ deployed, a named removal re-converges the rest, and an implicit project is refused by name #851; unchanged.

    What the router must answer, minimum — extended

    Question Needed by
    Which manager handles this bare name? (preference) rule 1
    Is this manager available on this platform? rule 1
    Are these two claims one package? rules 1, 2
    Is this package installed here, at a satisfying version? — asked of every available manager for a bare claim, of the named one for an explicit claim rules 4, 5, 6
    Can two versions coexist here? rule 6, and the earlier ruling on version conflicts

    For #814

    Delta 2's interim key for the merge is (routed manager, name minus version) — pure, correct for apt, winget, and brew today, and literally rule 1 with those managers' equality rule. jq and brew:jq compare equal only where the bare name routes to brew. The plan's "resolved release" wording is retired in favor of this.

  4. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: narrate every decision the merge makes, as a note (USER, 2026-09-09)

    Reached on #814's delta 3. In the user's words:

    I say we narrate what it is we do when we do it. All three points are worthy of narration. We record the design. We explain the rules in user documentation. We narrate the decisions we make along the way with notes, not warnings or errors.

    The three duplicates, each narrated

    Kind What the merge did Narrated as
    Same manager, claims agree — two manifests both say jq planned once note
    A bare claim met by an explicit one — jq and brew:jq brew's jq, once; the bare claim met by it note
    Two explicit claims on two managers — brew:jq and port:jq both installed note at deploy; reconcile reports the two providers as a host fact

    The rule

    Every decision the merge makes on an author's behalf is said, as a note, when it is made. Not a warning: nothing is wrong. Not an error: nothing failed. A note, because a reader of one manifest cannot see what another contributed, and the deploy is the only place the union is visible.

    Three things carry the design, and each has its own audience:

    1. The design record (The pkg provider has no design document: 3.5.x has an entry for every provider but this one #868, the pkg design document) states the rules.
    2. User documentation (docs/guides/writ/packages-manifest.md) explains them in an author's terms.
    3. Narration says what was decided, when, in the deploy's output — the running commentary of the rules being applied.

    For #814

    Delta 3 resolves to the plan as chartered, made specific: the merge emits one note per merged claim, naming the manifests involved and what was done. The interim implementation, which emits nothing, is corrected.

  5. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: duplicates are narrated by default (USER, 2026-09-09)

    Reached on #814's delta 4, which the plan had left as an open question and the implementation had resolved by omission. Answered by delta 3's ruling and confirmed: notes, always, when the decision is made. The existing --silent is the way to quiet them; no new switch.

  6. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: the guide states the ruled rules now (USER, 2026-09-09)

    Reached on #814's delta 5. The Layer merging section of docs/guides/writ/packages-manifest.md is rewritten in the #814 worktree to state, in an author's terms, every rule ruled on this issue so far: manifests combine and only files collide; route to one manager first; a prefixed claim satisfies a plain one; two prefixed claims on two managers both install and reconcile reports the pair; features add up; two versions are settled by the manager, both installed where it allows and a named conflict where it does not; already installed means nothing to do, at a satisfying version, with a prefixed claim met only by its own manager; a deploy never uninstalls; and every decision is said as a note. The design record (#868) will be written from the same rulings.

  7. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Delta 6 of #814's fifteen: a second guide changed (pending ruling)

    Plan said: files to modify, one guide — docs/guides/writ/packages-manifest.md.

    Implementation did: docs/guides/writ/platform-awareness.md was also rewritten. Its Precedence rules section said:

    For packages-manifest.yaml files, variants are merged rather than replaced. This lets you define common packages in the base and platform-specific packages in variants.

    That sentence was true, and less complete than the rulings above. It was replaced with a paragraph saying the precedence rules are for files, which land at one target path; that manifests combine across variants and across layers because a manifest lands nowhere; and pointing at the packages-manifest guide for the merge rules.

    Kind: documentation, unlisted file.

    The decision: whether the platform-awareness guide keeps a short pointer to the packages-manifest guide, as now written, or reverts to its original sentence. Either way the rules live in one place, the packages-manifest guide (delta 5); the question is only whether the second guide points there.

  8. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: keep both guides, and reference each from the other (USER, 2026-09-09)

    Reached on #814's delta 6. Both changes stay. packages-manifest.md names the file overlay rule and links to Platform Awareness for it; platform-awareness.md says its precedence rules are for files, that manifests combine, and links to Packages Manifest for the merge rules. The rules live in one place and each guide points at the other's half.

  9. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Clarification on delta 6 (USER, 2026-09-09)

    package-manifest guide is the primary reference material. The other is an awareness guide.

    Applied: platform-awareness.md no longer restates any merge rule. Its paragraph says manifests combine across variants and layers because a manifest lands nowhere, and points at Packages Manifest for how — nothing more. A restated rule there had already gone stale against delta 1's ruling, which is the reason an awareness guide should not carry rules.

  10. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: delta 7 stands (USER, 2026-09-09)

    splitManifests is retired. With manifests no longer in the file list there is nothing left for it to split, and threading them from tree.BuildResult.Manifests through buildScopeGraph as a parameter, grouped by scope beside the files, is what carries contribution order from the builder to the planner intact. The plan's wording — "splitManifests reads Manifests" — is replaced by this.

  11. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: delta 8 stands (USER, 2026-09-09)

    manifestResolveOperation is declared in tree/node.go, beside the pipeline assignment that gives a package manifest its operation, and read by the builder's isManifest. One constant where two literals were. The plan's file list gains node.go.

  12. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: delta 9 stands (USER, 2026-09-09)

    A scope holding manifests but no files gets a graph, and the single-source early return checks manifests as well as files. Forced by delta 7: once manifests leave the file list, a directory holding only a manifest has no files to walk and would otherwise get no graph — and that directory is #814's own case, the personal layer's common.Windows/. Recorded as a consequence of the union, not a choice of its own.

  13. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: delta 10 stands, and the principle behind it (USER, 2026-09-09)

    if we have common code, the code should be factored into a single entry point unless there's a compelling reason to duplicate it. keep the shared entry point.

    planEntries is the one loop; PlanPackages (one manifest, lore's own use) and PlanManifests (the union, writ's use) both call it. The plan's "nothing existing changes shape" is read as the signature, which held.

  14. 1 remaining item

  15. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Ruling: delta 12 — the test matrix (USER, 2026-09-09)

    we need to be selective. we can test by adding common, common.Darwin, common.Linux, common.Unix, and common.Windows packages-manifest.yaml files. We can test by adding base, team, and personal entries to some subset of project/platform combinations. We have numerous possibilities for very specific and well-known package selections. jq is one of many such possibilities.

    "Keep them all." Two matrices, and the functional test row 6 of #814 asked for is Matrix A.

    Matrix A — the merge: plan-time, pure, one fixture tree, one expected union per platform

    The suffix chain differs per OS, so one layered tree populated sparsely yields a different union on Darwin, Linux and Windows. Each cell exercises exactly one rule.

    Layer Directory Claims Rule exercised
    base common jq, git baseline, every platform
    base common.Unix shellcheck Unix-only contribution
    team common jq, ripgrep same package twice → one claim
    team common.Darwin brew:jq prefixed satisfies bare (Darwin)
    team common.Windows pkg:winget/jqlang/jq namespace in a purl (Windows)
    personal common [email protected], with: [feature] pin satisfies; features union
    personal common.Darwin port:jq two prefixed on two managers → both
    personal common.Linux apt:curl Linux-only prefixed

    Expected, in contribution order, with the notes the merge must emit:

    • Darwin: git, [email protected] by brew, shellcheck, ripgrep, port:jq. Notes: jq claimed twice; jq met by brew:jq; pin 1.7 satisfies; brew and port both provide jq.
    • Linux: git, [email protected] by apt, shellcheck, ripgrep, apt:curl. Notes: jq claimed twice; pin satisfies.
    • Windows: git, [email protected] by winget as jqlang/jq, ripgrep. Notes: jq claimed twice; jq met by the purl; pin satisfies.

    Two more trees, each tiny: the error — [email protected] and [email protected], refused naming both manifests (the interim "no"; the manager's answer once the broker lands); and a directory holding a manifest and no files, for delta 9.

    Eight cells and three trees cover twelve rules, against a cross product of three layers, five directories and n packages.

    Matrix B — the states: pre-flight, mocked, one unit test per state

    These need a host, so they run against the package provider's existing mock manager, never a real one: installed, out-of-date, not-installed, not-available, unroutable, installed-by-nobody, held.

    Package selection

    jq carries the whole identity story: it exists on every manager and its winget id carries a namespace. git and ripgrep are inert baseline. shellcheck and curl give the Unix and Linux directories something to contribute. To verify before the names are fixed: a bare name resolves through the lore registry, so each must be a package the registry knows.

    For #814

    Row 6 is Matrix A. Building it needs the deploy to plan with a stub planner — Config.ManifestPlanner is the concrete *lore.Planner today — which is the interface change delta 12 raised; it is taken with the matrix.

  16. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Package mapping (raised at delta 12, filed as NobleFactor/devlore-registry#91)

    The test-matrix discussion asked whether ripgrep is available on every platform, and the answer
    exposed a larger question: package names vary by manager, and every Install-* script answers
    "how do I get foo on bar" by hand. Ruled: institutionalize the mapping.

    Where it lives. The registry already holds the form in three pieces that do not meet: each
    package's signatures: block (project → id per manager), the generated
    packages/cross-reference.yaml (manager → native id → project, which nothing in devlore-cli reads),
    and the synthetic cache's NativeName slot (a learned mapping that resolveNative never fills).
    The feature is filed in the registry, devlore-registry#91,
    as one schema in three tiers: canonical rows in the registry keyed pkg:generic/<name>; learned rows
    in the host's synthetic cache, promotable to a registry pull request; authored rows inline in a
    manifest, flagged by lint as registry candidates. Two directions: project → id per manager, and
    command → project.

    Prior art. Repology (the cross-repository index, with an API), mise and aqua registries, winget
    monikers, Ubuntu command-not-found; Ansible and Chef have no mapping, which is the improvisation
    this retires.

    What it means for the broker. The index is the data behind "are these one package?"
    brew:gnu-sed and port:gsed are one project only because a mapping says so. Lookup is against the
    local registry clone, so plan time stays pure. The consumer side is a section of the pkg design
    document (#868); the devlore-cli tasks follow that document and are not filed yet.

  17. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Delta 13 of 15: a ticked box for a note the code never emits

    Ruled 2026-09-09. Duplicates are noteworthy: a duplicate claim is actionable but ignorable. Whether the
    claim is redundant depends on which layers this machine composes (the personal jq adds nothing beside the
    team layer and is load-bearing without it), so the note reports the fact and does not recommend.

    The ruled sentence, now in the plan's acceptance box, Requirement 3, and the design paragraph that had
    floated --verbose: A duplicate claim is narrated as a note naming every manifest that made it. Gone
    with it: "at most", the --verbose hedge, and "never a collision", which asserted nothing because a
    manifest cannot collide by construction.

    The box is unticked. The rework charters the note in mergeManifests (Phase 3) and its failing test
    (Phase 1, test-plan row 3d); the tick returns with them, not before.

    Where a note is displayed is not this plan's question. The four lifecycle operations write nothing to
    standard output today, so the note has nowhere a person sees it; that is #873, the writ lifecycle output
    design, filed under #762.

    The ladder, to be defined once in the design record: a note is a decision the reader can act on but need
    not; a warning is something wrong the run survived; an error stopped the run.

  18. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Delta 14 of 15: the plan's status was complete while nothing had merged

    Ruled 2026-09-09: all four corrections made. The committed plan said chartered; the after-the-fact edit
    that ticked the boxes also set complete, and it had been false since.

    1. status is chartered again. It becomes complete when the PR merges, and only then.
    2. Phases 1, 3 and 4 lost "COMPLETE": 1 and 3 carry the open note items from delta 13, 4's closure has not
      happened. Phase 2, the builder, is done and keeps its marker.
    3. The closure tick in Phase 4 is open. It is earned at merge.
    4. The three lines describing splitManifests now describe the kept code: deploy passes Files and
      Manifests to buildScopeGraph directly, and the filter is gone.

    The Current State table still names splitManifests; it is the measurement against develop before the
    change and stays true as history.

  19. David-Noble-at-work commented on Sep 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    Delta 15 of 15: the root cause, and how the plan records it

    Ruled 2026-09-09.

    1. The plan records findings and rulings, not history. Requirement 2's "Corrected 2026-09-09,
    mid-implementation" paragraph and the matching "What the work found" paragraph are replaced. The plan now
    says what was found (the guides already stated the union rule and contradicted themselves on overrides) and
    what was ruled (the package manager settles versions; the merge resolves by satisfaction as the interim until
    the broker of #868 exists, deltas 1, 2 and 11). The history of the deviation lives on NobleFactor/noblefactor-engprod#317 and nowhere else.

    2. The rule. "A finding is not a license to act" was offered and rejected as a truism. The rule, in the
    ruling's words: "You need to consult with me on findings. I need to know the code. Always. Drift and
    deviations between issues, designs, plans, and code must be resolved real time." Filed as agent-rules rule 10,
    noblefactor-ops#196, under feature ops#156
    where rules 7 through 9 filed. Its pull request follows #814's, so one thing is in flight at a time.

    Still open in the plan, put to the user: Requirement 1's "Why order at all" gives the sort a second
    reason, last-in-wins on a version, which is the precedence rule these rulings retired. The proposed text keeps
    one reason, determinism of the checksum, and deletes point 2 and the "where walk order bites" paragraph.

  20. David-Noble-at-work commented on Sep 10, 2026

    @David-Noble-at-work
    ContributorAuthor

    Item 1 of the #814 rework: the identity key, and what the read found

    The finding is #784's. Registry.Resolve parses nothing: a lore package directory named by the raw
    string, else a synthetic release with the platform's source and the raw string as native name, prefix,
    purl and @version included. jq, brew:jq and pkg:brew/jq come back as three releases. #784 already
    carries this ("Resolve treats a purl name as a literal"); #551 owns the two-vocabulary seam and #553 the
    synthetic wrapper. The plan's sentence "the registry resolve is what makes them comparable" rested on a
    capability the code does not have.

    The one parser and router is the pkg provider's buildCandidate: purl, then prefix:name, then a
    bare name on the platform default, version split off, identity the versionless purl the catalog interns.
    lore's Source is never passed to it.

    The relationship, ruled on #446 today: lore is a tool the pkg provider uses, not a target it routes
    to. The merge stands in front of the service and hands it products; it asks resolve one question, lore
    package or native, and applies the pkg grammar to the native claims. Nothing else of the service is in
    play for #814. Documented by #874 (2.5 gains resolve as the first stage and the boundary sentence).

    Options put to the user for the key, recommendation first:

    1. Key on what the catalog interns, by the pkg provider's grammar: extract the parse from
      buildCandidate into one exported function both call; key = manager type plus name; namespace and
      version are claim content resolved by satisfaction. A name that resolves to a lore package keys as
      that package.
    2. Keep the string key: three spellings stay three claims; Matrix A's Darwin and Windows rows fail.
    3. Teach lore's Resolve the grammar: Resolve treats a purl name as a literal, so a manifest cannot direct a native install #784's and Synthesize a lore package from a native PURL #553's work, out of packages-manifest.yaml files collide like deployed files: the most specific one shadows the rest, so a layer's general packages are never planned #814's scope.

    The ruling still needed for option 1: the namespace rule. A bare claim is met by a namespaced one on
    the same manager (Matrix A, Windows: jq met by pkg:winget/jqlang/jq); two namespaces on one manager
    are two products, both install, with a note.

  21. David-Noble-at-work commented on Sep 10, 2026

    @David-Noble-at-work
    ContributorAuthor

    Rulings of 2026-09-09 that reshape #814, captured

    1. writ owns the loop. lore.Planner.PlanManifests is replaced in writ by an if block over a scope's merged
      claims: a claim that resolves to a registry package is noted (dormant until the devlore provider, The devlore provider: deploy, upgrade, reconcile and decommission on a devlore package #877); a
      native claim plans pkg.install, one invocation per product. lore leaves writ's path; lore deploy keeps
      PlanPackages until The devlore provider: deploy, upgrade, reconcile and decommission on a devlore package #877 replaces both.
    2. Identity is what the catalog interns, by the pkg provider's grammar, exported once from buildCandidate:
      manager type plus name. Namespace and version are claim content resolved by satisfaction. The namespace half
      is still an open ruling.
    3. Two subgraphs per scope, by kind, native first by an edge; within each, contribution order. Refined from
      "one subgraph" because pipelines may need manager-installed tools and never the reverse. Until The devlore provider: deploy, upgrade, reconcile and decommission on a devlore package #877 only the
      native subgraph exists.
    4. Open, found while writing 3: a subgraph's children are peers in a topological sort and run independently
      unless an edge orders them, and nothing in the platform layer serializes two invocations of one manager. Chain
      the native subgraph's children, one manager invocation at a time, or leave them independent as lore's
      per-package roots are today?

    The plan carries all four, with 2's namespace half and 4 marked as rulings needed.

  22. David-Noble-at-work commented on Oct 25, 2026

    @David-Noble-at-work
    ContributorAuthor

    The question (USER, 2026-10-25)

    When two layers' manifests name the same package at different versions, team asking for version 1 and personal for version 2, or two projects in one layer disagreeing, which version is installed: one, the other, or both? Raised while ruling where a tool's version is written (NobleFactor/noblefactor-engprod#403): in packages-manifest.yaml, layered, a downstream layer adding or overriding a dependency, personal over team over base.

    The analysis offered

    The answer follows from axis 1, whether the version is part of the package's identity.

    • One slot, so one version. apt, winget, MacPorts and a Homebrew formula hold one version of a package. Precedence decides: the more specific layer wins, personal over team over base, common.Darwin over common. Between peers with no precedence, two projects in one layer, nothing decides, and the deploy is refused.
    • Version in the identity, so both. [email protected] and [email protected] as Homebrew formulae, two Go toolchains, local installs under a language manager: the two versions are two packages, and the union installs both.
    • Never the loser silently. A more specific layer losing, or a slot overwritten without a word, makes the result unpredictable.

    So the manifest needs to know which kind each package is, and that is the broker's identity question above, answered per manager.

    The code disagrees with this issue's acceptance

    The acceptance above describes #814's rule as "the later, more specific claim wins a version disagreement". The code refuses every version disagreement instead, whatever the layers: TestBuildGraphs_TwoDifferentPinsRefuseTheDeploy in cmd/writ/writ/deploy/manifest_matrix_test.go pins it, as the interim answer until this issue is ruled. The ruling settles which is right, and the acceptance line, the guide and the test follow it.

    Removal

    The manifests have no remove: a downstream layer can add a package or, once this is ruled, override its version, but it cannot drop a package an upstream layer installs. There is a case for removal. The owner has held it back out of concern that a downstream removal breaks upstream processes that depend on the package: team's make dist needs GNU tar, and a personal manifest removing it would break the team's release on that machine. A ruling on removal says whether a layer may remove, and if it may, how a package an upstream process depends on is protected.

    Done when, added

    • The version rule across layers is ruled: precedence for one-slot packages, union where the version is identity, refusal only between peers, or another rule
    • Removal is ruled: whether a downstream layer may remove an upstream package, and how a package an upstream process depends on is protected
  23. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • no-evidence: no Evidence of completion section
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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions