TenantAtlas/specs/042-inventory-dependencies-graph/tasks.md

39 lines
2.0 KiB
Markdown

# Tasks: Inventory Dependencies Graph
## Schema & Data Model
- [x] T001 Define relationship taxonomy (enum or config) with display labels, directionality, descriptions
- [x] T002 Create `inventory_links` migration with unique constraint + indexes
- [x] T003 Create `InventoryLink` model + factory
## Extraction Pipeline
- [x] T004 Implement `DependencyExtractionService` (normalize references, resolve targets, create edges)
- [x] T005 Add reference parsers for `assigned_to`, `scoped_by`, `targets`, `depends_on`
- [x] T006 Integrate extraction into `InventorySyncService` (post-item-creation hook)
- [x] T007 Implement 50-edge-per-direction limit with priority sorting
## Query Services
- [x] T008 Implement `DependencyQueryService::getOutboundEdges(item, type?, limit=50)`
- [x] T009 Implement `DependencyQueryService::getInboundEdges(item, type?, limit=50)`
- [x] T010 Ensure tenant-scoping enforced at query builder level
## UI Components
- [x] T011 Add "Dependencies" section to `InventoryItemResource` ViewInventoryItem page
- [x] T012 Implement direction filter (single-select: all/inbound/outbound, default: all)
- [x] T013 Create Blade view `dependency-edges.blade.php` (zero-state, missing badge, tooltip)
- [x] T014 Add relationship-type grouping/collapsible sections
## Tests
- [x] T015 Unit: `DependencyExtractionServiceTest` (determinism, unique key, unsupported refs)
- [x] T016 Unit: `InventoryLinkTest` (unique constraint, tenant scoping)
- [x] T017 Feature: extraction creates expected edges + handles missing targets
- [x] T018 Feature: extraction respects 50-edge limit
- [x] T019 Feature: `DependencyQueryService` filters by tenant + direction
- [x] T020 UI Smoke: dependencies section renders + filter works + zero-state shown
- [x] T021 Security: tenant isolation (cannot see other tenant edges)
## Finalization
- [ ] T022 Run full test suite (`php artisan test`)
Note: Attempted; blocked by unrelated legacy test configuration error.
- [x] T023 Run Pint (`vendor/bin/pint`)
- [x] T024 Update checklist items in `checklists/pr-gate.md`