You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Seal the service provider's resource — prove the pattern #626
Prove the pattern on the provider with the smallest external footprint — service, which zero files outside its own package name — and make the result the template every later provider follows. Surprises surface here, where they are cheap.
Land the full shape:
service.Resource becomes a sealed interface (unexported marker method, so implementations cannot be added from outside the package).
The struct becomes the unexported service.resource, implementing it.
The exported constructor keeps its signature and returns the unexported type — legal Go, and what the generator's detection rule (func(*op.RuntimeEnvironment, any) (*T, error)) already accommodates.
Verify the enabling fact for this provider specifically: its gen/*.gen.go declares the provider's own package, so the announcement can name the unexported type. Confirmed for the sample on 2026-08-23; confirm per provider rather than assuming.
Acceptance — serialization must not move. A graph planned before and after produces the same resources section for the same intent: the URI fragment names the concrete struct either way, and only its visibility changed. Round-trip pins stay byte-identical, and a saved document still reloads (the type id resolves through the registry to the exported constructor).
Superseded by #641. Re-filed after phase-1 investigation changed the feature's shape — see the rewritten plan.
Three things moved:
This issue's enabling fact was false.pkg/op/provider/<p>/gen is a distinct package from the provider (same package name, different import path), so a gen file can never name an unexported type. Ruling 4 (2026-08-24) gives the URI fragment to the interface instead of the struct, which makes the gen files correct as-is.
The work splits in two parts, so the goal is actually reached: part 1 seals the eight single-resource providers, part 2 converts file's four variants. The original left file a permanent exception in a new direction.
Phases regroup by risk rather than footprint — the four Unpacker implementers share one silent failure mode and are proved together.
Activity
David-Noble-at-work commentedon Aug 24, 2026
Superseded by #641. Re-filed after phase-1 investigation changed the feature's shape — see the rewritten plan.
Three things moved:
pkg/op/provider/<p>/genis a distinct package from the provider (same package name, different import path), so a gen file can never name an unexported type. Ruling 4 (2026-08-24) gives the URI fragment to the interface instead of the struct, which makes the gen files correct as-is.file's four variants. The original leftfilea permanent exception in a new direction.Unpackerimplementers share one silent failure mode and are proved together.New tasks: #641 #642 #643 #644 #645 #646 #647.