Skip to content

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

Open
thehabbos007 wants to merge 9 commits into
mainfrom
asa/supply-chain
Open

BE-610: Add migration for generic supply chain ontology#8872
thehabbos007 wants to merge 9 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.

Project Deployment Actions Updated (UTC)
petrinaut Ready Ready Preview Jun 29, 2026 10:28am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hash Ignored Ignored Preview Jun 29, 2026 10:28am
hashdotdesign-tokens Ignored Ignored Preview Jun 29, 2026 10:28am

@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 237 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.66%. Comparing base (b8f5e58) to head (cbb5a15).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...migrations/026-add-supply-chain-types.migration.ts 0.00% 228 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.77%   59.66%   -0.11%     
==========================================
  Files        1348     1350       +2     
  Lines      131787   132018     +231     
  Branches     5941     5943       +2     
==========================================
  Hits        78772    78772              
- Misses      52107    52338     +231     
  Partials      908      908              
Flag Coverage Δ
apps.hash-api 3.12% <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, ordered system-graph migrations that extend core ontology on every init; failure or ordering issues (026 requires 025 currencies) could break graph bootstrap, though changes are additive schema seeding rather than runtime logic.

Overview
Adds system graph ontology migrations for supply-chain modeling and broadens currency seeding beyond the old dev-only USD/GBP/EUR setup.

Migration 025 introduces a shared activeCurrencies list and seeds an abstract Currency data type plus one data type per ISO 4217 code (symbols for a few majors, ISO code labels for the rest). The previous 087 dev currency migration is removed in favor of this production migration.

Migration 026 is a large seed that adds measure data types (mass, volume, area, duration, unit), many supply-chain property types (quantities, dates, monetary values tied to seeded currencies), 19 link entity types, and entity types spanning orders, logistics, BOMs, inventory, valuation, and site-level material planning—with link wiring between documents, materials, sites, batches, and parties.

Also adds frontend SVG icons for the new types, bumps integration test hookTimeout to 120s (likely for heavier graph init), and adds a root flake.nix dev shell (Rust/Node/tooling).

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

@vercel vercel Bot temporarily deployed to Preview – petrinaut June 26, 2026 17:26 Inactive
CiaranMn
CiaranMn previously approved these changes Jun 26, 2026

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.

Pull request overview

Copilot reviewed 4 out of 33 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings June 26, 2026 17:32

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 06:33 Inactive
Copilot AI review requested due to automatic review settings June 29, 2026 06:52
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 29, 2026 06:52 Inactive

This comment was marked as duplicate.

@thehabbos007 thehabbos007 requested a review from Copilot June 29, 2026 07:28

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 requested a review from CiaranMn June 29, 2026 07:29
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