Repository navigation
fix(tracking): read more fan-out shapes and report an engine whose fan-out stops - #1056
Conversation
…n-out stops
ChatGPT's query fan-out has come back empty since 2026-09-30, while its
answers still carry sources. Our parser hasn't changed since August, and
nothing noticed for two weeks: an empty field reads like an answer that ran
no search.
- Parser: read string or { query } entries in every fan-out field, add
ChatGPT's mapSearchQueries (engine 'maps'), and stop an empty
search_model_queries from hiding a populated searchQueries.
- Daily health report: each platform's share of answers with fan-out over
the last day and the 3 days before (fanout_coverage_by_platform, 00140).
An engine Cloro documents fan-out for (ChatGPT, Copilot, Perplexity) with
none for a whole day is flagged however long it has been silent; any other
platform is flagged when its share falls below a quarter of before.
- src/scripts/probe-cloro-fanout.js: one Cloro task for a platform, printing
its raw fan-out fields and what we would store, to tell an emptied field
from one that changed shape.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk ChatGPT's query fan-out has been empty since Sep 30 (Copilot-only on the Fan-out page). This PR makes the parser tolerant of a shape change, adds a fan-out section to the daily health report, and adds |
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
…alerts # Conflicts: # supabase/schema.sql
gkhngyk
left a comment
There was a problem hiding this comment.
Thanks, approving. 00140 is applied on production; execute is revoked from authenticated and anon. Over the last 24h it reads ChatGPT 0 of 1,310 answers with fan-out and Copilot 1,031 of 1,036, so the new section would flag ChatGPT today. Planned generically, the 4-day window takes 2.1 s over 20,972 rows on idx_prompt_results_created_at, fine for a once-a-day report. On the tree merged with main, schema.sql matches build-schema.sh and server tests pass (1285).
Summary
The Query Fan-out page on app.ansvisor.com shows only Copilot, although the account tracks ChatGPT, Google AI Overviews, AI Mode and Gemini too. I checked it read-only in the app, without running queries on the production database. There are two causes.
1. ChatGPT's fan-out stopped on 2026-09-30
Counts of distinct sub-queries in the app's High-frequency view for our brand:
ChatGPT sub-queries by day: Sep 22: 326, Sep 24: 315, Sep 26: 207, Sep 27: 71, Sep 28: 337, Sep 29: 72, Sep 30 to today: 0.
ChatGPT is still searching: its answer on Oct 15 cites 28 sources. Only the
searchQueriesfield stopped arriving, or arrives in a shape we drop. Ruled out:Still to do: a raw ChatGPT response from Cloro will tell whether the field is emptied or reshaped. That needs the production
CLORO_API_KEY. See the script below.2. AI Overviews, AI Mode and Gemini never had fan-out
Cloro documents no fan-out field for them. For Gemini there may be something in an undocumented
rawResponse. This is not a bug, and the UI follow-up will say so.What this PR changes
Parser (
cloro-scraper.js):{ query }objects in every field. A shape change can no longer empty a field silently, which is one of the two candidates for ChatGPT.mapSearchQueries(searches on its map) is kept, withengine: 'maps'.search_model_queriesno longer hides a populatedsearchQueries.Daily health report, new section "Query fan-out":
fanout_coverage_by_platformRPC (migration 00140): one aggregate over the window, service role only.server/src/scripts/probe-cloro-fanout.js: sends one Cloro task for a platform: the production request plusrawResponsewhere the endpoint takes it. It prints:Run:
It needs
CLORO_API_KEYand costs about 9 credits for ChatGPT.Related issue
None. Found while checking the Query Fan-out page on production.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
supabase/migrations/00140_fanout_coverage_by_platform.sql.select * from fanout_coverage_by_platform(now() - interval '1 day', now());to see answers and answers with fan-out per platform.CLORO_API_KEYset, runnode src/scripts/probe-cloro-fanout.js chatgpt-webfromserver/. Check whethersearchQueries/mapSearchQueriesare empty or reshaped, and whetherqueryLikeKeysshows queries elsewhere.Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): not applicable, no web changeyarn typecheckpasses (run fromweb/): not applicableyarn format:checkpasses (run fromweb/): not applicableAlso run:
npm run format,npm run lintandnpm test, 1182/1182. New tests:{ query }objects, map searches, an emptysearch_model_queries.supabase/build-schema.shregeneratedschema.sql.Review
I ran a code review before opening this. It found 4 things; 3 are fixed:
Left as is: map searches are stored as fan-out (tagged
engine: 'maps') and are not yet labelled in the UI. The fan-out page follow-up will show them.🤖 Generated with Claude Code