Skip to content

ci(smoke): skip the web leg on a docs-only push, and never on a hidden red - #322

Closed
Ardnived wants to merge 5 commits into
mainfrom
ci/skip-docs-only-previews
Closed

Ardnived wants to merge 5 commits into
mainfrom
ci/skip-docs-only-previews

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Change outline

One scope step for both legs

Did Cloudflare build the <target> preview? used to run for ladle only. It now runs for both
legs and reads each Worker's trigger paths from its matrix entry (watch / ignore).

Leg watch ignore
web . (everything) \.md$|^(docs|\.claude)/
ladle unchanged unchanged

Tests and .github/ stay watched for web: a smoke-spec or CI change needs a preview.

No green over a red

The compare is per push, as Cloudflare's is. A failing code push followed by a docs-only push
would otherwise skip and turn the PR green. On synchronize, a docs-only push now skips only if
Smoke (<target>) on github.event.before concluded success. Failed, cancelled, running or
missing falls back to built=true, which is today's behaviour. On open the compare covers the
whole PR, so a PR that is docs-only from the start always skips.

Guard and docs

  • tests/guards/smoke-watch-paths.test.ts reads the ladle lists from the matrix entry. It adds a
    check that the web ignore list matches docs paths and nothing else. The file guards both legs
    now, so its name no longer says ladle.
  • docs/cloudflare-previews-ci.md documents both Workers' path rules and the ordering below.

Preview

No preview surface (CI and docs only).

Test results

  • Lean gate: ✓ (lint, typecheck, test:run: 158 files, 1652 tests), on the branch merged with main
  • Targeted specs: tests/guards/smoke-watch-paths.test.ts, 3 passed
  • Build: N/A
  • The workflow parses as YAML (Ruby YAML.load_file). The check-run lookup was run by hand
    against a merged PR's head: success for both legs, none for a missing name.

Manual verification

