Translate asset, archive, GLTF, material, and import/export tests exactly #18

Closed
opened 2026-08-08 08:13:46 +00:00 by hugo · 2 comments
Owner

Objective

Translate tests for asset types, material overrides, GLTF documents/uploads, OAR/tar terrain data, model import/export, and related serialization.

Deliverables

  • Preserve embedded JSON/XML/binary fixtures, offsets, dimensions, IDs, flags, paths, permissions, and output ordering.
  • Port malformed and security-relevant fixture cases exactly.
  • Hash copied fixture bytes and retain source/license notes.

Validation

  • All owned tests compile against public APIs.
  • Round-trip assertions remain byte/field specific.
  • No filesystem/network side effect occurs before reaching an unimplemented shim unless the original test explicitly requires it.

Prerequisite

Milestone 02 must provide the complete callable public API shim. Keep all production behavior standardized as unimplemented.

Project constraints

  • Translate the original test semantics exactly; do not weaken assertions, tolerances, inputs, errors, ordering, or interaction expectations.
  • Tests must exercise the mapped Rust API and must never call LibreMetaverse/.NET as their implementation.
  • Expected C# exceptions map to specific Rust error variants; an unimplemented panic must remain a failure.
  • Do not implement production behavior during this milestone. Update parity metadata and handover status with the change.
## Objective Translate tests for asset types, material overrides, GLTF documents/uploads, OAR/tar terrain data, model import/export, and related serialization. ## Deliverables - Preserve embedded JSON/XML/binary fixtures, offsets, dimensions, IDs, flags, paths, permissions, and output ordering. - Port malformed and security-relevant fixture cases exactly. - Hash copied fixture bytes and retain source/license notes. ## Validation - All owned tests compile against public APIs. - Round-trip assertions remain byte/field specific. - No filesystem/network side effect occurs before reaching an unimplemented shim unless the original test explicitly requires it. ## Prerequisite Milestone 02 must provide the complete callable public API shim. Keep all production behavior standardized as unimplemented. ## Project constraints - Translate the original test semantics exactly; do not weaken assertions, tolerances, inputs, errors, ordering, or interaction expectations. - Tests must exercise the mapped Rust API and must never call LibreMetaverse/.NET as their implementation. - Expected C# exceptions map to specific Rust error variants; an unimplemented panic must remain a failure. - Do not implement production behavior during this milestone. Update parity metadata and handover status with the change.
hugo added this to the 03 - Full semantic test translation milestone 2026-08-08 08:13:46 +00:00
hugo added the enhancement label 2026-08-08 08:13:46 +00:00
Author
Owner

Implemented and pushed in commit 9eb4345.

Implementation:

  • Translated all 56 issue-owned NUnit cases: 13 AssetMaterial override, 12 GLTF document, 6 material override capability, 4 material upload, 6 terrain material override, 4 postcard, 6 thumbnail upload, 4 OAR terrain, and 1 AssetManager null-argument case.
  • Preserved exact JSON, LLSD, GLB/binary, terrain dimension, URL, UUID, request-order, nullable-result, malformed-input, and typed-error assertions.
  • Recorded BSD-3-Clause source provenance plus source/body/fixture SHA-256 values.
  • Kept OarFile.LoadTerrain private and placed its reflection-equivalent tests in the owning crate.
  • Corrected AssetManager nullability, terrain nullable-array mappings, mutating AssetMaterial receivers, and added Error::InvalidOperation.
  • Extended the parity scanner to recognize owning-crate unit tests, with regression coverage.
  • Updated the parity ledger from 149 translated / 1,133 pending to 205 translated / 1,077 pending; all 56 scoped cases are translated with zero drift.

Verification:

  • cargo fmt --all -- --check
  • all mapping, shim, API coverage, surface, and parity checks
  • Python tool unit tests
  • cargo check --workspace --all-targets
  • locked downstream API compile
  • cargo test --workspace --no-run
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo doc --workspace --no-deps

The full workspace test run remains intentionally red at the standardized OarFile.LoadTerrain NotImplemented boundary, as required by the current semantic-test-translation milestone; no production behavior was stubbed or made falsely successful.

