Skip to content

H-3484: Seed practical measurement property types - #10485

Draft
vilkinsons wants to merge 1 commit into
d/h-3484-iso-quantity-typesfrom
d/h-3484-practical-property-types
Draft

vilkinsons wants to merge 1 commit into
d/h-3484-iso-quantity-typesfrom
d/h-3484-practical-property-types

Conversation

@vilkinsons

@vilkinsons vilkinsons commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Seeds 102 practical property types using 45 existing data types or conversion groups. These let product specifications and observations distinguish meanings such as battery charge capacity, battery energy capacity, tank capacity, payload mass, network download rate, and available storage.

Stacked on #10484. Tracked in H-3484.

The catalogue covers dimensions and capacity; environmental observations; electricity and energy; equipment and fluids; transport; computing and communications; and light, sound, and radiation.

Properties reference common quantity parents to accept compatible metric, imperial, and US customary units. Fractions use bounded representations with unit-specific ranges, counts use integer domains, and the two sound-level properties require their declared A or C weighting. Charge and energy, mass and amount concentration, active/apparent/reactive power, and fuel consumption/economy retain separate meanings and unit families.

The migration resolves data-type references through the installed migration state and uses the existing idempotent property seeder. Existing types and conversion expressions are unchanged. The modeling notes describe the choices and limits: measurement conditions belong in the surrounding observation model, and physical relationships beyond existing data-type constraints are not enforced by these scalar properties.

An explicit TODO links BE-1156. Reciprocal constant / self conversions remain omitted until the team's future fallible-conversion support is available. Closed PR #10480 is not a dependency. Division precision is unchanged.

Validation:

  • 26 migration/catalogue tests and 440 live graph validation cases passed, covering valid units, wrong dimensions and primitives, fraction bounds, count constraints, and sound weighting.
  • Full API TypeScript check, ESLint, repository Markdown lint, and changed-file formatting passed.
  • All 102 live property schemas matched their definitions. All 3,264 existing registry entries, 1,798 live data types, and 1,177 existing live property types were unchanged.
  • Re-running the migration preserved the property versions.
  • The local browser displayed all 1,279 property types.

Stack created with GitHub Stacks CLI • Give Feedback 💬

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant