Loop generator: Familiarity never finds own trails (track search filters author by user id, index uses actor id) #75
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer#75
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the #73 browser acceptance run (2026-11-06, live https://wanderer.bearoverse.com, test user
claude_test, source read fromorigin/deployc48b528d).Summary
The loop generator's Familiarity panel never finds the user's own trails, so "Prefer known trails" / "Prefer new trails" has no effect: the panel always says "No nearby trails found — familiarity bias not applied."
Cause:
web/src/lib/stores/activity_tracks_store.ts(activityTracksNear) filters the Meilisearchtrailsindex withauthor = "${user.id}", the user record id. The index storesauthoras the ActivityPub actor id ($currentUser.actor). Other callers already use the actor id, e.g.routes/lists/edit/[id]/+page.svelte(author = ${$currentUser?.actor}). The unit test only checks that the filter containsauthor =, so it misses this.Repro
claude_testthis is "TEST Cap Ferrat coastal loop", planned (not completed), start 43.693486, 7.332852.Expected
POST /api/v1/search/trailsreturns the user's nearby trail, and the candidates show "N % on known trails" and are re-ranked.Actual
The request filter is
author = "rlbmwdc6h8c26hi" AND _geoRadius(43.693486, 7.332852, 1432) AND completed = false, whererlbmwdc6h8c26hiis claude_test's user id. It returns 0 hits, and the panel shows "No nearby trails found — familiarity bias not applied." The same query with the actor idekcamvokwuhieugreturns the trail (1 hit). "Completed & planned" also returns 0 hits.Check of the rest of the feature: when the test rewrote the author to the actor id (test-side only,
page.route), everything after the search worked. Candidates showed "6 % / 11 % on known trails", and switching "Prefer known" → "Prefer new" moved each score by 2 × 25 × strength × share (+3.0 and +5.7 vs +3.0 and +5.5 expected from the rounded shares). So the fix should only need the filter to useuser.actor(plus a unit test that asserts the actor id).Evidence
/root/tools/wanderer-shots/acceptance/out/t8c-familiarity-planned-stub-panel.png(BRouter was stubbed for this UI-only step, which is why it also shows "Couldn't generate a loop")/root/tools/wanderer-shots/acceptance/out/t8-live-2026-11-06.json(checks 8e, 8f)/root/tools/wanderer-shots/acceptance/t8_loop_panels.mjsRefs #73.
🤖 Generated with Claude Code
Fixed by #77 (Familiarity search filters by actor id). Live since 2026-11-06 14:2x (web deploy-e5a57df8, hf #924). Acceptance t8 on live: 8e finds own trails without the test-side workaround; 14/14 PASS. Tested on the preview first (#60).
🤖 Generated with Claude Code