feat(eav): parameter/quantity leaves rebuild as v3 records in the nested projection (ENG-9300) - #573
Merged
Merged
Conversation
…ted projection (ENG-9300)
A v3 script reads parameter leaves as {name, value, units} records -
props['Parameters']['Constraints']['Base Offset']['value'] - but the
flatten collapses records into rows and the nested rebuild returned
bare scalars, so every parameter-reading legacy script broke on a
bundle version.
BuildProperties now rebuilds the record from the row's columns, ONLY
in the subtrees that were records in the v3 shape (properties.
Parameters.*, properties.Material Quantities.*): name = the leaf key
(as v3 had it), value = the row value, units / internalDefinitionName
only when the columns carry them. Everything else - user text, GH
props, root scalars - was scalar in v3 and stays scalar, reproducing
v3's mixed shape by producer convention. Applies to both the object
and type scopes (one shared rebuild), so the ENG-9302 merged type
params carry records too.
Receive3 / PropertyView / ToNested are untouched: flat paths, scalar
values - the bundle-native contract.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mGdYTzvqTrbws7r8vwMgK
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #573 +/- ##
==========================================
+ Coverage 72.10% 72.19% +0.08%
==========================================
Files 472 473 +1
Lines 26849 26957 +108
Branches 2703 2712 +9
==========================================
+ Hits 19360 19461 +101
Misses 6541 6541
- Partials 948 955 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gjedlicska
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The last piece of the ENG-9300 receive-shape contract, driven by the Automate-script requirement: a v3 script reads parameter leaves as
{name, value, units}records —— but the flatten collapses those records into rows (value +
unit/internal_definition_namecolumns) and the nested rebuild returned bare scalars, so every parameter-reading legacy script broke on a bundle version received throughReceive2/TreeMaterializer.BuildPropertiesnow rebuilds the record from the row's columns, only in the subtrees that were records in the v3 shape (properties.Parameters.*,properties.Material Quantities.*):name= the leaf key (v3 used the human label as both key andname)value= the row valueunits/internalDefinitionNameonly when the columns carry them — so a text parameter is a record without aunitskey, exactly as v3 emitted itEverything outside those subtrees (user text, GH props, root scalars like
elementId/builtInCategory) was scalar in v3 and stays scalar — the v3 mixed shape reproduced by producer convention, not a heuristic. One shared rebuild serves both scopes, so the type params merged by #570 carry records too. Works identically for connector-era, migrated, and rvextract bundles (rvextract writes the same records on the way in).Untouched:
Receive3/PropertyView/ToNested()— flat paths, scalar values; the bundle-native contract stays clean.Contract statement (for the ENG-9300 sign-off)
Nesting rebuilt from dotted EAV path segments, uniformly across object/type/model scopes; leaves under
Parameters/Material Quantitiesare v3 records rebuilt from row columns; all other leaves scalar; ordinal keys are strings; no dot-escaping in the path grammar.Tests
V3RecordLeafTests(new): the exact v3 access pattern end-to-end (["value"],["units"],["name"],["internalDefinitionName"]), unit-less record without aunitskey, scalar-outside-subtree untouched.TypeScopedProjectionTestsflipped to record leaves (fixture made v3-faithful).V3GraphArtifactProducerTypeParameterTests:Nested(...)paths gained the"value"hop.🤖 Generated with Claude Code
https://claude.ai/code/session_019mGdYTzvqTrbws7r8vwMgK