Skip to content

ci: docs-only changes take a light lane - #477

Merged
Ardnived merged 7 commits into
mainfrom
claude/ci-docs-light-lane
Nov 24, 2026
Merged

Ardnived merged 7 commits into
mainfrom
claude/ci-docs-light-lane

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

A PR that changes only a markdown guide pays the full CI bill: 12–16 minutes of lint, tests, builds, the accessibility gate, the browser lane and a preview publish for a change none of them can fail on (motivation and measurements: sydevs/SahajCloud#1265). This applies the same fix as SahajCloud#1266.

What is gated

Steps are gated, never the workflow, so every required check still reports under its own name.

  • Lint, Typecheck & Build (gate): checkout, change-scope and the Contract check always run. Every other step (setup, install, lint, typecheck, unit lane with coverage, build, size budget, ladle build, a11y gate and its Chromium restore, wrangler dry run, source-map dry run) runs only when full == 'true'.
  • Browser lane: same pattern, step-level.
  • Smoke: skipped through a new Change scope job (needs: scope plus a job-level if). A job skipped by if reports SKIPPED, which the ruleset accepts. It reads a job apart, not gate, so Smoke does not queue behind a 12 minute job, and a light PR publishes no Cloudflare preview.
  • Dependency Review is untouched and always runs.
  • scope is also fail-safe: pushes, unreadable bases and empty diffs return full=true.

What counts as light

The list is one workflow-level env: LIGHT_PATHS key, read by all three change-scope calls as ${{ env.LIGHT_PATHS }}, so there is one place to edit it. It is explicit rather than the action's default, because specs read some docs: ci-workflows.test.ts parses docs/embedding.md, docs/testing.md and docs/rules/deployment.md, and host-reset.test.ts parses docs/embedding.md. Those take the full lane. Light: AGENTS|CLAUDE|README|CHANGELOG|DESIGN_SYSTEM|STORYBOOK.md, the other docs/*.md and docs/rules/*.md, .claude/, .vscode/. A new file under docs/ takes the full lane until added to the list.

Tests

scripts/ci-workflows.test.ts pinned "no if:" on the Browser lane step, the Playwright install and the coverage step. Those pins now strip the one scope condition and still refuse any other. A new block pins the three call sites against ${{ env.LIGHT_PATHS }}, which files are and are not light, Smoke's gating, and that no paths/paths-ignore appears.

docs/testing.md’s browser-lane section claimed the lane step carries no if:. It now names the light lane’s as the only one, and says a light change greens that required check without running a scenario. The job’s own comment says the same.

sydevs/claude-workflow#314 (the change-scope action) merged as 0288c17, so uses: …/change-scope@main resolves and CI here reads it.

🤖 Generated with Claude Code

A change touching only agent guides, notes under docs/, .claude/ or .vscode/
now skips the gate, browser lane and Smoke work instead of paying 12-16
minutes for them. Steps are gated through the shared change-scope action,
never the workflow, so every required check still reports under its name.
Smoke is skipped through a small scope job. The light list leaves out the
docs that specs parse: embedding.md, testing.md and rules/deployment.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running
CI fix 1

recent dispatches
  • 19:02Z address-review · attempt 1 · session · done
  • 19:02Z address-review · attempt 1 · session
  • 18:53Z review-pr · attempt 1 · session · done
  • 18:53Z review-pr · attempt 1 · session
  • 18:33Z fix-ci · attempt 1 · session · done

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

@sydevs-bot

Copy link
Copy Markdown
Contributor

CI is red on the dependency this PR's body names, not on anything in this repo.

Lint, Typecheck & Build fails in three seconds, before a single step runs:

Can't find 'action.yml', 'action.yaml' or 'Dockerfile' for action sydevs/claude-workflow/.github/actions/change-scope@main

claude-workflow main holds one action, contract-check. sydevs/claude-workflow#314 adds change-scope and is still open. So all three Classify the change steps and the new Change scope job cannot resolve.

There is nothing to fix here. Pinning the action to #314's branch would ship a reference that has to be reverted on merge. Merge #314 first, then re-run CI here.

Change scope and Browser lane are red for the same one reason.

I pushed nothing.

🤖 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 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 24, 2026
@Ardnived
Ardnived enabled auto-merge November 24, 2026 18:49
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 24, 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 shape is right and the diff is the size of the problem: step-level gating, a cheap scope job so Smoke never queues behind the gate, an explicit light list, and full=true on every failure path. The 20 step-level if:s are what Actions makes you write, so that count is not a finding.

I checked the light list against the tree, not the body. docs/embedding.md, docs/testing.md and docs/rules/deployment.md are the only markdown files anything in src/ or scripts/ reads, all three are heavy, and nothing under .claude/ or .vscode/ is read by lint, a build or a spec. The claim holds.

Findings

  • should-fix ci.yml:52 — the regex pasted three times; one workflow-level env key replaces it and the "same list" spec.
  • should-fix ci.yml:154, 265 — "⚠ No if:, on purpose" now sits under an if:, inviting the edit that reddens the light lane.
  • should-fix docs/testing.md:408 — "no if: that could skip it" is now false of the Browser lane, and cites the spec this PR relaxed. No inline thread: that file is outside the diff.
  • should-fix ci.yml:23 — three sentences restating change-scope/action.yml's own header.
  • consider ci-workflows.test.ts:540 — a fourth read of ci.yml beside a module-level one.

What was checked

Both changed files whole on the branch. change-scope/action.yml, scope.sh and contract-check/check.sh on claude-workflow main — #314 merged as 0288c17, which is why CI is green. The ungated Contract check still passes light: it exits before its sync command when no copy changed. Light-list evidence: every readRepoSource/readFileSync in src/ and scripts/, brand.test.ts's COPY_FILES, eslint.config.js. Ladder walked for the scope job and the regex. new-pieces.mjs said NONE. No question threads.

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


Generated by Claude Code

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread scripts/ci-workflows.test.ts Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 24, 2026
The generic half sat in `change-scope/action.yml`'s own header already — steps
gated and not the workflow, `paths-ignore` leaving a check that never reports,
SKIPPED being accepted, and the `why:` anchor. A one-line pointer at that header
replaces it, so the breadcrumb stays reachable without being restated. What is
local stays: this repo's 12–16 minutes, Smoke reading the `scope` job apart, and
the ⚠ list of files our own specs parse.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZ9rdFRKKCr55AVyQa
Both install steps said "No `if:`" one line under the light lane's `if:`, so
whoever reads the file fresh deletes that condition to satisfy the comment — and
the gate then runs `pnpm exec playwright install` with no pnpm and no
node_modules on every docs-only PR. The invariant was always the restore's
outcome, never the change's scope, so each comment now says that instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZ9rdFRKKCr55AVyQa
The 321-character regex was pasted at each of the three `change-scope` calls, and
a spec block existed only to prove the copies still agreed. A workflow-level
`env: LIGHT_PATHS` is readable from `steps.*.with`, so each call site now reads
`${{ env.LIGHT_PATHS }}` and there is one place to edit. The spec pins the three
call sites against that expression instead, which also refuses a pasted literal.

The failure mode stays safe: `change-scope` returns `full=true` for a `light` it
cannot use, so a broken expression runs the full lane rather than skipping it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZ9rdFRKKCr55AVyQa
`ciWorkflow` is already this file at module scope, so the new block's own
`readRepoSource` was a fourth read into a fourth name.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZ9rdFRKKCr55AVyQa
Both the guide and the job's own comment said the lane step carries no `if:`,
which this branch made false. Each now says what is true: nothing but the light
lane's condition, and a docs-only change reports the check green without running
a scenario.

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

Copy link
Copy Markdown
Contributor

Five points, all adopted, pushed as 4e6609f. origin/main merged in clean, pushed with the work.

  • ci.yml:52 — one env: LIGHT_PATHS, all three sites read it, identical-lists assertion gone: 40aed04
  • ci.yml:154, 265 — both comments name the restore's outcome: 5a07f9e
  • ci.yml:23 — generic half cut, a pointer keeps the anchor: 5b72c8b
  • ci-workflows.test.ts:540 — reads ciWorkflow: 303b06c
  • Review body, "docs/testing.md:408 — no if: that could skip it is now false": the guide and the job comment now name the light lane's as the only condition, and say a light change greens that required check unrun: 4e6609f

Lean gate green. Body refreshed: #314 merged as 0288c17, so its ⚠ is gone.

🤖 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 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 24, 2026

@sydevs-dispatcher sydevs-dispatcher 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. 🤖 Written by the sydevs autonomous loop — see what this is

@Ardnived
Ardnived added this pull request to the merge queue Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 24, 2026
Merged via the queue into main with commit ef56895 Nov 24, 2026
78 of 84 checks passed
@Ardnived
Ardnived deleted the claude/ci-docs-light-lane branch November 24, 2026 19:18
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 24, 2026
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