Fix gemini candidate starvation
build-push / docker (push) Successful in 4m7s

This commit is contained in:
GHStaK
2026-03-17 16:06:59 +09:00
parent 139e8f8781
commit 91ee37593c
4 changed files with 70 additions and 7 deletions
+24
View File
@@ -655,6 +655,30 @@
- If behavior in the browser does not match the latest backend/frontend code, the first assumption should be stale frontend assets until proven otherwise
## Recent Change Log
- Date: `2026-03-17`
- What changed:
- Fixed a search-budget regression where source collection could consume the full `SearchService` deadline and leave no time for Envato / Artgrid enrichment, causing Gemini to see only missing or low-value visuals.
- Split the search-service deadline into:
- collector deadline
- enrichment deadline with an explicit reserved window
- Added unit coverage for the new deadline split behavior.
- Stopped frontend preview-probe fallback from calling `/api/download/preview` for Artgrid items that do not already have a provider preview URL, so unsupported `yt-dlp` Artgrid probe errors no longer fire just from opening or hovering those results.
- Why it changed:
- The user-provided log `ai-media-hub-2026-03-17T07-01-21-282Z.log` showed:
- `search_service:deadline_reached`
- immediate `search_service:enrich_start` -> `search_service:enrich_complete`
- `withPreview: 0`
- `withLowValueThumbnail: 12`
- repeated `candidate has no thumbnail or preview video`
- final warning `gemini vision returned no candidate evaluations`
- The same log also showed Artgrid preview probe failures from `yt-dlp` returning `Unsupported URL`, which were not helping user-facing preview behavior.
- How it was verified:
- `pwsh -NoProfile -File scripts/selftest.ps1`
- added Go tests for the search/enrichment deadline split helper
- What is still risky or incomplete:
- This preserves time for enrichment, but it does not guarantee that every live Envato / Artgrid page yields a usable preview URL.
- Artgrid still depends on backend-enriched provider preview URLs for true video preview; if no provider preview is discovered, the UI will still fall back to thumbnail-only rendering.
- Date: `2026-03-17`
- What changed:
- Added repo-local Windows 11 PowerShell workflows: