Skip to content

Add cross-block model member validation#48

Draft
ViTeXFTW wants to merge 3 commits into
devfrom
feat-multi-reference-pass
Draft

Add cross-block model member validation#48
ViTeXFTW wants to merge 3 commits into
devfrom
feat-multi-reference-pass

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

What changed

  • add schema-driven model sources for cross-block bone and subobject validation
  • resolve ObjectCreationList transport objects through their models and W3D members
  • index Object model bindings and inheritance for diagnostics and completion
  • add off, compatible, and strict model-member analysis modes
  • expose the setting through LSP initialization and VS Code configuration

Why

OCL fields such as VisibleDropBoneBaseName belong to the model used by their referenced transport Object, not to a model declared inside the OCL itself. Same-scope model lookup therefore could not validate these references.

Validation

  • cargo test --workspace
  • schema round-trip and spec tests
  • JSON configuration parse
  • git diff --check

The optional real-game corpus was not present locally, so the ignored corpus gate was not run.

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds cross-block model member validation for W3D bones and subobjects. The main changes are:

  • Schema-driven model sources for model-member fields.
  • Object model and inheritance indexing for diagnostics and completions.
  • OCL transport-object resolution for bone and subobject validation.
  • Configurable off, compatible, and strict analysis modes exposed through LSP and VS Code settings.

Confidence Score: 4/5

Safe to merge after the documentation default is corrected.

The code changes are focused and covered by targeted tests. The only accepted issue is a non-blocking documentation mismatch.

docs/language-server.md

T-Rex T-Rex Logs

What T-Rex did

  • The workspace cargo tests completed successfully with cargo test --workspace --locked, and they reported ignored corpus tests.
  • The git diff --check step completed successfully with EXIT_CODE: 0.
  • Targeted proof logs for schema/spec, schema crate, server crate, and VS Code compile all exited cleanly with EXIT_CODE: 0.
  • The artifact corpus gate proof was captured, showing a message that corpus is ignored and instructing to fetch the corpus with scripts.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/analysis/src/diagnostics.rs Adds configurable model-member diagnostics and validates OCL members against referenced transport models.
crates/analysis/src/index.rs Indexes object-to-model bindings, object inheritance, and model-member strictness state.
crates/analysis/src/model.rs Adds schema-directed model source resolution for enclosing objects and object-reference fields.
crates/server/src/backend.rs Populates object model and parent indexes during scans and applies strictness from initialization options.
docs/language-server.md Documents the new LSP option, but states the wrong default value.

Reviews (1): Last reviewed commit: "Add cross-block model member validation" | Re-trigger Greptile

Comment thread docs/language-server.md Outdated
Comment on lines 48 to 50
- `analysis.modelMemberStrictness` is `off`, `compatible` (member exists in any
applicable model), or `strict` (member exists in every applicable model).
It defaults to `false`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Correct default value
This bullet describes analysis.modelMemberStrictness but says it defaults to false; the server and VS Code configuration default it to compatible, so the published setup docs give users the wrong value.

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