Skip to content

[Refactor] Centralize automation recommendation ownership - #1357

Draft
roomote-roomote[bot] wants to merge 1 commit into
developfrom
refactor/automation-recommendation-boundary-2zg1xh6605wgh
Draft

[Refactor] Centralize automation recommendation ownership#1357
roomote-roomote[bot] wants to merge 1 commit into
developfrom
refactor/automation-recommendation-boundary-2zg1xh6605wgh

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Created by Roomote. View the task or mention @roomote-roomote for follow-up asks.

What changed

  • Moved recommendation catalog policy, scoring copy, schedules, and Cookbook prompts out of the shared types package into the server-owned SDK domain.
  • Split queue ownership and initial-run lifecycle from signal collection and scoring jobs while preserving the existing server exports.
  • Centralized setup recommendation input preparation, persistence, application, dispatch, and stale-worker fencing in the SDK; setup tRPC commands now authenticate and delegate.
  • Added client-safe title hydration so recommendation batches persisted before this refactor continue to render the same labels without a migration or catalog-version bump.

Why this change was made

The automation recommendation feature introduced in #1321 had policy and lifecycle behavior spread across shared contracts, a large SDK runtime module, and setup command orchestration. Consolidating that ownership gives future recommendation work one server domain and prevents stale scoring workers from replacing a newer recommendation batch.

Impact

There is no intended user-facing behavior change. Recommendation scoring, setup application, manual-run validation, and initial-run dispatch retain their existing behavior, while the feature has clearer ownership and focused regression coverage. The repository pre-push gates pass; package-local SDK ESLint still reports three pre-existing unused-disable warnings in unrelated files.

@roomote-community

roomote-community Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • Hydrate legacy recommendation titles in the onboarding response before it seeds the client cache.

Reviewed 3cfac8b

'recommendation_queue_unavailable',
);
}
await dispatchSetupAutomationRecommendationBatch({

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.

The new title hydration only happens through the recommendation SDK commands, but this onboarding path still returns the raw persisted startResult.recommendationBatch. SetupSignedInFlow uses that response to seed listRecommendations directly, so an existing pre-refactor batch with no title bypasses listSetupAutomationRecommendations() and renders candidateId values in the setup step. Hydrate the returned batch (or source it through the SDK read helper) before returning it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant