Skip to content

feat: Improve bone name completions and validation - #117

Merged
ViTeXFTW merged 1 commit into
devfrom
t3code/fix-bone-name-completions
Sep 5, 2026
Merged

feat: Improve bone name completions and validation#117
ViTeXFTW merged 1 commit into
devfrom
t3code/fix-bone-name-completions

Conversation

@ViTeXFTW

@ViTeXFTW ViTeXFTW commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Problem

Bone-valued fields had inconsistent completion and validation behavior. Numbered bones such as Fire01 were collapsed to Fire, and model-qualified aliases could appear as duplicate suggestions.

What changed

  • Added schema-level model-member modes for exact, indexed, exact-or-indexed, and RandomBone fields.
  • Applied the engine's actual lookup rules to completions and diagnostics, including split Bone: value syntax.
  • Preserved numbered bone names for exact fields and exposed both family and exact forms where the engine supports them.
  • Deduplicated qualified model-member aliases while retaining short INI names.
  • Added issue [Feature] Better suggestions for bone values in conditionstates #114 regression tests and documented the audited engine behavior.

Validation

  • cargo test --workspace
  • cargo test -p zerosyntax-schema
  • cargo test -p zerosyntax-analysis --test spec
  • cargo test -p zerosyntax-analysis --test bone_names
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo fmt --all --check
  • Full corpus gate over 2,232 INI files
  • Server stdio E2E suite

Closes #114

@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns model-member completion and diagnostics with field-specific engine bone lookup behavior.

  • Adds exact, indexed, exact-or-indexed, and RandomBone-controlled schema modes.
  • Preserves numbered names where exact lookup is required and deduplicates qualified aliases.
  • Handles attached and split prefixed bone syntax consistently.
  • Adds focused completion, diagnostics, schema, and specification regression coverage.
  • Documents the audited engine behavior and lookup assumptions.

Confidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule violations remain.

The new token mapping, field modes, alias normalization, and validation behavior are internally consistent and covered by focused passing tests for attached and split prefixes, exact names, indexed families, and RandomBone control.

Important Files Changed

Filename Overview
crates/analysis/src/completion.rs Resolves active structured value types and emits mode-aware, deduplicated model-member completions with correct prefix insertion.
crates/analysis/src/diagnostics.rs Validates every applicable raw value token using split-prefix-aware type resolution and field-specific member modes.
crates/analysis/src/model.rs Centralizes qualified-name normalization, numbered-family generation, matching, and contextual RandomBone mode resolution.
crates/schema/src/lib.rs Adds backward-compatible schema metadata for audited model-member lookup semantics and shared token-position helpers.
crates/schema/schema.json Applies audited lookup modes to affected bone fields and types TransitionDamageFX bone values as model members.
crates/analysis/tests/bone_names.rs Covers alias deduplication and prefix-preserving completion across attached and split Bone syntax.
crates/analysis/tests/spec/BoneNames.spec.toml Specifies exact, indexed, and RandomBone-dependent completion and diagnostic behavior.
docs/bone-names.md Documents field modes, numbered-family assumptions, split syntax, alias behavior, and audited engine references.

Reviews (1): Last reviewed commit: "Improve bone name completions and valida..." | Re-trigger Greptile

@ViTeXFTW ViTeXFTW changed the title Improve bone name completions and validation feat: Improve bone name completions and validation Sep 5, 2026
@ViTeXFTW
ViTeXFTW force-pushed the t3code/fix-bone-name-completions branch from 3b8b17b to 9267d08 Compare September 5, 2026 09:26
@ViTeXFTW
ViTeXFTW merged commit 19ff058 into dev Sep 5, 2026
4 checks passed
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.

[Feature] Better suggestions for bone values in conditionstates

1 participant