Skip to content

Every packages-manifest in the tree uses a form the loader cannot parse #785

Open

Description

@David-Noble-at-work

The disagreement

internal/manifest/manifest.go models an entry as a struct:

type PackageEntry struct {
	Name string   `json:"name" yaml:"name"`
	With []string `json:"with,omitempty" yaml:"with,omitempty"`
}

There is no custom UnmarshalYAML, so a YAML scalar cannot become a PackageEntry.
schema/packages-manifest.json agrees with the struct: items are objects, required: ["name"],
additionalProperties: false.

Every manifest in the repository disagrees with both:

# Home/noblefactor/packages-manifest.yaml
packages:
  - git
  - go
  - gh

Same in Home/noblefactor.Unix, Home/noblefactor.Darwin, Home/noblefactor.Linux, and
Home/noblefactor.Windows. All five are bare strings. None of them can load.

cmd/lore/lore/builder_test.go:91 uses "packages": []string{"git", "vim"}, which is the same
shape, so the tests encode the unloadable form too.

And the guide teaches a third form

docs/guides/writ/packages-manifest.md shows bare strings and a single-key map:

packages:
  - neovim:
      with: [lsp, treesitter]

That is neither the struct nor the schema. Three shapes are in circulation and only one of them —
the one no manifest uses — can be parsed.

Why it went unnoticed

Nothing loads these files in anger yet. They are declarations for a writ deploy path that is not
exercised, so the mismatch produces no failure until someone deploys a layer for real.

The ruling this needs

Whether the loader should accept the bare-string form, or the corpus should be rewritten to the
struct's shape. The bare string is what every author reached for unprompted, five files out of five,
and what the guide teaches first — which is evidence about the ergonomics, not just the count. A
UnmarshalYAML accepting either a scalar or a mapping would make the corpus correct and keep with
available, at the cost of two representations for one thing.

Whichever way it goes, the guide, the schema, the corpus, and builder_test.go should end up saying
the same thing, and it would be worth having a test that loads every manifest in the tree so this
cannot drift again.

Plan and design documents

Kind Document
Plan 785-manifest-entries-match-the-loader.md § Issue 785
Design Packages Manifest — the manifest's contract, corrected on the branch
Design packages-manifest.json — the entry shape, which was already right
Design manifest.go — PackageEntry and Load, the authority the corpus drifted from

Activity

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

    @David-Noble-at-work
    ContributorAuthor

    Correction to the report: the claim that cmd/lore/lore/builder_test.go:91 "encodes the unloadable
    form too" is wrong. That line is an annotation map for an Origin JSON round-trip test, not a manifest
    fixture — "packages": []string{"git", "vim"} is annotation data. No test encoded the bad form.

    The opposite is true and I should have led with it: internal/manifest/manifest_test.go already used
    the mapping form throughout, including with. Struct, schema, and the manifest package's own tests
    all agreed. Only the five files under Home/ and the guide did not.

    Fixed on fix/785-manifest-entries-match-the-loader:

    • All five manifests converted to - name: <package>. Comments preserved; noblefactor.Linux was
      already packages: [] and valid.
    • The guide's YAML and JSON examples replaced. It taught two forms, neither parseable.
    • TestCorpusLoads walks the tree and loads every manifest it finds, so a new layer's manifest is
      covered when it is added rather than when someone deploys.

    The guard was verified by reverting one file to the old form, which fails it with
    yaml: unmarshal errors. It also skips schema/, since packages-manifest.json there is the JSON
    Schema and would pass vacuously — an absent packages key yields an empty list.

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

    @David-Noble-at-work
    ContributorAuthor

    Node moves to LTS through this manifest, not by hand

    Ruled 2026-09-28. Recording it here because this issue is what stands between the decision and being
    able to write it down.

    The decision. All three machines move to their platform's LTS channel, declared in
    packages-manifest.yaml, rather than installed and upgraded by hand on each box.

    The date is 2026-10-28, when Node 26 enters LTS (nodejs/Release). Doing it before then is strictly
    worse: OpenJS.NodeJS.LTS installs 24.19.0 and Homebrew's node@24 installs 24.21.0, so switching
    today downgrades two working machines that would be upgraded again a month later. On 2026-10-28 the
    LTS channel becomes 26 and the switch costs no version change at all. Node 24 "Krypton" drops to
    Maintenance eight days earlier, on 2026-10-20.

    What each platform needs, measured 2026-09-28:

    Platform Today LTS route Note
    Windows winget OpenJS.NodeJS 26.7.0 OpenJS.NodeJS.LTS a different package, so uninstall and reinstall, not an upgrade
    Darwin Homebrew node 26.9.0 (stable 26.10.0) node@24 keg-only: not on PATH without an explicit link
    Linux NodeSource setup_26.x, 26.10.0 NodeSource setup_lts.x a generic LTS endpoint; once pointed there it follows LTS forever and never needs touching again

    Why a declaration rather than three commands. The three feeds do not agree and cannot be made to:
    winget's newest is 26.7.0, Homebrew's is 26.10.0, NodeSource's is 26.10.0. Running every update command
    on every machine today still leaves three versions. Node is package-managed everywhere -- nothing is
    hand-downloaded, and npm cannot update Node at all -- so the only thing a manifest buys is the one thing
    missing: a record of what these machines are supposed to have, and a writ reconcile that can say
    whether they do.

    Why this waits on #785

    Home/common.Windows/packages-manifest.yaml in David-Noble-at-work/personal says it in its own comment:

    Written as a mapping because that is what the loader parses. Every manifest in devlore-cli uses a bare
    string, and none of them can load; see #785.

    A Node declaration added to a manifest that cannot load is a declaration that does nothing and reports
    nothing, which is worse than the hand-installed state it replaces -- it would read as converged while
    converging nothing.

    There is also no packages-manifest.yaml for Darwin or Linux at all; only common.Windows has one. So
    two of the three platforms need a manifest before they can have a declaration.

    Also worth saying plainly: this issue's branch, fix/785-manifest-entries-match-the-loader, has a
    worktree that has been parked for four weeks -- clean, no uncommitted work, 41 commits behind develop.
    agent-rules rule 8
    says a blocked branch is nuked rather than parked. Not mine to close; flagging it because this
    declaration is one of the things waiting behind it.

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