Skip to content

pkg's resource is sealed, and the five package manifests take the schema's object form - #805

Merged
David-Noble-at-work merged 3 commits into
developfrom
feature/644-seal-pkg
Sep 4, 2026
Merged

David-Noble-at-work merged 3 commits into
developfrom
feature/644-seal-pkg

Conversation

@David-Noble-at-work

@David-Noble-at-work David-Noble-at-work commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Thread 2 (Epic:ResourceModel), phase 6 of 625-sealed-provider-resources.md. Two issues resolved in this worktree, each its own commit.

#644 — seal pkg

pkg.Resource is now the sealed interface (op.Resource + Name(), Type(), Version() + the unexported marker) over an unexported resource struct. Constructors return the interface; init registers the implementation and the mint; every provider method takes the interface. The one write, the resolved manager type after an install, is (*resource).resolveType, reached in-package through resolved().

Sized first (commit 1): the "seven external files" were the action-name constants; no consumer reads a field, so no consumer changed.

  • resource.go: the interface, the struct, sealedResource, the three accessors, the resolution method, the two constructors returning the interface, the init registration pair, the interface guards
  • provider.go, helpers.go, receipt.go, observation.go: the interface in every signature; field reads become accessor calls; the write becomes the resolution method
  • make generate regenerates the gen files; the fragments stay byte-identical (ruling 4) — verified byte-identical against develop, no generator change
  • tests follow; make check green locally
  • no consumer changes — the sizing's prediction, confirmed by the build
  • the suite passes on all five platforms — every test leg green on this PR

#796 — the five checked-in package manifests

Every entry under Home/*/packages-manifest.yaml is - name: <package>, the object form the schema states. TestCheckedInManifests_AreValid in internal/manifest validates every checked-in manifest.

  • the five manifests validate; writ deploy noblefactor builds the team layer's tree — the validator accepts all five; the Windows deploy is re-run after merge, when the machine's clone updates
  • TestCheckedInManifests_AreValid walks Home/*/packages-manifest.yaml and fails on any invalid one

Closes #644
Closes #796

https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW

David Noble added 3 commits September 3, 2026 20:03
The plan filed pkg as "seven external files, the widest surface". Sized: the surface is wide inside the
package and untouched outside it. Two non-generated files import the provider and both use its action-name
constants; every other mention of pkg.Resource is a doc comment. Inside, 20 field reads in code and 26 in
tests, and one write -- the provider replaces Type with the manager's resolved purl type after an install --
which sealing keeps honest with a named resolution method on the unexported struct. No consumer changes.
The three stale "seven files" mentions are corrected.

#644, phase 6 of #625.

Refs #644, #625

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…d a test holds every one to it

writ deploy noblefactor refused the team layer on a fresh Windows machine: every checked-in
packages-manifest.yaml listed packages as bare strings while the schema and validator require objects with a
name field. They were placeholders. Every entry is now `- name: <package>`, sixteen across four files and an
empty list in the fifth, and TestCheckedInManifests_AreValid validates each manifest under Home/ against the
validator writ runs, so the repository that defines the format can no longer ship a file that violates it.

Closes #796

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
…h the one type write named a resolution

Phase 6 of the sealed-resources plan (#644). pkg.Resource becomes the sealed interface -- op.Resource plus
Name(), Type(), Version() and the unexported marker -- over an unexported resource struct. Both constructors
return the interface; an unexported discoverResource returns the struct for the unmarshalers. init registers
the implementation and the mint. Install, Remove, Upgrade take []Resource; Installed, NotInstalled, Observe,
VersionGTE, NewReceipt and NewObservation take Resource. The post-install write of the resolved manager type
is (*resource).resolveType, reached through resolved(), which asserts to the struct.

The generated files are byte-identical to develop: the announcement already named provider.Resource. Tests
reach ReachabilityURI and Equal through concrete(t, r), as service's do. The plan's phase 6 is complete and
#645 is next.

Claude-Session: https://claude.ai/code/session_01SqQVFZz7AdiLZkGoAcUqRW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant