Clarify configuration handoff consistency guidance

This commit is contained in:
2026-11-21 17:51:36 +00:00
parent df8384426d
commit 1408001fce
3 changed files with 8 additions and 5 deletions

View File

@@ -277,8 +277,8 @@ type RuntimeConfig struct {
// or equivalent explicit composition. Missing or nil selected settings contribute
// no resources; Settings and *Settings are accepted, while other nonnil types,
// nil results, and unavailable inspection views fail with ErrInvalidConfig.
// Callers must
// not mutate its selected settings between loading and this handoff. After
// Construction consumes resolved settings while inspection retains the load's
// frozen evidence. Callers should keep those consistent at handoff. After
// construction, later settings mutations do not alter the engine. This method
// does not load sources, rerun callbacks, or select bundled underlays.
func NewFromConfig(result Configuration, cfg RuntimeConfig, opts ...Option) (*Engine, error) {