Skip to content

feat(eav): parameter/quantity leaves rebuild as v3 records in the nested projection (ENG-9300) - #573

Merged
oguzhankoral merged 2 commits into
mainfrom
oguzhan/eng-9300-v3-record-leaves
Aug 31, 2026
Merged

feat(eav): parameter/quantity leaves rebuild as v3 records in the nested projection (ENG-9300)#573
oguzhankoral merged 2 commits into
mainfrom
oguzhan/eng-9300-v3-record-leaves

Conversation

@oguzhankoral

Copy link
Copy Markdown
Member

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 —

var offset = ((Dictionary<string,object>)props["Parameters"]["Constraints"]["Base Offset"])["value"];  // 0.5

— but the flatten collapses those records into rows (value + unit/internal_definition_name columns) and the nested rebuild returned bare scalars, so every parameter-reading legacy script broke on a bundle version received through Receive2/TreeMaterializer.

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 (v3 used the human label as both key and name)
  • value = the row value
  • units / internalDefinitionName only when the columns carry them — so a text parameter is a record without a units key, exactly as v3 emitted it

Everything 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 Quantities are 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 a units key, scalar-outside-subtree untouched.
  • TypeScopedProjectionTests flipped to record leaves (fixture made v3-faithful).
  • Migrator V3GraphArtifactProducerTypeParameterTests: Nested(...) paths gained the "value" hop.
  • Suites: 218 objects, 40 migrator, 1064 unit — net8/net10 green. Verified live in the debugger on an rvextract bundle (record with idn, no units; root scalars untouched).

🤖 Generated with Claude Code

https://claude.ai/code/session_019mGdYTzvqTrbws7r8vwMgK

…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
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

ENG-9300

@oguzhankoral
oguzhankoral requested a review from JR-Morgan August 31, 2026 19:26
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.21488% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.19%. Comparing base (76c392d) to head (9354d0e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...quet/Pipelines/Receive/Artifacts/ArtefactBundle.cs 60.00% 0 Missing and 6 partials ⚠️
...ckle.Objects.Tests.Unit/Utils/V3RecordLeafTests.cs 98.33% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oguzhankoral
oguzhankoral merged commit 001b2d6 into main Aug 31, 2026
5 of 6 checks passed
@oguzhankoral
oguzhankoral deleted the oguzhan/eng-9300-v3-record-leaves branch August 31, 2026 19:38
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.

2 participants