After merge, add these path_excludes to both wemeditate-web Workers Builds triggers
(Deploy non-production branches and Deploy default branch): *.md, docs/*, .claude/*.
Do it in the dashboard under Workers & Pages → wemeditate-web → Settings → Build → Build watch
paths, or with PATCH /accounts/{account}/builds/triggers/{trigger_uuid}.

Separately, confirm both wemeditate-design triggers include server/sitemap*. #282 added that
path to the ladle watch in CI without it. A CI list wider than the trigger is the gap
docs/cloudflare-previews-ci.md warns about.

Notes for reviewer

  • Order matters. Merge this first, then change the Cloudflare triggers. Until the triggers
    change, Cloudflare still builds docs-only pushes, and the leg just skips a preview nobody needed.
    Done the other way round, Smoke (web) waits for a build that never comes.
  • Ladle changes slightly. A docs-only push after a cancelled or failed ladle run now waits
    instead of skipping. Today it always skips, which can hide a red.
  • Sibling work: matching changes for SahajCloud (Railway watch paths) and SahajAtlasWeb, in their
    own PRs.
  • BEFORE is kept beside BASE on purpose. BASE falls back to base.sha, and the check-run
    lookup must read this push's parent or it can skip on a check that never tested this head.

🤖 Generated with Claude Code

…n red

Both smoke legs now share one scope step, with each Worker's trigger paths
in its matrix entry. The web leg ignores `*.md`, `docs/` and `.claude/`, so
once the wemeditate-web Workers Builds triggers exclude the same paths a
docs-only push no longer waits out the 12-minute discovery window.

A per-push compare could turn a PR green after a failing code push followed
by a docs-only one. On a synchronize push the step now skips only when the
previous head's own Smoke check concluded success, and otherwise runs the
leg as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-bot

sydevs-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 22:26Z address-review · attempt 1 · session · done
  • 22:26Z address-review · attempt 1 · session
  • 22:19Z review-pr · attempt 2 · session · done
  • 22:19Z review-pr · attempt 2 · session
  • 21:26Z review-pr · attempt 1 · session · timed out

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 20, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web 5be0184 Commit Preview URL

Branch Preview URL
Nov 20 2026, 10:39 PM

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor

The session for review-pr did not finish after 3 attempts. I have stopped retrying. A mention (@sydevs-bot) or a push from you starts me again.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 20, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 20, 2026
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧐 Adversarial review

The diff is no bigger than the problem, and its best part is a deletion: two env regexes become
per-leg matrix fields, so the web leg reuses the ladle machinery instead of growing its own. The
green-over-red guard is a second behaviour, but the ## Summary names it and the new skip is what
opens the hole, so it belongs here. I checked the claim it rests on, and it holds: after a failed
code push, a docs-only push falls back to built=true, discovery names nothing for the new SHA,
and get-cloudflare-preview-url.mjs then derives the branch host — which serves the last
successful build, so the specs re-run the red.

Findings

  • should-fix docs/cloudflare-previews-ci.md:122 — the fallback conditions are re-listed from
    the step's own comment. Cut the list, keep the ⚠.
  • should-fix tests/guards/ladle-watch-paths.test.ts:2 — the file now guards the web leg too;
    the name still says ladle. Rename it smoke-watch-paths.test.ts.
  • consider .github/workflows/ci.yml:142 — BEFORE is a second name for BASE everywhere it
    is read.

What was checked

  • Read whole on the branch: the smoke job in ci.yml, docs/cloudflare-previews-ci.md,
    tests/guards/ladle-watch-paths.test.ts, scripts/get-cloudflare-preview-url.mjs.
  • Ladder, on each new piece: watch/ignore replace existing env keys and add no file;
    the check-run lookup uses gh api, the step's own client.
  • name: Smoke (${{ matrix.target }}) is explicit, so new matrix keys cannot rename the check
    CHECK_NAME looks up.
  • Web ignore matches the documented Cloudflare excludes (*.md, docs/*, .claude/*).
  • No contract surface is touched. .claude/workflow.json on main has no fixture, so
    No preview surface carries no data rule, and both paths the body names are on the branch.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread docs/cloudflare-previews-ci.md Resolved
Comment thread tests/guards/smoke-watch-paths.test.ts Resolved
Comment thread .github/workflows/ci.yml Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 20, 2026
main moved the ladle WATCH list to add `server/sitemap`, while this branch
moved both lists out of `env` and into the smoke matrix. Kept the matrix
form and carried `sitemap` into the ladle entry's `watch`, so the guard
still finds every server module the Ladle build bundles.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWdGYojCpuD2nEQZdn
The four fallback conclusions live in the `Did Cloudflare build the <target>
preview?` step's own ⚠ comment. Repeating them here gave the list a second
home, so a new edge case would have to be written twice.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWdGYojCpuD2nEQZdn
The file guards the web leg's ignore list as well as ladle's, so the `ladle`
name sent a reader citing it for the web list to the wrong place.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWdGYojCpuD2nEQZdn
#282 widened the ladle `watch` to `server/sitemap` without touching the
documented trigger list, which this file's own ⚠ says changes with it. A CI
list wider than the trigger is the gap that turns `Smoke (ladle)` green on a
preview that was never built.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWdGYojCpuD2nEQZdn
@sydevs-bot

Copy link
Copy Markdown
Contributor

Merged main, addressed all three critic threads.

Merge — one conflict in ci.yml: kept the matrix form of the watch lists, carried main's new server/sitemap path into the ladle entry. af6462f

Also — #282 widened the ladle watch but not the trigger list. Recorded in the doc and in ## Manual verification. 5be0184

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 20, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 20, 2026
@Ardnived

Copy link
Copy Markdown
Contributor Author

Closing: the owner chose not to skip previews for docs-only pushes. Without Cloudflare build excludes the web leg never waits, so the CI change is unnecessary.

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants