Goal
When artifact B gets a new version via
create_artifact_version(), automatically create update recommendations for all artifacts that depend on B (found via
get_dependents()).
Acceptance Criteria
☑ create_artifact_version() calls a new _notify_dependents() helper after creating a new version
☑ _notify_dependents() uses get_dependents() to find all dependent artifacts
☑ For each dependent, a row is inserted into dedup_recommendations table with recommendation_type='version_update'
☑ Route GET /api/artifacts/{artifact_id}/update-recommendations returns pending update recommendations
☑ API route to dismiss or act on an update recommendation
Approach
Add _notify_dependents(db, new_artifact_id, old_artifact_id, reason, actor_id) function in artifact_registry.py
Call _notify_dependents() at the end of create_artifact_version()
Add GET /api/artifacts/{artifact_id}/update-recommendations route in api_routes/dedup.py
Add POST /api/artifacts/update-recommendations/{rec_id}/dismiss and act routesDependencies
get_dependents() already exists in artifact_registry.py
Work Log
2026-04-20 13:45 PT — Implementation
- Added
_notify_dependents() function to scidex/atlas/artifact_registry.py — finds dependents via get_dependents(), inserts/updates dedup_recommendations rows with recommendation_type='version_update'
- Called
_notify_dependents() at end of create_artifact_version() before returning
- Added three API routes to
api_routes/dedup.py:
-
GET /api/artifacts/{id}/update-recommendations -
POST /api/artifacts/update-recommendations/{id}/dismiss -
POST /api/artifacts/update-recommendations/{id}/act
- Note: Remote branch commits 2323be1b2, 93d18920a, 9cbe02eea had SQLite regressions and could not be merged; this implementation is fresh from current main