Skip to content

feat: validate sourced physical material properties and elastic stability - #934

Merged
bherbruck merged 3 commits into
tangency-labs:mainfrom
selun3:codex/physical-material-properties
Oct 14, 2026
Merged

bherbruck merged 3 commits into
tangency-labs:mainfrom
selun3:codex/physical-material-properties

Conversation

@selun3

@selun3 selun3 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #923. Refs #922, #785 and #792.

Physical material definitions currently provide density and a scalar look. This adds a bounded, renderer-independent candidate data card and read-only material.properties.validate {card} so engineering properties can be checked before a later assignment/persistence integration. It does not change existing assigned density, mass, appearance, document format, library storage or rendering capabilities.

Cards describe density, isotropic/orthotropic elasticity, tensile/compressive/yield/shear strength, directional thermal conductivity/expansion and specific heat in explicit SI fields. Each property block references a source and optional temperature, dry-basis moisture, strain rate and specimen/grade/process state. Unknown data stays unknown; every used source remains explicitly unreviewed, including caller-declared open licenses. No engineering dataset, material preset, asset, dependency or third-party implementation is added.

Isotropic E/Poisson stability accepts auxetic values and derives G/K. Orthotropic validation uses the declared nu12/nu23/nu31 convention, reciprocity and positive definiteness of the scaled symmetric compliance, plus positive shear moduli; it does not impose the isotropic nu < 0.5 rule on wood. Unrepresentable reciprocals/derived response are rejected. Negative expansion and dry-basis moisture above one are supported. Scalar strengths are measurements, not a complete directional failure envelope. A family label does not certify a constitutive model or enable FEA.

JSON is admitted before cloning/deserialization with node/depth/byte/collection limits. Typed metadata, numbers, source links, duplicate kinds and unknown fields are checked. The command preserves document/history/selection/camera and a live stale sketch/model. No referenced source is fetched. The contract, limits, original synthetic example and staged follow-ups are in docs/physical-material-cards.md; ROADMAP and the generated command catalog are updated.

Validation

Current base: upstream 3669d4b3, integrated in 84a8880b. ROADMAP keeps both physical-card and upstream library sections; the generated command catalog preserves both sets of commands. No code conflicts; unrelated primary-checkout changes remain preserved.

  • Eight added tests: five analytic/hostile-input data tests and three engine/API/state tests, including live geometry. All pass on the current base.
  • Full doc library: 188 passed / 0 failed / 1 ignored.
  • Scoped doc/engine Clippy, all targets, -D warnings: passes.
  • WebAssembly: 11/11 crates compile. No advanced renderer/platform capability is inferred from compilation.
  • Actual current CI-profile CLI: synthetic E=12e9 Pa, nu=.25 returns G=4.8e9 Pa and K=8e9 Pa, with source/condition review still required; nu=.6 is refused with exit 1.
  • Broad engine run on the exact current tree: 902 passed / 0 failed / 5 ignored / 21 robustness tests filtered, 88.82 seconds.
  • Full cargo xtask ci was run on the current base. Format, 42-asset attribution, licence freshness and layering pass; global Clippy stops at the two pre-existing Windows MCP unused_mut warnings (crates/mcp/src/lib.rs, crates/mcp/src/tests.rs), addressed independently by fix: restrict MCP mutable bindings to Unix builds #907. The full local gate is not claimed green. No lint suppression, geometry assertion weakening or golden changes are included.
  • GitHub CI run 38489576673 on 63342db: all enabled checks pass, including four native test shards, reference tests, documentation and Linux Clippy. Ready for review; a fresh run has started for the upstream integration 84a8880. Earlier local counts below refer to 63342db; updated integrated checks are recorded in follow-up comments.

This changes data/CLI validation, with no model/viewport behavior to illustrate. The actual analytic CLI output and automated rejection/state tests are the evidence; there are no rendered-material screenshots or claims of visual improvements in this slice.

Integration boundary

The phased physical/visual roadmap and family-specific acceptance proposals are in #922. Persistence/editor/library work needs separate migration, ownership and undo/reopen review, coordinated with #849/#863. Optical PBR/texture/HDRI consumption follows the existing renderer contract requested in #813 and resource utilities #837/#909. This contribution does not establish a competing renderer, resource store or persistent pack schema and closes only the standalone validation slice.

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for taking this out of draft. The sourced property cards and the stability checks are a good base for the materials work.

The red in Native Linux tests (4/4) comes from this PR, not from flakiness or main:

i18n::tests::every_command_label_is_in_the_english_catalog
1 command label(s) have no English catalog entry, so they would stay English in every locale: ["Validate Physical Material Data"]

Every command label in the registry needs a catalog entry now. Adding "cmd.material_properties_validate": "Validate Physical Material Data" to assets/locales/en.json will fix the test. The label lookup goes by the exact English text. Please add the same key to de, ja, ko and zh too, so the command doesn't stay English there. The other jobs pass. I'll take another look once this is green.

@selun3

selun3 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Current-upstream CI exposed the new English command-label coverage guard. Fixed the validator label in English and complete Japanese/Chinese catalogs; all 22 focused localization/UI tests pass locally. The runtime card implementation is unchanged. Global local CI was repeated and still stops only at the existing Windows MCP warnings tracked by #907. Fresh remote CI is running for this correction; the prior integrated run is not claimed green.

@bherbruck
bherbruck merged commit 01f2c78 into tangency-labs:main Oct 14, 2026
16 checks passed
@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks @0xlillith, merged. The source and condition review is exactly the footing the materials work needs. I'll add the German and Korean labels for the two new commands myself in a small follow-up, so no need to touch this again.

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.

Physical material cards: typed SI data, conditions, provenance and elastic stability validation

2 participants