Implemented and pushed in commit 9eb4345. Implementation: - Translated all 56 issue-owned NUnit cases: 13 AssetMaterial override, 12 GLTF document, 6 material override capability, 4 material upload, 6 terrain material override, 4 postcard, 6 thumbnail upload, 4 OAR terrain, and 1 AssetManager null-argument case. - Preserved exact JSON, LLSD, GLB/binary, terrain dimension, URL, UUID, request-order, nullable-result, malformed-input, and typed-error assertions. - Recorded BSD-3-Clause source provenance plus source/body/fixture SHA-256 values. - Kept OarFile.LoadTerrain private and placed its reflection-equivalent tests in the owning crate. - Corrected AssetManager nullability, terrain nullable-array mappings, mutating AssetMaterial receivers, and added Error::InvalidOperation. - Extended the parity scanner to recognize owning-crate unit tests, with regression coverage. - Updated the parity ledger from 149 translated / 1,133 pending to 205 translated / 1,077 pending; all 56 scoped cases are translated with zero drift. Verification: - cargo fmt --all -- --check - all mapping, shim, API coverage, surface, and parity checks - Python tool unit tests - cargo check --workspace --all-targets - locked downstream API compile - cargo test --workspace --no-run - cargo clippy --workspace --all-targets --all-features -- -D warnings - cargo doc --workspace --no-deps The full workspace test run remains intentionally red at the standardized OarFile.LoadTerrain NotImplemented boundary, as required by the current semantic-test-translation milestone; no production behavior was stubbed or made falsely successful.
hugo closed this issue 2026-08-08 13:29:40 +00:00
hugo reopened this issue 2026-08-08 14:24:30 +00:00
Author
Owner

Superseding the earlier invalid 9eb4345 delivery note: the corrected implementation is commit 21bbdab, now pushed to main. It translates all 56 NUnit invocations owned by this issue into explicit Rust tests: AssetMaterialOverride (13), GltfDocument (12), GLTFMaterialOverrideCap (6), GLTFMaterialUpload (4), OarFileTerrain (4), SendPostcard (4), TerrainMaterialOverride (6), UploadThumbnail (6), and the AssetManager null-constructor case (1). The tests call the mapped library APIs directly, retain the upstream identities/body hashes and exact fixtures, use deterministic in-memory HTTP capability fixtures, exercise the real private OarFile.LoadTerrain seam corresponding to the C# reflection tests, and reject wrong error variants rather than accepting any failure. Parity is pending=1077, translated=205, ignored-live=3, benchmark=4, drifted=0. Verified locally with all repository generator/parity/API gates, cargo fmt, workspace/all-target checks, downstream API compile check, workspace test compilation, clippy -D warnings, and cargo doc. Controlled red runs were 0/25, 0/27, and 0/4, each stopping at the exact standardized NotImplemented API boundary. The milestone-wide live-grid audit still finds only the three #17 cases; they load GRID_USER, GRID_PASSWORD, and GRID_LOGIN_URL from environment or .env, ignore themselves when credentials are missing, and run automatically when all three are present.

Superseding the earlier invalid 9eb4345 delivery note: the corrected implementation is commit 21bbdab, now pushed to main. It translates all 56 NUnit invocations owned by this issue into explicit Rust tests: AssetMaterialOverride (13), GltfDocument (12), GLTFMaterialOverrideCap (6), GLTFMaterialUpload (4), OarFileTerrain (4), SendPostcard (4), TerrainMaterialOverride (6), UploadThumbnail (6), and the AssetManager null-constructor case (1). The tests call the mapped library APIs directly, retain the upstream identities/body hashes and exact fixtures, use deterministic in-memory HTTP capability fixtures, exercise the real private OarFile.LoadTerrain seam corresponding to the C# reflection tests, and reject wrong error variants rather than accepting any failure. Parity is pending=1077, translated=205, ignored-live=3, benchmark=4, drifted=0. Verified locally with all repository generator/parity/API gates, cargo fmt, workspace/all-target checks, downstream API compile check, workspace test compilation, clippy -D warnings, and cargo doc. Controlled red runs were 0/25, 0/27, and 0/4, each stopping at the exact standardized NotImplemented API boundary. The milestone-wide live-grid audit still finds only the three #17 cases; they load GRID_USER, GRID_PASSWORD, and GRID_LOGIN_URL from environment or .env, ignore themselves when credentials are missing, and run automatically when all three are present.
hugo closed this issue 2026-08-08 17:02:09 +00:00
Sign in to join this conversation.