Skip to content

meta: declared config key specs (typed admin get/edit surface)#21

Merged
BCook98 merged 3 commits into
mainfrom
config-specs
Jun 6, 2026
Merged

meta: declared config key specs (typed admin get/edit surface)#21
BCook98 merged 3 commits into
mainfrom
config-specs

Conversation

@BCook98

@BCook98 BCook98 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Games can now declare the admin-settable config keys they read via
Services.Config in their metadata — key, title, description, value type
(text/number/bool/json), the default used when unset, and (json keys)
an optional JSON Schema — so the arcade's admin tools can render typed get/edit
forms instead of a blind key/value prompt.

What's here

  • wire: trailing presence-guarded config-spec section in the packed Meta
    (u16 count; per entry str key/title/description, u8 type, str default, str schema). Encoders always write the section; decoders treat
    end-after-leaderboard as a valid pre-section meta. Old hosts ignore the
    trailing bytes — ABI major stays 2; this is a minor.
    wire.ValidateConfigSpecs is the shared authoring rule set: unique non-empty
    keys, no reserved host. prefix, schema only on json keys and well-formed JSON.
  • Go SDK: ConfigKeySpec/ConfigType + GameMeta.Config, validated at
    meta() encode time (fail-fast panic — surfaces in check/dev-run/host load).
  • Rust SDK: mirrored types (Meta.config: &'static [ConfigKeySpec],
    const-constructible), same validation (with a dependency-free RFC 8259
    well-formedness scanner standing in for json.Valid), encoding pinned
    byte-identical to Go by a golden vector.
  • Docs: ABI.md §4.2 documents the section + rules; GUIDE.md shows the
    authoring pattern.
  • Changeset: minor (→ v2.3.0).

Tests

  • go test ./... green (round-trip incl. all types, zero-count section,
    pre-config presence-guard bytes, validation rejections, fuzz extended —
    8.4M execs clean locally).
  • cargo test green (44 tests: wire layout, Go golden byte-identity,
    validation cases, JSON scanner).

Platform-side decode/rendering lands in the private repo after this tags.

🤖 Generated with Claude Code

BCook98 and others added 3 commits June 6, 2026 17:39
…validation)

GameMeta gains an optional Config []ConfigKeySpec (key, title,
description, type text|number|bool|json, default, JSON Schema) so the
arcade's admin tools can render typed get/edit forms for a game's
config keys. Carried as a trailing presence-guarded section of the
packed Meta — a spec/kit minor: old payloads decode with no specs, old
hosts ignore the trailing bytes. wire.ValidateConfigSpecs is the shared
authoring rule set (unique non-empty keys, no reserved host. prefix,
schema only on json keys and well-formed); the guest SDK enforces it at
meta() encode time. ABI.md documents the section; GUIDE.md shows the
authoring pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion)

ConfigKeySpec/ConfigType on Meta.config, encoded as the trailing
config-spec meta section byte-identical to the Go SDK (pinned by a Go
golden vector). Authoring rules match wire.ValidateConfigSpecs, with a
dependency-free RFC 8259 well-formedness scanner standing in for Go's
json.Valid.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BCook98
BCook98 merged commit eea2ca7 into main Jun 6, 2026
5 checks passed
@BCook98
BCook98 deleted the config-specs branch June 6, 2026 07:47
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