Skip to content

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

Closed

Description

@David-Noble-at-work

Found: 2026-09-04 on DANOBLE-WD11-3, the first writ deploy noblefactor --dry-run that reached planning after
Scheduling (USER, 2026-09-04): super high priority — addressed as soon as thread 2 (resource management) completes, ahead of the rest of thread 3.
#805 and the #813 workaround.

Observed

[writ] [△] 1 source collision(s) resolved by layer/specificity:
[writ] [△]   packages-manifest.yaml: using ...\snapshots\team-9c84a90f4e41\Home\noblefactor.Windows\packages-manifest.yaml [team]
                                    over ...\snapshots\team-9c84a90f4e41\Home\noblefactor\packages-manifest.yaml [team]

The plan then held exactly one pkg.install. The team layer's all-platform manifest (Home/noblefactor/, 7
packages: git, go, golangci-lint, shellcheck, …) was dropped in favor of the Windows one (1 package). On the run
before the #813 workaround, the personal layer's Home/common.Windows/packages-manifest.yaml was the winner over
both team manifests — so on that machine the team layer's packages were never going to be installed at all.

Mechanism

  1. cmd/writ/writ/tree/node.go gives packages-manifest.yaml / .json the manifest.resolve pipeline, but the
    file is otherwise an ordinary FileEntry in the walk.
  2. cmd/writ/writ/tree/builder.go keys every entry by its target ID — the path relative to the matched directory —
    and resolves two entries with one ID by layer order, then specificity, keeping one and recording a
    Collision. Every layer's and every suffix directory's manifest sits at the same relative path, so they all
    share one ID and all but one are discarded.
  3. cmd/writ/writ/deploy/plan.go splitManifests collects the survivors and planManifests plans each.

The collision rule is right for files that land in the filesystem: one target path, one source. A manifest lands
nowhere. It is a set of package claims, and two claims cannot occupy the same place.

Ruling (USER, 2026-09-04)

Manifests are combined and deduplicated across layers and specificity, never collided. Base, team, and personal
all contribute; general and platform-specific manifests in one layer both contribute. No manifest overrides another,
and the contribution order (base → team → personal, general → specific) is preserved in the union. They contribute
nothing to the filesystem, so the file collision rule does not apply to them.

Nothing in docs/ states either rule today; the design record gains this one.

Acceptance

  • the tree builder excludes manifest.resolve entries from collision resolution and carries every manifest to
    the planner, in contribution order
  • package claims are deduplicated by identity across the union (same purl → one pkg.install claim); a
    duplicate is narrated at most as a note, never as a collision
  • a unit test in tree builds a layer with noblefactor/ and noblefactor.Windows/ manifests and asserts both
    survive; a second with two layers asserts both survive
  • a functional (devlore-test) deploy with manifests at two specificities plans every package once
  • writ deploy noblefactor --dry-run on DANOBLE-WD11-3 plans the team layer's 8 Windows-applicable packages,
    not 1
  • the writ design record states the union rule and the file collision rule beside each other

Related

Restated by the user, 2026-09-06 (on #463): the deploy ensures every package in every packages-manifest.yaml under each project's Home is installed — across the three layers and across the suffix chain (common, common.Unix, common.Darwin on Darwin). Overlay is for files; manifests combine.

Plan and design documents

Kind Document
Plan docs/plans/fix/814-manifests-combine.md

Activity

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

    @David-Noble-at-work
    ContributorAuthor

    Closed by #879, merged 2026-09-10T15:33:31Z; 35 h from first commit to merge.

    Ticked above: the builder bypass, dedup by identity, the tree unit tests, and the functional deploy (Matrix A
    through BuildGraphs, proven on Darwin, Linux and Windows by CI). Left open on purpose:

    What this bug's review changed beyond its charter is recorded on #872 (fifteen deltas), #446 (lore is a tool the
    pkg provider uses, not a target), #877 (the devlore provider; registry packages in a manifest are noted, not
    planned, until it lands), #873 (lifecycle output design) and #874 (2.5 names resolve as the first stage). Two
    rulings remain open in the plan: the namespace half of satisfaction, implemented as proposed, and whether the
    native subgraph's children are chained one manager invocation at a time.

  2. added a commit that references this issue on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions