Skip to content

fix(rig): validate native material and texture bindings - #206

Open
CompleteDotTech wants to merge 3 commits into
mainfrom
agent/native-material-safety-fleet
Open

CompleteDotTech wants to merge 3 commits into
mainfrom
agent/native-material-safety-fleet

Conversation

@CompleteDotTech

@CompleteDotTech CompleteDotTech commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Current published integrated head

PR #206 now contains the published integrated head d932d08a781e5c37a472a595b238972799f8bbf4, a normal merge of actual main dcba9123c4b70fc2caa7b56267920f239fb35c12 into the originally reviewed 1d3480f0e4cb0a0431ab86120f65e25048badac6. Material runtime, tests and documentation are unchanged; gate resolution preserves all current-main operations/correction validation and Model3D isolation, plus the material interoperability family. No other branch was edited.

Frozen current-candidate validation: 58 Model3D/correction tests passed in 11.427s; 52 material/core/interoperability tests passed in 30.349s with real Blender/browser/Khronos enabled, zero skips. All 355 tracked script/profile/test hashes are identical before/after. Exact local evidence: /tmp/hatch-fleet/native-material-d932-integration.json.

Fresh independent actual gpt-6-astra review returned PASS with zero findings at exact d932d08a781e5c37a472a595b238972799f8bbf4: 125 selected tests passed in 40.146s with zero skips, plus fresh actual material consumers, decoder, color and baseline probes. Report: /tmp/hatch-fleet/review-native-material-d932.md, SHA-256 fcaed217e3a46c1f1fcb8427832daad594eca9b5c48e5e7e2556d011edc6b5d5. Old 1d3480f approval and all 21 successful CI checks are historical evidence, not current-candidate CI. The head was published under an individual root lease. New exact-head CI and the final controller merge gate remain required; no merge is authorized by these local results.

Original scope and historical publication evidence

Problem and scope

Refs #52, #44, #139 (partial import safety correction; none is closed by this PR).

Native GLB/glTF import admitted material texture indices that do not exist, missing per-primitive UV bindings, and dangling image/sampler references. The same malformed material could be saved in a native geometry bundle or exported. This change enforces those boundaries in the shared rig_models.validate_geometry owner, so import, native storage and export use one validation rule.

Changes

  • Validate core base-color/metallic-roughness/normal/occlusion/emissive bindings, image and sampler indices, supported sampler modes and finite typed core factor ranges.
  • Validate effective assigned UV sets, honoring KHR_texture_transform.texCoord overrides and preserving valid transform/extension dictionaries.
  • Apply binding checks to texture slots in the material extensions already supported by the native importer; do not reinterpret arbitrary extras.
  • Reject out-of-range source COLOR_0 RGB/alpha components while preserving valid RGB→RGBA promotion.
  • Preserve original source bytes and source material dictionaries. Native indices remain actual non-boolean Python ints, consistent with the existing _index profile; adapters admitting integral JSON floats must normalize them first.
  • Add ten real GLB/glTF regression methods to the existing interoperability gate, plus exact commands, observed results, receipt hashes and limitations.

Validation

At local candidate 1d3480f0e4cb0a0431ab86120f65e25048badac6 (source hashes in tests/results/native-material-safety-verification.json):

  • 41 focused/legacy regression tests passed in 25.040 s, zero failures/errors/skips, using pinned Python 3.12.15. Includes all ten new tests and actual existing Khronos, Blender save/reopen/render and browser integrations.
  • Separate Khronos checks of the newly textured GLB and glTF exports: zero errors and zero warnings for both formats.
  • Eight actual baseline admissions reproduced by reinstating original validation in memory; corrected validation rejects them with source hashes unchanged.
  • Actual CLI bad texture binding: nonzero structured RIG_TEXTURE_REFERENCE, no traceback, requested run absent, source unchanged.
  • Schema/template checks and authored diff whitespace check pass; unchanged original 2D contract/optional dependency compatibility checks pass. The compatibility test discovered 802 legacy 2D tests; discovery is not full-suite execution.

Independent reviewer /root/review_native_material, actual model gpt-6-astra, returned PASS with zero findings at exact 1d3480f0e4cb0a0431ab86120f65e25048badac6. The reviewer independently reran all 41 tests with zero skips and added real-file/consumer probes. Full report: /tmp/hatch-fleet/review-native-material.md (SHA-256 78047b1d3cef36c9eee53e8b2794cf3a80eae9025b097f3ed6c6a1ce63607490). This is an independent model code review, not native GitHub approval or human/production signoff. Published-head CI and integrated-main verification remain separate gates; no merge is claimed.

Compatibility, limits and rollback

This intentionally rejects malformed previously accepted references. Valid material/image/sampler data and both supported UV sets roundtrip through native storage and GLB/glTF. Extension-specific numeric domains beyond finite JSON, full glTF compliance, rendered PBR equivalence and visual/production approval are outside this correction. Existing fixture integrations do not prove rendered equivalence for every new textured case.

The interoperability gate list must retain other concurrently added import-transform tests during integration. No rig_import.py, source archive format, schema, original asset or dependency pin changes. Rollback is the cohesive validation/test commit; retained source bytes are unaffected.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T03:43:07.982479Z 1d3480f PR opened
🔒 Security Review ✅ Completed 2026-10-24T03:48:45.701194Z 1d3480f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CompleteDotTech CompleteDotTech left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Repository triage review at d932d08a781e5c37a472a595b238972799f8bbf4.

The bounded material/index/UV validation change is supported by 10 passing focused Windows regressions. Current mergeability is dirty: reconcile the shared importer and test_rig_gate.py changes with main and sibling #211, preserving both material and texture/codec test families, then rerun exact integrated-head checks. This does not complete #44, #52 or #139. No new Blender/browser run was performed by this review.

This is an evidence-bounded agent COMMENT review, not a native approval or merge authorization. Historical artifacts and review claims remain tied to their original revisions.

@CompleteDotTech CompleteDotTech added area:3d-model Area: Mesh contracts, import, reconstruction and geometry. area:asset-library Area: Immutable asset registration, discovery and resolution. area:rigging Area: Skeletons, weights, IK/FK, rig controls and retargeting. priority:p1 Priority: Major functional blocker or shared prerequisite. status:blocked Workflow: Explicit unresolved prerequisite prevents required work. type:bug Type: Incorrect existing behavior. labels Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:asset-library Area: Immutable asset registration, discovery and resolution. area:rigging Area: Skeletons, weights, IK/FK, rig controls and retargeting. area:3d-model Area: Mesh contracts, import, reconstruction and geometry. priority:p1 Priority: Major functional blocker or shared prerequisite. status:blocked Workflow: Explicit unresolved prerequisite prevents required work. type:bug Type: Incorrect existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant