Repository navigation
Description
Found while implementing #1785 (PR #1788). Out of scope there, and explicitly noted as a separate concern in ADR-063.
Current behavior
#1785 made the two create_schema routes agree on namespacing — both now store bare field names. They still disagree on the field name itself, because the description route infers a name from the surrounding words and folds the type keyword into it:
| Call | Stored field name |
|---|---|
{"name": "Venue", "description": "capacity number"} |
capacity_number |
{"name": "Venue", "fields": [{"name": "capacity", "type": "number"}]} |
capacity |
The description route reads "capacity number" as name capacity number + type number, then normalize_field_name (packages/core/src/schema/mod.rs) slugifies the whole phrase — including the type keyword — into capacity_number. The type keyword is consumed for type inference and retained in the name.
This is visible in the #1785 work: test_create_schema_paths_agree_on_stored_field_names uses the description "capacity" rather than "capacity number", with a comment explaining why, precisely so it tests namespacing rather than this.
Why it matters
Same reason the namespace divergence mattered — stored field names are user-visible keys, not an internal detail:
titleTemplatetokens resolve against stored names- CEL selectors in playbook rules
- Query filter property names
- Frontend property lookups
A user describing "capacity number" almost certainly wants a field called capacity of type number, not a field called capacity_number. The agent then has to guess which name was actually stored when it writes a subsequent template or filter.
Scope note
Unlike #1785 this is not a convention question with two defensible answers — capacity_number is not what the caller meant. But the fix is not purely mechanical either: stripping the type keyword needs care around names where the keyword is genuinely part of the field (invoice number, phone number, date of birth, account number). Naive stripping turns invoice number into invoice, which is a different wrong answer.
Worth checking how parse_field_descriptions splits name from type before picking an approach, and whether the type keyword should be dropped only when the remaining name is non-empty and the keyword sits at the end.
Acceptance criteria
- Decide the inference rule, including what happens to names where the type keyword is part of the intended name (
invoice number,phone number) -
"capacity number"infers field namecapacitywith typenumber - Names where the keyword is intrinsic are not mangled —
"invoice number"does not becomeinvoice - A test asserts both
create_schemaroutes agree on the stored name for the same intent, using a description where the type keyword is present (the create_schema paths disagree on whether field names carry a namespace prefix #1785 test deliberately avoids this case and should be extended or complemented) - Existing
parse_field_descriptions/normalize_field_nametests updated to the decided rule
Activity
malibio commentedon Jul 28, 2026
Baseline on worktree issue-1789-strip-type-keyword: Frontend 4106 passed (170 files). Rust schema (cargo test -p nodespace-core --lib schema): 121 passed, 0 failed.
malibio commentedon Jul 29, 2026
Superseded in approach by #1800.
Post-merge review of this work, plus the eval traces in
scripts/results-e4b.json, established that the underlying problem is not that the description route infers badly — it is that the route exists at all, as an undocumented second meaning for adescriptionparameter the tool schema documents as a prose blurb.#1800 deletes the route, which removes the
STRIPPABLE_TYPE_KEYWORDS/INTRINSIC_KEYWORD_PREFIXESkeep-list added here. That list grew 12 → 24 entries within this PR's review cycle, is English-only, and each entry's correctness is unfalsifiable — the tell that the mechanism was wrong rather than incomplete.Two things from this work survive in #1800: the tightened
assert_eq!assertions, and theRESERVED_CORE_PROPERTIESshadowing check — the latter moved onto the explicit-fields path, where it is currently missing entirely.