Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.

feat: add spring bones metadata validation - #354

Closed
decentraland-bot wants to merge 7 commits into
mainfrom
feat/spring-bones-metadata
Closed

feat: add spring bones metadata validation#354
decentraland-bot wants to merge 7 commits into
mainfrom
feat/spring-bones-metadata

Conversation

@decentraland-bot

Copy link
Copy Markdown

Summary

  • Added springBonesMetadataValidateFn in src/validations/items/wearables.ts
  • Validates that model filenames in springBones.models exist in the wearable's representation content files
  • Validates bone naming convention (SpringBone_ prefix)
  • Validates parameter ranges (stiffness: 0–5, gravityPower: 0–10, drag: 0–1)
  • Validates version field equals 1

This catches model/metadata desync at deploy time — preventing wearables where springBones metadata references non-existent model files or bone names.

Test plan

  • Verify valid springBones metadata passes validation
  • Verify missing model filename is caught
  • Verify invalid bone name prefix is caught
  • Verify out-of-range parameter values are caught
  • Verify wearables without springBones still pass validation

Requested by Rocío Corral Mena via Slack

🤖 Generated with Claude Code

Validate the springBones field in wearable metadata:
- Model filenames must exist in representation contents
- Bone names must follow SpringBone_ naming convention
- Parameter values must be valid (non-negative numbers, gravityDir is [x,y,z])
- Version must be 1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coveralls

coveralls commented Apr 23, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 84.085% (+0.2%) from 83.88% — feat/spring-bones-metadata into main

@github-actions

Copy link
Copy Markdown

Test this pull request

  • The package can be tested by running
    yarn upgrade "https://sdk-team-cdn.decentraland.org/@dcl/content-validator/branch/feat/spring-bones-metadata/dcl-content-validator-7.2.1-25001437621.commit-b4ca51a.tgz"

@RocioCM

RocioCM commented Apr 27, 2026

Copy link
Copy Markdown
Member

PR moved to core-libs monorepo decentraland/core-libs#21

@RocioCM RocioCM closed this Apr 27, 2026
@RocioCM
RocioCM deleted the feat/spring-bones-metadata branch April 27, 2026 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants