Current Behavior
Currently, at large scale, determining whether a component is direct or transitive dependency requires evaluating JSONB containment check against project.direct_dependencies. It becomes expensive for cross-project reporting and bulk analytics.
Proposed Behavior
Add IS_DIRECT to COMPONENT. This will require setting it during BOM import, can be a bulk-update for all components in a project.
All read paths can be updated by replacing JSONB containment checks with boolean filter.
New field will be nullable to avoid heavy migration for existing components and can be populated upon next bom upload/publish.
Optional: Expose the same in UI.
Checklist
Current Behavior
Currently, at large scale, determining whether a component is direct or transitive dependency requires evaluating JSONB containment check against
project.direct_dependencies. It becomes expensive for cross-project reporting and bulk analytics.Proposed Behavior
Add
IS_DIRECTtoCOMPONENT. This will require setting it during BOM import, can be a bulk-update for all components in a project.All read paths can be updated by replacing JSONB containment checks with boolean filter.
New field will be nullable to avoid heavy migration for existing components and can be populated upon next bom upload/publish.
Optional: Expose the same in UI.
Checklist