[PR #35] feat: schema alignment & metadata-driven validation #56

Open
opened 2026-02-15 17:04:44 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/nix-openclaw/pull/35
Author: @elocke
Created: 1/30/2026
Status: 🔄 Open

Base: mainHead: feat/schema-alignment


📝 Commits (3)

  • fc20de2 feat: extend generator to emit schema metadata JSON
  • e314cce feat: add metadata JSON to CI golden-file check
  • 231ff17 feat: generic channel system, metadata-driven validation, cleanup

📊 Changes

6 files changed (+10725 additions, -30 deletions)

View changed files

📝 nix/checks/openclaw-config-options.nix (+1 -0)
nix/generated/openclaw-config-metadata.json (+10376 -0)
📝 nix/modules/home-manager/openclaw.nix (+201 -29)
📝 nix/scripts/config-options-check.sh (+14 -0)
📝 nix/scripts/generate-config-options.ts (+132 -0)
📝 scripts/update-pins.sh (+1 -1)

📄 Description

Summary

  • Extend the config generator to emit a JSON metadata file (openclaw-config-metadata.json) alongside the Nix options, capturing valid paths, types, dynamic keys, and known channels from the upstream Zod schema
  • Add a generic providers.channels system replacing the telegram-specific helpers, with backwards-compat aliases so existing providers.telegram.* config continues to work
  • Auto-sync enum values (thinkingDefault, queue.mode) from the generated metadata instead of hardcoding them
  • Add recursive configOverrides validation (key existence + type checking) and channel config validation against schema metadata, surfaced as standard home-manager assertion errors
  • Update CI golden-file check and update-pins.sh to include the metadata file

Test plan

  • nix flake check --no-build passes
  • nix build .#checks.x86_64-linux.config-options passes (via remote builder)
  • nix eval confirms metadata lookups return correct enum values
  • No references to removed generatedConfigOptions or mkTelegramConfig remain
  • Verify existing providers.telegram.* configs still evaluate correctly (backwards compat)
  • Verify invalid configOverrides keys produce assertion errors
  • Verify unknown channel names in providers.channels produce assertion errors

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/nix-openclaw/pull/35 **Author:** [@elocke](https://github.com/elocke) **Created:** 1/30/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/schema-alignment` --- ### 📝 Commits (3) - [`fc20de2`](https://github.com/openclaw/nix-openclaw/commit/fc20de2adb1fed65f5ca304bc02752a90805cab2) feat: extend generator to emit schema metadata JSON - [`e314cce`](https://github.com/openclaw/nix-openclaw/commit/e314cce9f34f2244f0c3b322bcbcb6db93c8d6ba) feat: add metadata JSON to CI golden-file check - [`231ff17`](https://github.com/openclaw/nix-openclaw/commit/231ff171c60c3c58ab04ea8424bb472bfec58190) feat: generic channel system, metadata-driven validation, cleanup ### 📊 Changes **6 files changed** (+10725 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `nix/checks/openclaw-config-options.nix` (+1 -0) ➕ `nix/generated/openclaw-config-metadata.json` (+10376 -0) 📝 `nix/modules/home-manager/openclaw.nix` (+201 -29) 📝 `nix/scripts/config-options-check.sh` (+14 -0) 📝 `nix/scripts/generate-config-options.ts` (+132 -0) 📝 `scripts/update-pins.sh` (+1 -1) </details> ### 📄 Description ## Summary - Extend the config generator to emit a JSON metadata file (`openclaw-config-metadata.json`) alongside the Nix options, capturing valid paths, types, dynamic keys, and known channels from the upstream Zod schema - Add a generic `providers.channels` system replacing the telegram-specific helpers, with backwards-compat aliases so existing `providers.telegram.*` config continues to work - Auto-sync enum values (`thinkingDefault`, `queue.mode`) from the generated metadata instead of hardcoding them - Add recursive `configOverrides` validation (key existence + type checking) and channel config validation against schema metadata, surfaced as standard home-manager assertion errors - Update CI golden-file check and `update-pins.sh` to include the metadata file ## Test plan - [x] `nix flake check --no-build` passes - [x] `nix build .#checks.x86_64-linux.config-options` passes (via remote builder) - [x] `nix eval` confirms metadata lookups return correct enum values - [x] No references to removed `generatedConfigOptions` or `mkTelegramConfig` remain - [ ] Verify existing `providers.telegram.*` configs still evaluate correctly (backwards compat) - [ ] Verify invalid `configOverrides` keys produce assertion errors - [ ] Verify unknown channel names in `providers.channels` produce assertion errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:04:44 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#56