Repository navigation
ci: a docs-only change takes the light lane - #340
Conversation
Classify the change with sydevs/claude-workflow's change-scope action. When every changed file is markdown, under docs/, .claude/ or .vscode/ (docs/DESIGN_SYSTEM.md excepted, which a guard test reads), gate keeps install and the prettier check and skips the rest, and smoke skips preview discovery and its specs. Steps are gated, not the workflow or the matrix job, so every required check still reports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
CI is red for one reason, and it is not in this repo. All three required checks died in under five seconds, at The runner resolved Nothing here can fix it. Pinning the action to #314's branch would only need reverting. Merge sydevs/claude-workflow#314, then re-run CI on this PR. I pushed nothing. The diff itself reads correct against #314's action: the path, the 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The shape is right and no bigger than the problem: two jobs, one shared action, steps gated rather than the workflow or a matrix job — the trap this repo's required checks would fall into. The central claim holds: docs/DESIGN_SYSTEM.md is the only prose file anything in CI reads, so widening light to all markdown and docs/ is safe today.
Two things undercut it. The light lane keeps a step that cannot check any file able to reach that lane, and that step is the only reason install stays on it. And the file calls its light input the action's default when it is a widening of it, which hides the one decision here worth reviewing.
Findings
- should-fix
ci.yml:80—prettier --check .covers no file the light lane can carry, and holds install there. - should-fix
ci.yml:37— the comment, and the body, invert what changed aboutlight. - should-fix
docs/cloudflare-previews-ci.md:14— the new bullet restates the regex, the steps and the fallbacks. - should-fix
ci.yml:160— the regex is hand-typed twice, held equal by a comment. - consider
ci.yml:264— a light run leaves both smoke summaries empty. - consider
ci.yml:168— the ladle scope step is the other path classifier, left outside the new owner.
What was checked
ci.yml and docs/cloudflare-previews-ci.md whole on the branch; change-scope's action.yml and scope.sh on claude-workflow main (#314 merged as 0288c17, so the body's ⚠ is satisfied). Grepped every reader of a markdown, docs/ or .claude/ path: only tests/guards/design-tokens.test.ts. git ls-tree — docs/ is all markdown, .vscode/ untracked. Read .prettierignore and the lint script. new-pieces.mjs says NONE, so no streamliner ran; I walked the ladder instead. No question threads, no preview links, no earlier critic review.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`prettier --check .` covered no file that can put a PR on the light lane: .prettierignore excludes `*.md` and `.claude/`, `docs/` holds only markdown, and `.vscode/` is untracked. It was also the only reason pnpm, node and install stayed on that lane. Gate all three on `full` and drop the step, as the `smoke` job already does. The light `gate` is now checkout plus classify. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4TqxVvLNPAXcahCX
The default is `.claude/` and `.vscode/` — neither markdown nor `docs/`. The input is that default widened and then narrowed by one file, and the comment read as if only the narrowing happened, hiding the one decision here worth reviewing. The action's own warning puts the risk of widening on the repo that does it, so the comment now names the widening first. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4TqxVvLNPAXcahCX
Both jobs typed the regex out, held equal by a comment. A workflow-level `env:` holds it once and both `with:` blocks read it, so the comment goes away and so does the drift it was guarding against. The explanation of what the regex covers moves to the value. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4TqxVvLNPAXcahCX
A light change skipped every step that writes `$GITHUB_STEP_SUMMARY`, so all three required checks went green with nothing in them, and the action leaves only an annotation. #184 named that shape: a skip must never look like a pass. Each job now writes one line saying what did not run, and the quiet cases the missing-preview step counts go from three to four. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4TqxVvLNPAXcahCX
The bullet restated the regex's conditions, the step inventory and the full-lane fallbacks, all of which live in `ci.yml` and the action's `scope.sh`. Prose keeps the intent and the pointer. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW4TqxVvLNPAXcahCX
|
All six threads of the adversarial review are answered, pushed as Adopted:
Rebutted:
Lean gate: ✓ lint, tsc, 1763 tests. Body refreshed. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
There was a problem hiding this comment.
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
Why
A PR that changes only docs or agent files still ran the whole gate (ESLint, typecheck, unit tests, Ladle build, wrangler dry run) and both smoke legs, 12-16 minutes for a change nothing builds or tests reads. See sydevs/SahajCloud#1265. This applies the same fix as sydevs/SahajCloud#1266.
What changes
Both jobs start with
sydevs/claude-workflow/.github/actions/change-scope@main, which outputsfull.Lint, Typecheck & Unit(gate): everything after the classify step is gated on full — pnpm setup, node, install, both contract checks,pnpm lint, typecheck,test:run, the a11y summary,ladle:build,check:wrangler. No formatter runs on the light lane either:.prettierignoreexcludes*.mdand.claude/,docs/holds only markdown, and.vscode/is untracked, soprettier --check .could only ever read files a light PR left alone.Smoke (web)/Smoke (ladle): checkout and the scope step run in the job; the ladle-built check, pnpm setup, install, preview discovery, the specs, the results summary and the missing-preview report are gated on full. A docs-only PR builds no Cloudflare preview, so it no longer waits out discovery's timeout.Dependency Reviewis not gated.No workflow-level
pathsand no job-levelifon the smoke matrix: a skipped matrix job reports under its unexpanded nameSmoke (${{ matrix.target }}), which would not satisfy the requiredSmoke (web)andSmoke (ladle). Every required check still reports, green.LIGHT_PATHSat workflow level holds the regex once, read by both jobs through theenvcontext. It widens the action's default —.claude/and.vscode/— to every markdown file and everything underdocs/, then narrows outdocs/DESIGN_SYSTEM.md, whichtests/guards/design-tokens.test.tsreads and holds tolayouts/tailwind.css. The action leaves prose out of its default because a repo's tests may read it, so that widening is the one decision here worth reviewing: nothing else in this repo reads markdown,docs/,.claude/or.vscode/. The regex is extended (no lookahead), so the exception goes by final letter; a file named*M.mdtakes the full lane, which errs safe.tests/guards/ladle-watch-paths.test.tsstill findsWATCHandIGNORE, which are unchanged.A push, an unreadable base or an empty diff runs the full lane. Also noted in
docs/cloudflare-previews-ci.md.⚠ Merge order
sydevs/claude-workflow#314 (adds the
change-scopeaction) had to merge first, and has, as0288c17.uses: ...change-scope@mainresolves now.🤖 Generated with Claude Code