Skip to content

configutil: add Derive and a Validator hook on the observer - #1795

Open
paulwe wants to merge 2 commits into
mainfrom
paul/trust-s2sa-consolidation
Open

configutil: add Derive and a Validator hook on the observer#1795
paulwe wants to merge 2 commits into
mainfrom
paul/trust-s2sa-consolidation

Conversation

@paulwe

@paulwe paulwe commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Derive narrows an Observable onto a subtree of itself, so a package can
define the config it owns and have an app embed it without that package
importing the app's config type. project selects and must return a pointer
into its argument: Load results are compared by identity.

Validator lets a Builder reject a config before it is stored, so a reload
is all-or-nothing and a bad edit leaves the running config in force.
InitDefaults' error is now checked on the same path, where it was
discarded.

Derive narrows an Observable onto a subtree of itself, so a package can
define the config it owns and have an app embed it without that package
importing the app's config type. project selects and must return a pointer
into its argument: Load results are compared by identity.

Validator lets a Builder reject a config before it is stored, so a reload
is all-or-nothing and a bad edit leaves the running config in force.
InitDefaults' error is now checked on the same path, where it was
discarded.
@changeset-bot

changeset-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7958464

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
github.com/livekit/protocol Patch
@livekit/protocol Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Builds an Observer over an already-built config with no file to watch, for
stubbing observable config in tests and for dev paths that must return the
same *Observer the production path does.

EmitConfigUpdate now stores the config it emits, so Load reflects an update
pushed by hand rather than going stale.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants