Skip to content

[GT-3013] Update personalized tools sync to new resources endpoints - #4574

Draft
frett wants to merge 2 commits into
developfrom
update-personalization-sync-endpoints
Draft

frett wants to merge 2 commits into
developfrom
update-personalization-sync-endpoints

Conversation

@frett

@frett frett commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The personalization API has been split into 3 endpoints, all requiring a language filter:

  • /resources/featured — also requires a country filter, no fallback behavior
  • /resources/ranked — also requires a country filter, falls back to default-order
  • /resources/default-order — language only

Changes

Require a country for the featured tools sync

  • getFeaturedTools now takes a non-null country through the API, sync task, and sync service
  • The featured tools sync is skipped when no country is selected
  • FeaturedToolsFlowProducer no longer falls back to language-only featured tools; it emits an empty list when no country is selected

Split the tool order sync into default-order and ranked endpoints

  • getToolOrder (/resources/default_order) replaced by getDefaultToolOrder (/resources/default-order, language only) and getRankedTools (/resources/ranked, language + country)
  • ToolSyncTasks gains syncDefaultToolOrder/syncRankedTools with separate stale-tracking keys
  • GodToolsSyncService.syncToolOrder fans out to both endpoints concurrently, skipping ranked when no country is selected
  • The existing ranked → default-order fallback behavior is unchanged (default-order is stored as the country = "" personalized order rows)

No DB schema changes were needed.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.24%. Comparing base (6d1b522) to head (2a78d78).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...otlin/org/cru/godtools/sync/GodToolsSyncService.kt 0.00% 6 Missing ⚠️
...kotlin/org/cru/godtools/sync/task/ToolSyncTasks.kt 88.46% 0 Missing and 3 partials ⚠️
.../cru/godtools/ui/dashboard/tools/ToolsPresenter.kt 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4574      +/-   ##
===========================================
+ Coverage    53.20%   53.24%   +0.04%     
===========================================
  Files          440      439       -1     
  Lines        11602    11595       -7     
  Branches      1969     1958      -11     
===========================================
+ Hits          6173     6174       +1     
+ Misses        4841     4836       -5     
+ Partials       588      585       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frett
frett force-pushed the update-personalization-sync-endpoints branch 2 times, most recently from 61b495b to d43e93d Compare August 25, 2026 19:17
frett and others added 2 commits August 25, 2026 13:50
The /resources/featured endpoint now requires both a language and a
country filter, with no language-only fallback behavior. Skip the
featured tools sync when no country is selected and show no featured
tools instead of falling back to language-only featured tools.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The /resources/default_order endpoint has been replaced by
/resources/default-order which only takes a language filter, and
/resources/ranked which requires both a language and country filter.
Sync default-order per-language as the fallback tool order, and ranked
per language/country as the personalized tool order.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frett
frett force-pushed the update-personalization-sync-endpoints branch from d43e93d to 2a78d78 Compare August 25, 2026 19:51
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