Skip to content

skill_rules.rs documents the unique-field JSON key as unique_case_insensitive, but the wire form is uniqueCaseInsensitive, so the documented example is rejected verbatim #2788

Closed

Description

@malibio

Summary

packages/agent/src/skill_rules.rs:193-194 (both the imperative and prose variants) tell the caller to pass "unique_case_insensitive": true in a schema create field definition. The wire key is uniqueCaseInsensitive — SchemaField carries #[serde(rename_all = "camelCase", deny_unknown_fields)] (packages/nodespace-types/src/schema.rs:148), so the documented spelling is rejected.

This propagates into the generated skill reference (references/cli.md, lines 330, 331, 398 in the copy at ~/.claude/skills/nodespace/), including a complete schema create example that fails if copied verbatim.

Reproduction

nodespace schema create --params '{"name":"ADR","fields":[{"name":"key","type":"text","required":true,"unique_case_insensitive":true}]}'
status: InvalidArgument, message: "unknown field `unique_case_insensitive`,
expected one of `name`, `friendlyName`, `type`, `protection`, `coreValues`,
`userValues`, `indexed`, `required`, `extensible`, `default`, `description`,
`itemType`, `fields`, `itemFields`, `unique`, `uniqueCaseInsensitive`, `localOnly`"

Substituting uniqueCaseInsensitive succeeds.

Root cause

The Rust struct field genuinely is unique_case_insensitive — correct snake_case for Rust. Only the JSON wire form is camelCase, via rename_all. The doc string was written from the struct definition rather than from the serialized form, conflating the two.

Because the prose lives in skill_rules.rs and is emitted into cli.md under a BEGIN GENERATED marker, fixing the .md alone will be overwritten — the fix belongs in skill_rules.rs.

Suggested fix

Replace both occurrences in skill_rules.rs:193 (imperative) and :194 (prose) with uniqueCaseInsensitive, then regenerate. Note the neighbouring "unique": true is unaffected — single-word keys are identical in both conventions, which is likely why this went unnoticed.

Worth a broader sweep of skill_rules.rs for other multi-word JSON keys documented in snake_case; I only exercised this one.

Found via

Agent session using the nodespace skill. Cost one failed schema create and a retry. The daemon's error message names the bad key and lists every valid one, which is why the recovery was immediate rather than a guessing exercise — worth preserving.

Activity

  1. added
    bug
    on Sep 22, 2026
  2. mstomar125 commented on Sep 22, 2026

    @mstomar125
    Contributor

    Frontend: 5240 passed (260 test files). Baseline confirmed before implementation.

  3. self-assigned this
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions