Skip to content

2608 Phase 0: conversion instrumentation + bin/record-baselines - #489

Merged
pftg merged 9 commits into
masterfrom
phase-0-followups
Aug 20, 2026
Merged

2608 Phase 0: conversion instrumentation + bin/record-baselines#489
pftg merged 9 commits into
masterfrom
phase-0-followups

Conversation

@pftg

@pftg pftg commented Aug 20, 2026

Copy link
Copy Markdown
Member

2608 Phase 0 — the two items every later phase depends on

Swarm-built (two isolated worktree agents), coordinator-reviewed, Codex-gated.
Draft on purpose: master is currently owned by another session (Paul,
2026-08-20) — do not merge until cleared.

0.1 Conversion instrumentation

  • generate_lead on contact / free-consultation form submit (data-lead-form,
    one-shot per pageview — the form targets _blank and stays populated).
  • cta_click with location param: hero / section / blog-index / tag-index /
    article-end via data-cta-location; blog CTA band partial now takes the
    location string as its arg. Follows the contact_cta_click precedent.
  • scroll_depth 25/50/75/90 on blog posts only (named to avoid colliding with
    enhanced measurement's built-in 90% scroll).
  • Zero visual diff (verified on rendered output); all events build-time guarded
    off localhost like the existing GA block.

Manual GA4 admin steps remaining (property 328508492): un-mark page_view
as key event; mark generate_lead (+ contact_cta_click) as key events;
DebugView pass per 20.01 §0.1.

0.2 bin/record-baselines <glob>...

Closes the CLAUDE.md automation candidate (manual dance done 3× on
2026-08-14). Records, keeps only requested baselines, restores the rest —
including rm-ing created untracked ones; reconciles the tree even when the
test run exits red; NUL-delimited porcelain parsing (space-safe,
--untracked-files=all); --dry-run preview; --linux prints the CI
dispatch instead of recording locally (ARM-drift lesson).

Review trail

core-coder + ruby-coder in isolated worktrees → coordinator 4-eyes (found the
untracked-restore crash) → Codex "ship with fixes": 2 majors (restore-on-
failure, porcelain parsing) + generate_lead one-shot applied; auxclick
scope consciously matched to the existing precedent.

For the master-owning session

test/fixtures/screenshots/macos/desktop/homepage/_clients.png is stale ON
MASTER (Jul 21 recording; card order since changed — fails identically on a
clean master checkout). Not fixed here to avoid crossing lanes:
bin/record-baselines 'macos/desktop/homepage/_clients.png' from this branch
does it in one command once merged.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 45cb9bfa-2a51-416d-8f27-78dd1b44c9a8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

pftg added a commit that referenced this pull request Aug 20, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pftg
pftg marked this pull request as ready for review August 20, 2026 16:06
pftg added a commit that referenced this pull request Aug 20, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pftg
pftg force-pushed the phase-0-followups branch from 7742bcb to 029fc62 Compare August 20, 2026 16:07
pftg and others added 9 commits August 20, 2026 18:24
FORCE_SCREENSHOT_UPDATE=true rewrites all baselines; accepting only a
subset previously meant copying files out, git checkout -- the rest,
and restoring the copies by hand (done 3x manually on 2026-08-14).

bin/record-baselines <path-or-glob>... runs the record, keeps only
baselines matching the given paths, and restores everything else via
git checkout --. --dry-run shows the keep/restore split without
running tests. --linux does not record locally (ARM Docker plants
false drift per .okf/log.md 2026-08-20) — it prints the CI dispatch
command instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…s fix)

A record run can create new PNGs (a new test's first baseline). Those show
as untracked in porcelain, and 'git checkout --' on an untracked path errors
- under set -e that killed the script mid-restore, leaving a half-restored
tree. Non-kept untracked files are now rm'd instead. Verified via dry-run
with a synthetic modified+untracked pair.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…croll depth)

Phase 0.1 of the 2608 rollout plan - the site gets its first real
conversion events, all inside the existing dev-guarded GA4 block
(page/analytics.html), following the contact_cta_click precedent:

- generate_lead on contact / free-consultation form submit. The form
  posts to an external service, so a delegated submit listener keys on
  a new data-lead-form attribute on partials/page/contact-form.html.
- cta_click with a location param via data-cta-location: blog CTA band
  (blog-index / tag-index / article-end, passed as the cta-band partial
  arg) plus the two homepage free-consultation buttons (hero / section).
- scroll_depth 25/50/75/90 on blog posts only (single.html pages,
  gated .IsPage + Section blog). Milestones are consumed once each;
  listener removes itself after 90.

Zero visual diff: attributes + head scripts only. Manual GA4-admin
steps remain: un-mark page_view as key event, mark generate_lead
(and contact_cta_click) as key events, verify in DebugView.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…nerate_lead one-shot

codex verdict was ship-with-fixes; the two majors and one minor applied:

- record-baselines: a red test no longer skips the restore pass - rake exit
  status is captured, the tree is reconciled either way, and the script
  exits with the original status.
- Porcelain parsing goes NUL-delimited with --untracked-files=all: paths
  with spaces survive (git C-quoting bypassed) and a record run that creates
  a whole new baseline directory is enumerated file-by-file instead of one
  '?? dir/' entry rm -f can't remove. Keep-glob semantics (case patterns:
  '*' crosses '/') documented at the parse site.
- generate_lead gets a per-pageview one-shot guard: the form targets _blank
  so it stays populated, and a double-submit would double-count the lead.

Declined consciously: auxclick coverage for cta_click - the existing
contact_cta_click precedent has the same primary-click-only scope, and
matching the precedent beats forking it (both can widen together later).
Verified: dry-run with a modified baseline + an untracked space-named file
in a new directory - kept 1, restored 1, tree clean after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
/blog/tags/* became primary navigation in phase 2.1 but had zero screenshot
coverage - a bundle changed blind. Desktop + mobile tests mask .blog-post
(rows churn with tagging) and .blog-lead (live post count); the chrome under
test is the eyebrow, tag-name H1, and filter pills with the active state.
Baselines recorded via bin/record-baselines (its first real outing - kept 1,
restored 0, exactly as designed, both legs).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three consecutive 3-day Clarity windows swing 25-75% scroll depth on blog
pages - a single-window pre/post read would be noise. 40.01 locks the
protocol: 28-day session-weighted windows (before = ~46.0%/35.3s), per-post
segmentation, read due 2026-09-17, after-clock starts at first successful
production deploy of f80de80.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ure after

Per-phase engagement gates retired - the blog is rebuilt in full and ONE
28-day session-weighted measure (40.01 protocol) runs against the rebuilt
whole. Plan and status tables updated so agents read the new truth.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pftg
pftg force-pushed the phase-0-followups branch from 029fc62 to 63673fc Compare August 20, 2026 16:25
@pftg
pftg merged commit f3f9353 into master Aug 20, 2026
6 checks passed
@pftg
pftg deleted the phase-0-followups branch August 20, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant