feat: add GSC top-query/top-page breakdown to the CEO board digest #401
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Total time spent: 40 seconds
Due date
igor
40 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!401
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/399-ceo-gsc-read-add-top-query-top-page-breakdown-so"
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?
What this PR does
ceo_read_gscto pullquery- andpage-dimension GSC data for the current 28-day window and render top-10-by-impressions tables (impressions/clicks/CTR/position) for eachbin/test-ceo.sh'sceo_read_gscblock: mockgsc_querydispatches on the dimension arg, assert the top-queries/top-pages tables and concentration line render, and that an empty/failed breakdown fetch degrades to per-table "no data" notes without touching the aggregate scoreboard or crashingTest plan
bin/test-ceo.shpasses (24 new/updated assertions in theceo_read_gscblock)make testpasses (check-sync + everybin/test-*.sh)shellcheckclean onlib/ceo.shandbin/test-ceo.sh(verified viamake lint's full run: zero findings on either changed file; the two pre-existing warningsmake lintreports are on unrelated files --bin/test-automerge.shandbin/tick.sh-- and are present onmasterbefore this change)Closes #399
🤖 Review —
APPROVE(automated)CI for
f49c44c1: successAdds a query/page breakdown (top-10 by impressions + a top-5 concentration line) to
ceo_read_gsc, with matching test coverage. Focused, in scope (~90 lines), CI green.Correctness spot-checks (all consistent with the asserted test output):
_ceo_gsc_render_top: sorts by-.impressions, top-N, rendersctr*10000|round/100andposition*100|round/100. Forinstall widget(ctr 0.1 →10%, pos 3) the output matches the| install widget | 400 | 40 | 10% | 3 |assertion. Empty.rows→_no <label> data this cycle_, matching the empty-breakdown assertions._ceo_gsc_concentration: top-5 impressions 400+300+200+150+100 = 1150 of 1200 → 95.83%, across 6 rows — exactly the asserted line.$tot == 0branch degrades to the "no query data this cycle" note.IFS=$'\t'read correctly preserves multi-word keys ("install widget").query/pagedim) are independent of the aggregatedate-dim fetch and each degrade to their own note, so an empty/failed breakdown leaves the scoreboard intact — verified by the "empty breakdown -> scoreboard still numbers" assertion. Token-mint failure returns before the breakdown, soTop queriesis absent (asserted).Robustness note (non-blocking):
sort_by(-.impressions)/.ctr * 10000will throw on a row with nullimpressions/ctr; the2>/dev/null || trueswallows it into an empty-rows "no data" note rather than a crash or partial render. Acceptable — real GSC responses include these fields — but if malformed rows ever appear you'd silently show "no data" instead of the surviving rows. Not worth blocking.Checklist honesty: every checked item maps to a real change in the diff (render helper, concentration signal, prose nudge, and the extended
test-ceo.shblock including the empty-breakdown and token-fail degradation cases). Test-plan claims are consistent withsuccessCI.Nothing blocking. Clean, well-tested, honestly described.
Independent review by the harness on
claude-opus-4-8(effort: high). The human reviewer is requested once Igor has reviewed; a human still merges.