Skip to content

Add OCL object and model reference analysis - #56

Merged
ViTeXFTW merged 1 commit into
devfrom
t3code/ocl-model-references
Jul 18, 2026
Merged

Add OCL object and model reference analysis#56
ViTeXFTW merged 1 commit into
devfrom
t3code/ocl-model-references

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

What changed

  • Type ObjectNames as an Object reference list.
  • Type ModelNames as a variadic W3D model list and reuse model diagnostics, completion, indexing, and semantic highlighting for every entry.
  • Validate OCL particle systems and bounce sounds as ParticleSystem and AudioEvent references.
  • Add focused spec and unit regression coverage.

Why

ObjectCreationList sub-block fields were still stored as lenient strings even though the analyzer already supports the referenced definitions and W3D assets. This prevented unresolved-reference and unknown-model diagnostics and omitted completion suggestions.

Validation

  • cargo test
  • git diff --check

The optional real-game corpus is not installed in this worktree, so ignored corpus-only gates were not run.

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds stricter OCL reference and model analysis. The main changes are:

  • Adds W3dModelList as a schema value type.
  • Retypes OCL object, model, particle system, and bounce sound fields as references or model lists.
  • Extends diagnostics, completion, indexing, and semantic highlighting for W3D model lists.
  • Adds focused OCL reference tests for diagnostics and completions.

Confidence Score: 5/5

This PR is safe to merge with minimal risk.

The changes are localized schema and analyzer updates with matching tests, and no runtime or correctness issues were identified.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • The focused Rust validation run was executed, and the command and full test transcript were captured in the rust-focused validation log, including the command lines, working directory, timestamps, test counts, and exit codes.
  • Schema validation tests completed, showing 15 tests passed with exit code 0, as recorded in the schema validation log.
  • Diff whitespace checks completed, finishing with exit code 0, as shown in the diff-check log.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/schema/schema.json Retypes selected OCL fields from lenient string or unknown values to object references, model lists, particle systems, and audio events.
crates/schema/src/lib.rs Adds the serializable W3dModelList value type used by the schema and analyzer.
crates/analysis/src/diagnostics.rs Validates every token in W3D model list fields and adds tests for OCL object and model list diagnostics.
crates/analysis/src/completion.rs Extends completion labels, snippets, and model asset completion routing to support W3D model lists.
crates/analysis/src/index.rs Indexes every W3D model listed in object model collection while preserving single-model handling.
crates/analysis/src/model.rs Treats W3D model lists as model asset-bearing fields for model collection and related lookups.
crates/analysis/src/semantic.rs Classifies W3D model list values as references for semantic highlighting.
crates/analysis/tests/spec/OCLReferences.ini Adds an OCL fixture covering object, particle system, and audio event references.
crates/analysis/tests/spec/OCLReferences.spec.toml Adds diagnostics and completion expectations for the new OCL reference behavior.

Reviews (1): Last reviewed commit: "Add OCL object and model reference analy..." | Re-trigger Greptile

@ViTeXFTW
ViTeXFTW marked this pull request as ready for review July 18, 2026 13:44
@ViTeXFTW
ViTeXFTW merged commit be5693d into dev Jul 18, 2026
5 checks passed
@ViTeXFTW
ViTeXFTW deleted the t3code/ocl-model-references branch August 13, 2026 05:29
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