schema: add config.schema.json for the console config (P0-3) - #10
Merged
Conversation
Models the console's own configuration, grounded in ConsoleConfig::from_global (gateway/src/config.rs) rather than the docs. The canonical EdgeCommons schema leaves component.global open, so this is what validates the console config in the component's tests, in `edgecommons component validate`, and in the deployment compatibility guard. Every key is optional — the gateway falls back to a built-in default — so what the schema catches is a misspelled, misplaced, or wrong-typed key the gateway would otherwise silently ignore. Verified against both test-configs/ and a battery of negative cases (typos, wrong levels, out-of-range, bad app ids, unknown capabilities). Declares no #/$defs/instance: the console runs one per node and reads no component.instances[]. Closes AGENTS.md P0-3. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsX7cWVGLszurNYMVwMJGo
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.
Adds the
config.schema.jsonthat AGENTS.md tracked as outstanding P0-3, modellingcomponent.global.console.*.Why
The canonical EdgeCommons config schema leaves
component.globalopen (additionalProperties: true, zero declared properties), so a component's own configuration is validated by nothing unless it ships its own schema. Until now edge-console shipped none, which left it outside the deployment compatibility guard (DESIGN-cli §8.5.5) entirely.What
The schema is grounded in
ConsoleConfig::from_global(gateway/src/config.rs), not the docs — every block (ws,staleness,cache,events,metrics,logs,runtime,rbac,commands,clock,apps) and every camelCase key matches what the parser actually reads. Every key is optional, since the gateway falls back to a built-in default; what the schema catches is the misspelled/misplaced/wrong-typed key the gateway would otherwise silently ignore.Verified against both
test-configs/config.jsonandtest-configs/dallas-site.json(pass), and against ten negative cases — block-name typo, key typo, misplaced key, wrong type, out-of-range port, zero cap, bad app id, missing requiredwebRoot, unknown capability, stray top-level key (all caught).It declares no
#/$defs/instance: the console runs one per node and reads nocomponent.instances[].🤖 Generated with Claude Code
https://claude.ai/code/session_01LsX7cWVGLszurNYMVwMJGo