fix(prefetch): recurse parts-catalogs trees to full depth #117

Merged
root merged 1 commits from dev into main 2026-06-09 17:24:12 +03:00
Owner

isLeafLinkPath flagged EVERY pcat node as a leaf (any pcat: linkPath), so the
backfill worker fetched a mid-group folder's "parts" — a 1-level drill that
only revealed its sub-groups — and never recursed. Deep pcat trees (whose top
level is ~100% folders) were left one level shallow: no parts seeded, so the
new tree part-counts stayed 0 and the cross-tree catalog search (DB-only) found
nothing on a freshly decoded vehicle. Exactly why serkan's Ford Mondeo looked
like an empty catalog.

Use the captured hasSubgroups flag: a pcat node is a parts leaf only when it is
NOT a known parent group. Folders now queue a children job and the existing
recursion (queueCategoryJob → processChildren → getChildren) drills to full
depth (MAX_DEPTH=5), seeding parts at every leaf. The rolling backfill rescan
warms existing shallow vehicles wave by wave; new decodes warm deep via the
reactive schedulePrefetch. Rate limiter + PCAT_PACE + backlog guard keep it
bounded (all env-tunable to ramp).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

isLeafLinkPath flagged EVERY pcat node as a leaf (any pcat: linkPath), so the backfill worker fetched a mid-group folder's "parts" — a 1-level drill that only revealed its sub-groups — and never recursed. Deep pcat trees (whose top level is ~100% folders) were left one level shallow: no parts seeded, so the new tree part-counts stayed 0 and the cross-tree catalog search (DB-only) found nothing on a freshly decoded vehicle. Exactly why serkan's Ford Mondeo looked like an empty catalog. Use the captured hasSubgroups flag: a pcat node is a parts leaf only when it is NOT a known parent group. Folders now queue a children job and the existing recursion (queueCategoryJob → processChildren → getChildren) drills to full depth (MAX_DEPTH=5), seeding parts at every leaf. The rolling backfill rescan warms existing shallow vehicles wave by wave; new decodes warm deep via the reactive schedulePrefetch. Rate limiter + PCAT_PACE + backlog guard keep it bounded (all env-tunable to ramp). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
root added 1 commit 2026-06-09 17:24:02 +03:00
fix(prefetch): recurse parts-catalogs trees to full depth
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
79bbd1f1b3
isLeafLinkPath flagged EVERY pcat node as a leaf (any pcat: linkPath), so the
backfill worker fetched a mid-group folder's "parts" — a 1-level drill that
only revealed its sub-groups — and never recursed. Deep pcat trees (whose top
level is ~100% folders) were left one level shallow: no parts seeded, so the
new tree part-counts stayed 0 and the cross-tree catalog search (DB-only) found
nothing on a freshly decoded vehicle. Exactly why serkan's Ford Mondeo looked
like an empty catalog.

Use the captured hasSubgroups flag: a pcat node is a parts leaf only when it is
NOT a known parent group. Folders now queue a children job and the existing
recursion (queueCategoryJob → processChildren → getChildren) drills to full
depth (MAX_DEPTH=5), seeding parts at every leaf. The rolling backfill rescan
warms existing shallow vehicles wave by wave; new decodes warm deep via the
reactive schedulePrefetch. Rate limiter + PCAT_PACE + backlog guard keep it
bounded (all env-tunable to ramp).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
root merged commit 7c32730788 into main 2026-06-09 17:24:12 +03:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: root/sase.tr#117