Skip to content

H-3484: Add ISO 80000 quantity types and representations - #10484

Draft
vilkinsons wants to merge 4 commits into
d/h-3484-common-measurement-unitsfrom
d/h-3484-iso-quantity-types
Draft

vilkinsons wants to merge 4 commits into
d/h-3484-common-measurement-unitsfrom
d/h-3484-iso-quantity-types

Conversation

@vilkinsons

@vilkinsons vilkinsons commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Adds missing ISO/IEC 80000 quantity meanings as property types and reusable numeric representations as data types. For example, thermodynamic entropy and heat capacity share joules per kelvin, while information entropy uses shannons, hartleys, or nats.

Stacked on #10479. Tracked in H-3484.

  • Adds 364 data types (204 concrete representations and 160 abstract conversion groups), 909 property types (708 quantities and 201 components/context fields), and 115 bidirectional conversion pairs using the existing graph expression schema.
  • Adds negative and non-negative numbers, bounded fractions, integer and half-integer domains, missing compound units, spectral units, decimal storage/rate prefixes through quetta, binary prefixes through quebi, and distinct information, traffic, and acoustic representations.
  • Includes Cartesian vectors, real second-order tensors, complex scalars, lattice bases, and CIE coordinate/sample objects. Their required components and context are validated; coordinate transformations, tensor algebra, and cross-component physical relationships are not implemented.
  • Loads every page of property types so the expanded catalogue is available beyond the previous 1,000-row limit. Shared unit-seeding helpers move to the migration-level shared directory without changing their behavior.

The coverage map accounts for 721 of 723 item locators in the pinned public JPL catalogue. Pressure- and concentration-based equilibrium constants (9-33 and 9-34) remain deferred because their unit exponents depend on reaction stoichiometry. This is not a claim of complete normative ISO conformance; the modeling notes record sources, editions, constraints, and structural limits. Point-versus-difference temperature conversions and the existing division precision are unchanged.

Validation:

  • 233 API catalogue/migration unit tests and three property-pagination tests passed.
  • Full API and frontend TypeScript checks passed. ESLint passed for the changed API/frontend files, and repository Markdown lint and changed-file formatting checks passed.
  • The original 1,272 live schemas matched their definitions; 1,948 live constraint/property-value cases passed.
  • 2,300 independent checks passed across all 115 conversion pairs, including stored definitions and live graph paths. Six invalid cross-quantity paths remain absent.
  • All 1,992 pre-existing registry entries are unchanged. Re-running the migration preserved existing versions.
  • Browser check: the Property Types page displayed all 1,177 available types.
  • Added Negative Number under Number with exclusiveMaximum: 0. Its stored schema and 14 live graph cases passed, covering negative integers/fractions, tiny and large negative values, zero, positive values, wrong primitives, and the existing Non-negative Number boundary. The 30 ISO catalogue tests, full API TypeScript check, ESLint, Markdown lint, and formatting passed. Re-running the updated migration preserved all existing versions.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@vilkinsons
vilkinsons added this pull request to stack #10475 November 12, 2026 18:17
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Nov 16, 2026 12:35pm UTC
petrinaut Ready Ready Preview Nov 16, 2026 12:35pm UTC
petrinaut-docs Ready Ready Preview Nov 16, 2026 12:35pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Nov 16, 2026 12:35pm UTC

Request Review

@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) area/apps > hash-api Affects the HASH API (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/apps type/legal Owned by the @legal team labels Nov 12, 2026
@vilkinsons vilkinsons changed the title Add ISO quantity properties and unit representations H-3484: Add ISO 80000 quantity types and representations Nov 12, 2026
@vilkinsons vilkinsons self-assigned this Nov 12, 2026
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:19 — with GitHub Actions Active
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:19 — with GitHub Actions Active
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs November 12, 2026 18:21 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut November 12, 2026 18:21 Inactive
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:24 — with GitHub Actions Active
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:24 — with GitHub Actions Active
@vilkinsons
vilkinsons removed this pull request from stack #10475 November 12, 2026 18:38
@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from a5386fe to 843ec53 Compare November 12, 2026 18:38
@vilkinsons
vilkinsons added this pull request to stack #10487 November 12, 2026 18:39
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:41 — with GitHub Actions Active
@vilkinsons
vilkinsons deployed to pull-request November 12, 2026 18:41 — with GitHub Actions Active
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs November 12, 2026 20:00 Inactive
@codecov

codecov Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.05%. Comparing base (9076dc0) to head (c382904).

Files with missing lines Patch % Lines
...migrations/036-add-iso-quantity-types.migration.ts 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           d/h-3484-common-measurement-units   #10484   +/-   ##
==================================================================
  Coverage                              69.05%   69.05%           
==================================================================
  Files                                   2091     2112   +21     
  Lines                                 214523   214558   +35     
  Branches                                9294     9297    +3     
==================================================================
+ Hits                                  148131   148164   +33     
- Misses                                 64499    64500    +1     
- Partials                                1893     1894    +1     
Flag Coverage Δ
apps.hash-ai-worker-ts 9.44% <ø> (ø)
apps.hash-api 18.14% <93.93%> (+0.40%) ⬆️
local.hash-backend-utils 24.83% <ø> (ø)
local.hash-isomorphic-utils 40.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from f5e5c20 to 27afada Compare November 13, 2026 16:16
@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from 27afada to f116634 Compare November 13, 2026 16:19
@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from f116634 to 2246f31 Compare November 13, 2026 17:04
@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from 2246f31 to d342668 Compare November 13, 2026 17:33
@vilkinsons
vilkinsons force-pushed the d/h-3484-iso-quantity-types branch from d342668 to 06c3de7 Compare November 13, 2026 17:48

This branch was successfully deployed

4 active (1 outdated) deployments
Preview – hash — c382904c Deployed Nov 16, 2026 by vercel[bot]
Preview – petrinaut-docs — c382904c Deployed Nov 16, 2026 by vercel[bot]
Preview – petrinaut — c382904c Deployed Nov 16, 2026 by vercel[bot]
pull-request — 843ec536 Deployed Nov 12, 2026 by vilkinsons via Sourcemaps (@apps/hash-integration-worker) #44845
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 type/eng > frontend Owned by the @frontend team type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

1 participant