feat: schema alignment & metadata-driven validation#35
Open
elocke wants to merge 3 commits intoopenclaw:mainfrom
Open
feat: schema alignment & metadata-driven validation#35elocke wants to merge 3 commits intoopenclaw:mainfrom
elocke wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Add metadata collection to generate-config-options.ts that produces openclaw-config-metadata.json alongside the Nix options file. The metadata includes validPaths, types, dynamicKeys, and knownChannels extracted from the upstream Zod schema. Single-value enum alternatives in oneOf unions are collapsed into flat enum types for easier consumption by the Nix module. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CONFIG_METADATA_GOLDEN to the check derivation and diff the generated metadata against the golden file in the check script. Also update update-pins.sh to commit the metadata file alongside the Nix options when pins are bumped. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add providers.channels attrsOf submodule to instance and top-level options for generic channel configuration (telegram, discord, etc.) - Replace mkTelegramConfig with generic mkChannelConfigs using foldlAttrs - Add generic channel token injection in the gateway wrapper - Add backwards-compat telegramToChannel/mergeChannels aliases so existing providers.telegram.* config maps to providers.channels - Add missing providers.telegram.groups to top-level options - Import schemaMeta from generated metadata JSON and auto-sync enum values for thinkingDefault and queue.mode from upstream schema - Add recursive configOverrides validation (key existence + type checking) against schema metadata with assertion error messages - Add channel config validation against schemaMeta.knownChannels - Remove dead config submodule option and generatedConfigOptions import Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
openclaw-config-metadata.json) alongside the Nix options, capturing valid paths, types, dynamic keys, and known channels from the upstream Zod schemaproviders.channelssystem replacing the telegram-specific helpers, with backwards-compat aliases so existingproviders.telegram.*config continues to workthinkingDefault,queue.mode) from the generated metadata instead of hardcoding themconfigOverridesvalidation (key existence + type checking) and channel config validation against schema metadata, surfaced as standard home-manager assertion errorsupdate-pins.shto include the metadata fileTest plan
nix flake check --no-buildpassesnix build .#checks.x86_64-linux.config-optionspasses (via remote builder)nix evalconfirms metadata lookups return correct enum valuesgeneratedConfigOptionsormkTelegramConfigremainproviders.telegram.*configs still evaluate correctly (backwards compat)configOverrideskeys produce assertion errorsproviders.channelsproduce assertion errors🤖 Generated with Claude Code