Skip to content

test(visual): stop content and API drift from repainting baselines - #5706

Merged
elevatebart merged 6 commits into
mainfrom
elevate-bot/inspiring-rubin-izpdgj
Sep 23, 2026
Merged

elevatebart merged 6 commits into
mainfrom
elevate-bot/inspiring-rubin-izpdgj

Conversation

@elevatebart

@elevatebart elevatebart commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Three things moved the screenshot baselines, and only one of them was the CSS the suite exists to watch. Blog-Index has the most refreshes in the snapshot history, and none of them were about layout.

Dated content

SNAPSHOT_CUTOFF, a new optional server env field, filters every date-sorted blog list the sampled pages can render: WhatsNew.astro and blogs/[category].astro (blogs, external blogs, tutorial videos), fetchSecondaryData behind the /plugins/core* pages, and the orchestration fallback list. beforeCutoff is a pass-through when the var is unset, which is everywhere except the snapshot workflow, so the site keeps rendering its full content.

The workflow sets it to 2026-09-17. A date-only value resolves to midnight UTC, so the one post dated 2026-09-17T10:00:00 falls outside it and the sample runs current through 2026-09-16T13:00. Pass a full timestamp if you want a day inclusive.

Live API

/plugins, /blueprints and the community metrics are read at request time, so a plugin release repainted them. The snapshot workflow now builds and screenshots against scripts/api-fixture-server.mjs, which Lighthouse already used, with its own FIXTURE_PATHS adding the endpoints the sampled SSR routes need: /plugins/definitions/*, /plugins/metadata*, /plugins/pluginsInformation*, /plugins/artifacts/*, /plugins/*/versions, /versions, /communities/github/*.

isRecorded grew an inner wildcard matching a single path segment, so /v1/plugins/<fqcn>/versions can be recorded without /v1/plugins* swallowing the schema fetches sitting next to it. Trailing-* prefixes behave exactly as before.

Anything recorded during a run is committed with the refreshed baselines. workflow_dispatch gained a refresh_api_fixtures box; ticking it clears the whole directory, including the ~300 blueprint detail responses only Lighthouse reads, which its next run re-records into an artifact to commit. Called out in the input description and the fixtures README.

Incidental content

/docs renders the four newest posts through WhatsNew, where the blog list is not what that baseline is for. A stylesheet injected via stylePath pins the cards to their thumbnail height and blanks the copy, so bumping the cutoff moves Blog-Index and leaves Docs-Landing alone.

Keeping the cutoff honest

The date only moves when someone moves it, so the run reports its age to the job summary, warns past 90 days and fails past 180. Both windows are job env vars. The check runs last, so a neglected cutoff still gets its baselines refreshed and committed before the job goes red.

Verified

Dispatched on this branch (run 35364764388): the fixture server served 360 replays with zero errors, proving the SSR routes under wrangler dev reach it, and recorded the 11 endpoints the widened paths added. 13 baselines moved, and the four Plugin-* pages did not, the recorded data matching what was live. Local builds with the cutoff set come back clean, server bundle included. 422 unit tests pass, oxlint clean.

What to expect

Quiet nightlies until the CSS actually changes or someone bumps the date, and a nag on the run once the date ages. The trade is that the sampled content ages with it, so a card redesign that only triggers on newer frontmatter would not show up until the next bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or

Three sources moved the screenshot baselines, only one of them being the
CSS the suite exists to watch.

Dated content: a SNAPSHOT_CUTOFF env var, set by the snapshot workflow
alone, filters the blogs, external blogs and tutorial videos the /blogs
and /docs pages sort by date. Unset everywhere else, so the site renders
its full content as usual.

Live API: the snapshot workflow now builds and screenshots against
scripts/api-fixture-server.mjs, which Lighthouse already used, with its
own FIXTURE_PATHS covering the endpoints the sampled SSR routes read.
The matcher grew an inner wildcard so /v1/plugins/<fqcn>/versions can be
recorded without /v1/plugins* swallowing the schema fetches beside it.

Incidental content: /docs renders the four newest posts through
WhatsNew, where the blog list is not what that baseline is for, so a
stylesheet pins the cards and blanks their copy for that screenshot.

Expect one refresh PR as the cutoff lands, then quiet until the CSS
actually changes or someone bumps the date.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

☁️ Cloudflare Worker Preview Deployed!

🔗 https://ks-elevate-bot-inspiring-rubin-iz-docs.kestra-io.workers.dev
🔗 https://859373e3-docs.kestra-io.workers.dev

🔦 Lighthouse Benchmark

Tested on 2026-09-23 09:34 UTC  ·  links point to https://ks-elevate-bot-inspiring-rubin-iz-docs.kestra-io.workers.dev
Compared against main baseline from 2026-09-23
Runner CPU index per shard: 4254, 2484, 2625, 2501 (baseline: 2496, deltas hidden on 10 page(s))

Scores (0–100, higher is better)

Page Performance Accessibility Best Practices SEO
Home 96 84 77 92
Get Started 95 83 77 100
Pricing 96 92 77 100
Enterprise 97 83 77 100
Cloud 93 81 77 100
Features 93 92 77 92
About Us 97 91 77 100
Docs Landing 89 88 77 92
Contribute to Kestra (simple docs) 97 88 77 92
Flow (full featured docs) 93 90 77 92
Blog Index 99 91 77 100
Blog Post (sample) 96 88 77 100
VS Page (sample) 97 88 77 100
Plugins Landing 96 81 77 92
Plugin Page (sample) 95 🟢 +13 88 77 100
Plugin Debug Page (sample) 96 88 77 100
Plugin Debug Return Page (sample) 79 88 77 100
Blueprints Landing 85 91 77 100
Blueprint Audit Logs CSV Export 85 🔻 -10 92 77 100

Core Web Vitals (lower is better)

Page LCP FCP TBT CLS Speed Index
Home 1.21 s 0.58 s 15 ms 0.000 1.29 s
Get Started 1.46 s 0.61 s 2 ms 0.000 1.03 s
Pricing 1.04 s 0.64 s 132 ms 0.000 1.04 s
Enterprise 1.21 s 0.57 s 0 ms 0.003 1.02 s
Cloud 1.60 s 0.61 s 99 ms 0.049 0.91 s
Features 1.16 s 0.75 s 151 ms 🔻 0.000 1.17 s
About Us 1.16 s 0.64 s 60 ms 0.000 1.01 s
Docs Landing 1.20 s 0.57 s 215 ms 0.001 1.27 s
Contribute to Kestra (simple docs) 1.10 s 0.57 s 78 ms 0.000 0.98 s
Flow (full featured docs) 1.05 s 0.69 s 173 ms 0.000 🟢 1.24 s
Blog Index 0.95 s 0.54 s 0 ms 0.000 0.80 s
Blog Post (sample) 1.29 s 0.60 s 83 ms 0.004 0.75 s
VS Page (sample) 1.14 s 0.58 s 56 ms 0.000 🟢 1.10 s
Plugins Landing 1.03 s 0.63 s 129 ms 0.000 1.13 s
Plugin Page (sample) 1.01 s 0.69 s 155 ms 🟢 0.000 1.12 s
Plugin Debug Page (sample) 0.88 s 0.57 s 140 ms 0.000 0.97 s
Plugin Debug Return Page (sample) 0.97 s 0.57 s 402 ms 0.000 1.47 s
Blueprints Landing 2.35 s 0.78 s 84 ms 0.000 1.48 s
Blueprint Audit Logs CSV Export 1.02 s 0.70 s 253 ms 🔻 0.000 1.88 s
Legend

🟢 improved  ·  🔻 regressed  ·  (blank) no significant change
Score threshold: ±10 pts  ·  Metric threshold: ±30% of baseline

Median of repeated runs: Home x5, About Us x3, Docs Landing x5, Flow (full featured docs) x3, Plugins Landing x3, Blueprints Landing x3. A single run of these swings 20+ points between runners.
The sample is measured across 4 parallel runners, so each page carries its own CPU index (Lighthouse's benchmarkIndex). Lighthouse does not normalise for host CPU, so a page's deltas are hidden when its runner differs from the baseline's by more than 10%.

View full Lighthouse HTML report for a page

Full per-page Lighthouse Results (LHR) are attached as the lhr-reports-shard-* artifacts on this run. Download and unzip one, then open https://googlechrome.github.io/lighthouse/viewer/ and drop the <page>-lhr.json file into the page to see every audit, opportunity, and diagnostic.

Keeps the sampled blog content current up to 2026-09-16T13:00.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or
Brings in the bootstrap removal and the 43 baselines it refreshed.

Docs-Landing-desktop was the only conflict, both sides having redrawn
it: took main's, since its version carries the bootstrap removal and
this branch's only carries the WhatsNew mask. The next snapshot run
reapplies the mask on top.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or

@iitzIrFan iitzIrFan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. This goes after the actual causes of baseline churn, and it fits the existing setup: it reuses the fixture server and startup steps from lighthouse.yml, declares SNAPSHOT_CUTOFF like the other env settings, and puts snapshotCutoff.ts next to its test in the same style as the other utils. I checked out the branch: the new path matching handles exact, trailing-* and inner-* paths correctly (/v1/plugins/core is still not recorded, /v1/plugins/<fqcn>/versions is), and the new tests pass.

Approving. The inline notes are non-blocking suggestions, fine here or in a follow-up.

Comment thread src/utils/snapshotCutoff.ts
Comment thread .github/workflows/update-linux-snapshots.yml
Comment thread .github/workflows/update-linux-snapshots.yml
Review follow-up. Neither list moves a baseline today, but both would
later, which is the drift this branch exists to stop:

- fetchSecondaryData feeds the /plugins/core* pages from the posts
  carrying a `plugins:` frontmatter. None do yet; the first one would.
- The orchestration fallback shows the 4 newest posts matching the tool
  name. /orchestration/ansible only escapes it by having curated
  resources, so sampling a page without them brings the drift back.

Also spells out in refresh_api_fixtures that ticking it drops the
blueprint detail responses only Lighthouse reads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or
Review follow-up. Nothing moves SNAPSHOT_CUTOFF on its own, and a date
drifting months into the past only showed up in the body of a refresh PR
nobody had to read. The run now says it: a warning past 90 days, an
error and a red job past 180.

It runs last, so a neglected cutoff still gets its baselines refreshed
and committed before the job fails, and it reports the age to the job
summary either way. Both windows are env vars on the job.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHRsDvXNS9LLTVhdmjA8or
@elevatebart
elevatebart merged commit fadc808 into main Sep 23, 2026
11 checks passed
@elevatebart
elevatebart deleted the elevate-bot/inspiring-rubin-izpdgj branch September 23, 2026 09:30
@github-project-automation github-project-automation Bot moved this from To review to Done in Pull Requests Sep 23, 2026
elevatebart pushed a commit that referenced this pull request Sep 23, 2026
Snapshots taken from main wholesale: this branch never touched them, so the
baselines #5706 repainted come across untouched.

Two real conflicts, both resolved by keeping each side:

- tests/visual-regression.spec.ts: main's per-page stylePath and this branch's
  maxDiffPixelRatio sit in the same options object but do different jobs. The
  odiff matcher implements stylePath (loadScreenshotStyles in its dist), so the
  combined call works.
- update-linux-snapshots.yml: both sides append to the generated PR's body, the
  cutoff/fixture note and the diff-report link. No reason to pick a favourite.

The report step still runs before the commit step, which is the one ordering
constraint that matters: after the commit there is nothing left to diff against.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PStmR9iSDAvvDSV7rD6DyA

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants