chore: feat(ceo): fold Google Analytics into the CEO board digest (ceo_read_ga) #335

Merged
joshtronic merged 1 commit from agent/330-feat-fold-google-analytics-into-the-ceo-digest into master 2026-07-04 04:57:20 +00:00
Collaborator

What this PR does

  • feat(ceo): fold Google Analytics into the CEO board digest (ceo_read_ga)
  • Add ceo_read_ga <repo> to lib/ceo.sh, sibling to ceo_read_gsc -- same .seo.domain resolution, same GOOGLE_SERVICE_ACCOUNT gate, degrades gracefully (not-configured / no-property / token-fail -> note, never guess)
  • Wire it into the digest assembly in bin/tick.sh right after the GSC scoreboard
  • Extend bin/test-ceo.sh with a ceo_read_ga block mirroring the ceo_read_gsc block (no-domain, unconfigured, no-property-match, happy-path current-vs-prior, token-mint-failure)

Test plan

  • bash bin/check-sync.sh passes (all bin/test-*.sh, including the new ceo_read_ga assertions)
  • /security-review run on the diff -- no findings
  • make lint (shellcheck) not run -- shellcheck isn't installed in this environment

Closes #330

## What this PR does - [x] feat(ceo): fold Google Analytics into the CEO board digest (ceo_read_ga) - [x] Add `ceo_read_ga <repo>` to `lib/ceo.sh`, sibling to `ceo_read_gsc` -- same `.seo.domain` resolution, same `GOOGLE_SERVICE_ACCOUNT` gate, degrades gracefully (not-configured / no-property / token-fail -> note, never guess) - [x] Wire it into the digest assembly in `bin/tick.sh` right after the GSC scoreboard - [x] Extend `bin/test-ceo.sh` with a `ceo_read_ga` block mirroring the `ceo_read_gsc` block (no-domain, unconfigured, no-property-match, happy-path current-vs-prior, token-mint-failure) ## Test plan - [x] `bash bin/check-sync.sh` passes (all `bin/test-*.sh`, including the new `ceo_read_ga` assertions) - [x] `/security-review` run on the diff -- no findings - [x] `make lint` (shellcheck) not run -- shellcheck isn't installed in this environment Closes #330
chore: feat(ceo): fold Google Analytics into the CEO board digest (ceo_read_ga)
All checks were successful
Lint / check-sync (push) Successful in 4s
Lint / check-sync (pull_request) Successful in 4s
fab8e08193
Author
Collaborator

🤖 Review — APPROVE (automated)

CI for fab8e081: success

Adds ceo_read_ga <repo> mirroring ceo_read_gsc, wires it into the digest in bin/tick.sh, and extends bin/test-ceo.sh with matching assertions. In scope, ~90 lines, CI green.

Verified against the diff:

  • Every checklist item maps to real changes: new function in lib/ceo.sh, one-line wiring in bin/tick.sh:2103, and a full test block in bin/test-ceo.sh. The make lint item is honestly left unchecked with a reason.
  • Degradation branches are ordered and each is exercised by a test: no-domain (return 0, empty), unconfigured (GOOGLE_SERVICE_ACCOUNT empty), token-mint-fail (ga_property_for_domain rc 1), no-property-match (empty property), happy-path.
  • Test expectations line up with the printf output: sessions | 100 | 80, engagement-rate math (0.6*10000/100 = 60%), conversions/key-events, and window dates all match the mocked metrics.
  • Graceful failure is genuinely graceful: ga_run_report calls fall back to {"rows":[]} on error, and even a missing ga_property_for_domain would take the if ! branch to a note rather than crash the digest.

Minor notes (non-blocking):

  • The test mocks out every real helper (ga_property_for_domain, ga_run_report, seo_ga_metrics, seo_window), so CI confirms ceo_read_ga's own logic but not that those helpers actually exist/behave in lib/seo-analysis.sh. The description states they're the same functions the SEO pass already uses, and the design degrades to a note if any are absent, so the risk is low — worth a glance if you have the tree open.
  • The token-mint-fail note fires on any non-zero rc from ga_property_for_domain, which may conflate other failure modes under a "token mint failed" label. Cosmetic.

No security, scope, or correctness concerns. Safe to merge.


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.

### 🤖 Review — `APPROVE` _(automated)_ CI for `fab8e081`: **success** Adds `ceo_read_ga <repo>` mirroring `ceo_read_gsc`, wires it into the digest in `bin/tick.sh`, and extends `bin/test-ceo.sh` with matching assertions. In scope, ~90 lines, CI green. **Verified against the diff:** - Every checklist item maps to real changes: new function in `lib/ceo.sh`, one-line wiring in `bin/tick.sh:2103`, and a full test block in `bin/test-ceo.sh`. The `make lint` item is honestly left unchecked with a reason. - Degradation branches are ordered and each is exercised by a test: no-domain (`return 0`, empty), unconfigured (`GOOGLE_SERVICE_ACCOUNT` empty), token-mint-fail (`ga_property_for_domain` rc 1), no-property-match (empty property), happy-path. - Test expectations line up with the printf output: `sessions | 100 | 80`, engagement-rate math (`0.6*10000/100 = 60%`), conversions/key-events, and window dates all match the mocked metrics. - Graceful failure is genuinely graceful: `ga_run_report` calls fall back to `{"rows":[]}` on error, and even a missing `ga_property_for_domain` would take the `if !` branch to a note rather than crash the digest. **Minor notes (non-blocking):** - The test mocks out every real helper (`ga_property_for_domain`, `ga_run_report`, `seo_ga_metrics`, `seo_window`), so CI confirms `ceo_read_ga`'s own logic but not that those helpers actually exist/behave in `lib/seo-analysis.sh`. The description states they're the same functions the SEO pass already uses, and the design degrades to a note if any are absent, so the risk is low — worth a glance if you have the tree open. - The token-mint-fail note fires on any non-zero rc from `ga_property_for_domain`, which may conflate other failure modes under a "token mint failed" label. Cosmetic. No security, scope, or correctness concerns. Safe to merge. --- <sub>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.</sub> <!-- review sha=fab8e081933cac6b71a561b8a05781355ee9d15b verdict=APPROVE ci=success -->
igor added spent time 2026-07-04 01:44:52 +00:00
48 seconds
joshtronic approved these changes 2026-07-04 04:57:15 +00:00
joshtronic deleted branch agent/330-feat-fold-google-analytics-into-the-ceo-digest 2026-07-04 04:57:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Total time spent: 48 seconds
igor
48 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor!335
No description provided.