Skip to content

BE-610: Add migration for generic supply chain ontology#8872

Merged
CiaranMn merged 12 commits into
mainfrom
asa/supply-chain
Jun 29, 2026
Merged

BE-610: Add migration for generic supply chain ontology#8872
CiaranMn merged 12 commits into
mainfrom
asa/supply-chain

Conversation

@thehabbos007

@thehabbos007 thehabbos007 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

This PR adds new ontology types for supply chains. I have moved some ontology types that were in the aviation migration, as they are now useful for concepts of the ontology here. A rundown:

Entity types (23)

Company  ·  Customer  ·  Vendor  ·  Material  ·  Site  ·  Batch
Bill of Materials  ·  Bill of Materials Item
Sales Order  ·  Sales Order Item
Purchase Order  ·  Purchase Order Item  ·  Purchase Order Schedule Line
Production Order  ·  Production Order Item
Delivery  ·  Delivery Item
Shipment  ·  Shipment Item
Material Document  ·  Material Reservation  ·  Material Valuation  ·  Site Material Data
(Company is the abstract parent of Customer/Vendor.)

Link types (19), forward (inverse)

Has Line Item     (Line Item Of)
Has Customer      (Customer For)
Has Vendor        (Vendor For)
Has Material      (Material For)
Of Material       (Makes up)
Located At        (Location For)
Produces          (Produced By)
Consumes          (Consumed By)
Procures          (Procured By)
Yields            (Yielded By)
Moves             (Moved By)
Records           (Recorded By)
Fulfills          (Fulfilled By)
Delivers          (Delivered By)
Transports        (Transported By)
Departs From      (Departure For)
Arrives At        (Arrival For)
Posted Against    (Has Posting)

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Adds new graph/api migrations for new ontology concepts
  • Adds icons for new types

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing
  • [] modifies an npm-publishable library and I have added a changeset file(s)
  • [] modifies a Cargo-publishable library and I have amended the version
  • [] modifies a Cargo-publishable library, but it is not yet ready to publish
  • [] modifies a block that will need publishing via GitHub action once merged
  • [] I am unsure / need advice

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change
  • [] are in a state where docs changes are not yet required but will be
  • [] require changes to docs which are made as part of this PR
  • [] require changes to docs which are not made in this PR
    • Provide more detail here
  • [] I am unsure / need advice

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph
  • [] affected the execution graph, and the turbo.json's have been updated to reflect this
  • [] I am unsure / need advice

⚠️ Known issues

🐾 Next steps

🛡 What tests cover this?

❓ How to test this?

  1. Checkout the branch
  2. run the system with the graph running to inspect new types

📹 Demo

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Jun 29, 2026 1:41pm
hashdotdesign-tokens Ignored Ignored Preview Jun 29, 2026 1:41pm
petrinaut Skipped Skipped Jun 29, 2026 1:41pm

@CLAassistant

CLAassistant commented Jun 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) type/eng > backend Owned by the @backend team area/apps labels Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 243 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.65%. Comparing base (93903d1) to head (eecba86).

Files with missing lines Patch % Lines
...migrations/026-add-supply-chain-types.migration.ts 0.00% 234 Missing ⚠️
...s/025-add-initial-currency-data-types.migration.ts 0.00% 8 Missing ⚠️
...s-initialized/migrate-ontology-types/currencies.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8872      +/-   ##
==========================================
- Coverage   59.76%   59.65%   -0.11%     
==========================================
  Files        1348     1350       +2     
  Lines      131800   132037     +237     
  Branches     5943     5946       +3     
==========================================
  Hits        78772    78772              
- Misses      52120    52357     +237     
  Partials      908      908              
Flag Coverage Δ
apps.hash-api 3.10% <0.00%> (-0.15%) ⬇️

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.

@vercel vercel Bot temporarily deployed to Preview – petrinaut June 17, 2026 18:18 Inactive
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 19, 2026 15:14 Inactive
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 25, 2026 10:08 Inactive
@github-actions github-actions Bot added the type/eng > frontend Owned by the @frontend team label Jun 25, 2026
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 25, 2026 10:14 Inactive
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 25, 2026 15:46 Inactive
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 26, 2026 09:51 Inactive
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 26, 2026 10:58 Inactive
@thehabbos007 thehabbos007 marked this pull request as ready for review June 26, 2026 11:02
Copilot AI review requested due to automatic review settings June 26, 2026 11:02
@cursor

cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large one-shot system-graph migration changes core ontology bootstrap and depends on strict migration ordering; failures would block or skew fresh graph initialization, but changes are additive idempotent seeds rather than runtime auth or data migration logic.

Overview
Adds system ontology migrations for a generic supply-chain model and broadens currency support used by monetary properties.

Migration 025 seeds an abstract Currency data type and one child data type per ISO 4217 code from a shared activeCurrencies list (symbols for USD/GBP/EUR/JPY/CNY/INR; others show the ISO code). This replaces the dev-only migration that only created USD, GBP, and EUR.

Migration 026 registers the supply-chain ontology: measure data types (mass, volume, area, duration, unit) with conversions; many document and master-data property types; currency-backed price/value properties wired to the seeded currency types; 19 link types; and entity types for orders, deliveries, shipments, BOMs, batches, sites, materials, customers/vendors, valuations, reservations, and related line items. It requires migration 025 and throws if a currency type is missing.

Frontend SVG icons are added for the new entity/link types. Integration test hook timeout is raised to 120s to accommodate heavier graph setup.

Reviewed by Cursor Bugbot for commit eecba86. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI review requested due to automatic review settings June 29, 2026 12:28
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 29, 2026 12:28 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel vercel Bot temporarily deployed to Preview – petrinaut June 29, 2026 12:38 Inactive
CiaranMn
CiaranMn previously approved these changes Jun 29, 2026
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 29, 2026 12:48 Inactive
Copilot AI review requested due to automatic review settings June 29, 2026 13:41
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 29, 2026 13:41 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@thehabbos007 thehabbos007 enabled auto-merge June 29, 2026 13:41
@thehabbos007 thehabbos007 requested a review from CiaranMn June 29, 2026 13:41

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eecba86. Configure here.

@thehabbos007 thehabbos007 added this pull request to the merge queue Jun 29, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 29, 2026
@CiaranMn CiaranMn added this pull request to the merge queue Jun 29, 2026
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/tests > integration New or updated integration tests area/tests New or updated tests type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

4 participants