Skip to content

ci(preview): skip the preview steps on a docs-only push - #1234

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

Docs-only PRs and pushes stop waiting on a Railway preview that is never coming.

  • Railway side: the SahajCloud service gets watch paths that leave out **/*.md, docs/**, .claude/** and .agents/** (recorded in DEPLOYMENT.md's settings table). Focused PR Environments is already on for the project, so a docs-only PR then deploys neither the app nor its Postgres. This is a service setting, not a file, because Railway stops reading Config as Code on 2026-12-01 (chore(deploy): drop railway.toml; the Railway service holds its settings #1179).
  • CI side: a new Did Railway deploy this push? step compares the push (or the whole PR, on open) against the same list. When nothing deployable changed it skips discovery, the address, the fixture wait and smoke, instead of waiting out discovery's 12-minute timeout.
  • What the guard gives: on a docs-only push to a PR that already has code, it skips only when the commit before the push passed Lint, Test & Smoke, so a red or cancelled run is never turned green by a README fix. It is not proof smoke ran: that job also goes green with the lane skipped when no preview was discovered, so a skip is as un-smoked as the run before it and no worse.

tests/ and .github/ are deliberately not excluded: a smoke-spec or CI change needs a preview.

Rollout

The watch paths go on production's service after this merges, because a PR environment copies production's settings when Railway creates it. Applied before the merge, docs-only pushes would wait 12 minutes until it lands. Open PR environments keep their old copy.

Verification

🤖 Generated with Claude Code

The SahajCloud service gets watch paths that leave docs out, so Railway's
Focused PR Environments no longer deploy the app or its Postgres for a
docs-only push. CI checks the same list first, so it no longer waits out
discovery's 12-minute timeout for a deploy that never comes.

A docs-only push skips only when the commit before it passed this job, so
a red smoke run followed by a README fix still has to pass again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@railway-app

railway-app Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1234 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Nov 20, 2026 at 10:37 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot

sydevs-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 22:24Z address-review · attempt 1 · session · done
  • 22:24Z address-review · attempt 1 · session
  • 22:17Z review-pr · attempt 1 · session · done
  • 22:17Z review-pr · attempt 1 · session
  • 16:41Z review-pr · attempt 3 · 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
@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

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 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 the size of the problem: one guarded step, two if: conditions, and the documentation for a setting that lives off-repo. Nothing is smuggled in. The ladder found no piece the repo or the platform already has — paths-ignore cannot serve, because this job is a required check and a skipped one never reports (#903), and the repo carries no changed-files action to reuse. The DOCS regex duplicating a dashboard setting is intrinsic, and DEPLOYMENT.md's ⚠ is the right answer; nothing in-repo can enforce it. The one real gap is the no-masking claim, which rests on a job conclusion this repo twice documents as not meaning smoke ran.

Findings

  • should-fix — ci.yml:113: a green Lint, Test & Smoke does not prove smoke ran, so the guard claims more than it gives.
  • should-fix — RAILWAY_RUNBOOK.md:222: the new paragraph restates DEPLOYMENT.md and the step comment, and its last sentence contradicts this section's own caveat.
  • consider — ci.yml:100: git diff on the existing checkout would drop the compare API's 300-file cap.

What was checked

  • .github/workflows/ci.yml whole on the branch, DEPLOYMENT.md § Service settings, RAILWAY_RUNBOOK.md § CI & Preview Environments.
  • Regex against watch paths, pattern by pattern. .agents exists on the branch, so no dead entry.
  • Every || deployed path under bash -eo pipefail: an empty or ≥300 count, grep -Ev exiting 1, and last | .conclusion // "" on an empty or in-progress check list all reach deployed=true.
  • tests/unit/turbopack-build-cache.spec.ts, the one path the body names, is on the branch. No ## Preview link, so no fixture check.
  • No contract surface: CI and docs only.

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


Generated by Claude Code

Comment thread .github/workflows/ci.yml Resolved
Comment thread RAILWAY_RUNBOOK.md 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
A green `Lint, Test & Smoke` does not mean smoke ran: the lane skips and
the job stays green whenever no preview was discovered, which ci.yml's own
warning and RAILWAY_RUNBOOK.md both document. The guard on the previous
commit's conclusion therefore catches a red or cancelled run, never an
un-smoked green one, and the comment claimed the wider protection.

Narrowed rather than tightened to read the previous run's smoke step: a
run with no preview would then stop the skip, which is the 12-minute wait
this PR exists to remove.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZDLyEn6BLNeXCMGu7
The dropped sentences restated DEPLOYMENT.md's watch-path block and the
step comment in ci.yml, and the last one claimed a protection the section's
own opening paragraph contradicts: a skipped smoke lane reads as "unit and
integration passed", never "smoke passed". The runbook carries what the
workflow cannot show, which is the setting and where it lives.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZDLyEn6BLNeXCMGu7
The 300-file cap read as a workaround. It is the price of not fetching full
history: this job checks out the PR merge ref at depth 1, so `git diff`
between the two SHAs resolves nothing without `fetch-depth: 0` on every run,
and the cap only engages where `deployed` is already the right answer.

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

Copy link
Copy Markdown
Contributor

All three threads addressed. main merged in cleanly first, so the gate ran on the merged tree.

  • ci.yml:113 — f38dffa narrows the ⚠ to what the conclusion gives: a red or cancelled predecessor is caught, a green one is no proof smoke ran.
  • RAILWAY_RUNBOOK.md:222 — 2f93a5f cuts the paragraph to the fact and its DEPLOYMENT.md pointer.
  • ci.yml:100 — 15f4c80 records the compare API as a choice, not a workaround.

The Summary's third bullet is retitled to match the narrowed claim.

Lean gate green: lint, format, both typechecks, 3841 unit tests. Security review skipped — no changed path matches the trigger. Docs checked, nothing stale.

🤖 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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1234 November 20, 2026 22:34 Destroyed
@Ardnived

Copy link
Copy Markdown
Contributor Author

Closing: the owner chose not to skip previews for docs-only pushes. The watch paths were the only cause of CI waiting, and docs-only previews cost cents now that previews sleep after CI.

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1234 — 15f4c808 Deployed Nov 20, 2026 by railway-app[bot]
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