refactor: add neverReenrich support and clean up worker structure#3837
refactor: add neverReenrich support and clean up worker structure#3837
Conversation
… neverReenrich logic
This comment was marked as spam.
This comment was marked as spam.
3 similar comments
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
…ve deprecated onboarding script
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
1 similar comment
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Note
Medium Risk
Touches enrichment selection criteria and cache invalidation semantics (including SQL query conditions), which can materially change which members/orgs get enriched and when. The remaining changes are mostly refactors/moves but could introduce runtime wiring issues if any imports/Temporal schedule IDs drift.
Overview
Adds
neverReenrichsupport across member and organization enrichment sources: service/type contracts now allowcacheObsoleteAfterSecondsto be optional whenneverReenrichis enabled, cache-obsolescence checks short-circuit whenneverReenrichis true, and enrichment candidate queries (fetchMembersForEnrichment,fetchOrganizationsForEnrichment) treat such sources as enrich-once by only selecting entities with no existing cache row.Refactors
members_enrichment_workerstructure by splitting LLM helpers intoactivities/llm.ts, consolidating member-related activities (including OpenSearch sync) intoactivities/member.tsand removingactivities/syncEnrichedData.ts, routing workflows to import from the newactivitiesbarrel, and renaming/rewiring the top-level enrichment trigger workflow fromgetMembersToEnrichtotriggerMembersEnrichmentwith schedules separated (newrefreshMembersEnrichmentMaterializedViewsschedule file). Also removes the onboarding script and its package scripts.Written by Cursor Bugbot for commit 4710c1d. This will update automatically on new commits. Configure here.