Clarify configuration handoff consistency guidance
This commit is contained in:
@@ -129,8 +129,8 @@ nil result, or unavailable inspection view returns `ErrInvalidConfig`. It
|
|||||||
does not load sources, rerun callbacks, or add a bundle. Select
|
does not load sources, rerun callbacks, or add a bundle. Select
|
||||||
`BundledOpenRouterUnderlay()` before the application load if desired;
|
`BundledOpenRouterUnderlay()` before the application load if desired;
|
||||||
`WithBundledOpenRouter` affects only `NewEngine`. `RuntimeConfig` supplies only
|
`WithBundledOpenRouter` affects only `NewEngine`. `RuntimeConfig` supplies only
|
||||||
client timeout, HTTP client, and transient-retry settings. Do not mutate the
|
client timeout, HTTP client, and transient-retry settings. Keep resolved settings
|
||||||
resolved settings before handoff; subsequent mutation does not change captured
|
consistent with the load's frozen inspection evidence at handoff; subsequent mutation does not change captured
|
||||||
resources. Applications may register equivalent callbacks explicitly instead
|
resources. Applications may register equivalent callbacks explicitly instead
|
||||||
of using `Configure`. Construction errors retain their underlying causes;
|
of using `Configure`. Construction errors retain their underlying causes;
|
||||||
on the standalone path, a ConfigKit `LoadError` remains available through
|
on the standalone path, a ConfigKit `LoadError` remains available through
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ reviewed changes begin after `248d0db`.
|
|||||||
|
|
||||||
### 1. Narrow The Pre-Handoff Mutation Wording To The Accepted Expectation
|
### 1. Narrow The Pre-Handoff Mutation Wording To The Accepted Expectation
|
||||||
|
|
||||||
Status: open. Priority: P3. Implementation stage: 16.
|
Status: complete. Priority: P3. Implementation stage: 16.
|
||||||
|
|
||||||
|
Completion: narrowed constructor GoDoc and consumer guidance to the consistency
|
||||||
|
expectation; reviewed against the roadmap. No runtime behavior changed.
|
||||||
|
|
||||||
Locations: `engine.go:280` and `docs/consumers/pkg-promptkit.md:132`.
|
Locations: `engine.go:280` and `docs/consumers/pkg-promptkit.md:132`.
|
||||||
|
|
||||||
|
|||||||
@@ -277,8 +277,8 @@ type RuntimeConfig struct {
|
|||||||
// or equivalent explicit composition. Missing or nil selected settings contribute
|
// or equivalent explicit composition. Missing or nil selected settings contribute
|
||||||
// no resources; Settings and *Settings are accepted, while other nonnil types,
|
// no resources; Settings and *Settings are accepted, while other nonnil types,
|
||||||
// nil results, and unavailable inspection views fail with ErrInvalidConfig.
|
// nil results, and unavailable inspection views fail with ErrInvalidConfig.
|
||||||
// Callers must
|
// Construction consumes resolved settings while inspection retains the load's
|
||||||
// not mutate its selected settings between loading and this handoff. After
|
// frozen evidence. Callers should keep those consistent at handoff. After
|
||||||
// construction, later settings mutations do not alter the engine. This method
|
// construction, later settings mutations do not alter the engine. This method
|
||||||
// does not load sources, rerun callbacks, or select bundled underlays.
|
// does not load sources, rerun callbacks, or select bundled underlays.
|
||||||
func NewFromConfig(result Configuration, cfg RuntimeConfig, opts ...Option) (*Engine, error) {
|
func NewFromConfig(result Configuration, cfg RuntimeConfig, opts ...Option) (*Engine, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user