Skip to content

schema: add config.schema.json for the console config (P0-3) - #10

Merged
mbreissi merged 1 commit into
mainfrom
feat/config-schema
Jul 23, 2026
Merged

schema: add config.schema.json for the console config (P0-3)#10
mbreissi merged 1 commit into
mainfrom
feat/config-schema

Conversation

@mbreissi

Copy link
Copy Markdown
Contributor

Adds the config.schema.json that AGENTS.md tracked as outstanding P0-3, modelling component.global.console.*.

Why

The canonical EdgeCommons config schema leaves component.global open (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.json and test-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 required webRoot, unknown capability, stray top-level key (all caught).

It declares no #/$defs/instance: the console runs one per node and reads no component.instances[].

🤖 Generated with Claude Code

https://claude.ai/code/session_01LsX7cWVGLszurNYMVwMJGo

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
@mbreissi
mbreissi marked this pull request as ready for review July 23, 2026 17:40
@mbreissi
mbreissi merged commit b84184d into main Jul 23, 2026
2 checks passed
@mbreissi
mbreissi deleted the feat/config-schema branch July 23, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant