Repository navigation
feat(op): mem and function are sealed; function stops borrowing another provider's identity - #676
Merged
Merged
Conversation
…er provider's identity
David-Noble-at-work
pushed a commit
that referenced
this pull request
Aug 26, 2026
One conflict, in pkg/op/provider/function/provider.go. Both sides were right about different things: develop carried #676's sealing of function.Resource, and this branch had added +devlore:claim=deterministic to Call afterward. The claim is kept; develop had nothing at that position, having been squashed before it existed. Everything else auto-merged, including the two files most likely to break quietly: .github/workflows/ci.yaml #682's arm64 build-and-test matrix alongside this branch's go-version 1.27 and golangci-lint v2.13.1. All three go-version sites read 1.27, including the matrix jobs #682 added. Makefile #682's build-system work alongside this branch's GOLANGCI_LINT_VERSION pin, the golangci-lint-pinned prerequisite, and lint routing through star. Verified rather than assumed: make check exits 0 -- 104 packages, no lint issues -- and every claim still holds against host, darwin, linux, and windows build tags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 5 of #625. Closes #662.
The last cross-package resource embed in the tree is gone.
The embed came out cheaply, because of groundwork already laid
function.Resourceembeddedmem.Resourceacross a package boundary — the only such embed anywhere — andit was never composition.
functionbuilt its own base withreflect.TypeFor[*function.Resource]()andhanded that to the embedded value, so
memwas contributing behaviour overfunction's own identity. Amixin, wearing an is-a relationship.
The ruling anticipated
memexporting a constructor taking a caller-built base. It did not need one: #668had already moved the content-address path formula into
op, sofunctionnow embedsop.ResourceBaselike every other provider and reaches its pack through
op.ContentAddressedPath/op.ContentAddressedReader.functioninherited nine methods and genuinely used two —SourcePathand theHashfield.Packand
Unpacknever delegated; they build their own transport envelope.sourceBytesalready opened its ownmmap. The remaining seven are the per-provider set
service,git,appnet,json, andyamleachwrite for themselves, so supplying them was joining the convention rather than paying a cost.
The first out-of-package consumer
pkg/op/provider/plan/lifecycle_api_test.gocallsConvertToon a transported function, sofunction.ResourcedeclaresCanConvertTo/ConvertTo. That is the first sealed interface to reachpast
op.Resourceplus accessors — every earlier provider's apparent external consumers turned out to bein-package or doc comments. The plan predicted a phase would eventually have to decide differently; this is
it.
function's six exported fields had no external readers, so they went unexported with no interfacemethods at all. The transport envelope keeps its exported fields — that struct is the wire form, and
encoding/jsonmust be able to set them.Running lint before pushing caught four things
make vetandmake testcannot see any of them:ConvertToat cyclomatic complexity 16, over the ceiling of 15 — signature validation lifted intobridgeable, which changes no behaviorrwhere the file usesf)The last two PRs shipped without that check and one of them failed CI on dead code. This is the first phase
where the gate ran before the push rather than after.
Verification
make test103 ok / 0 fail ·make build·make vetdarwin/linux/windows ·test-scenario·complexity·shell-lint·verify-ldflags·star lint go ./pkg/...— 0 issues ·gofmt -lclean.Metadata preserved without hand-editing:
mem3 entries,function4 — #658's generator fix holding onthe last two providers of part 1.
Seven of nine providers sealed.
pkg(#644) andfile's four variants (#645) remain.