Repository navigation
ci: docs-only changes take a light lane - #477
Conversation
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]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
CI is red on the dependency this PR's body names, not on anything in this repo.
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.
I pushed nothing. 🤖 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 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-levelenvkey replaces it and the "same list" spec. - should-fix
ci.yml:154,265— "⚠ Noif:, on purpose" now sits under anif:, inviting the edit that reddens the light lane. - should-fix
docs/testing.md:408— "noif: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 restatingchange-scope/action.yml's own header. - consider
ci-workflows.test.ts:540— a fourth read ofci.ymlbeside 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
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
|
Five points, all adopted, pushed as 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 |
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 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-scopeand 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 whenfull == 'true'.Browser lane: same pattern, step-level.Smoke: skipped through a newChange scopejob (needs: scopeplus a job-levelif). A job skipped byifreports SKIPPED, which the ruleset accepts. It reads a job apart, notgate, so Smoke does not queue behind a 12 minute job, and a light PR publishes no Cloudflare preview.Dependency Reviewis untouched and always runs.scopeis also fail-safe: pushes, unreadable bases and empty diffs returnfull=true.What counts as light
The list is one workflow-level
env: LIGHT_PATHSkey, read by all threechange-scopecalls 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.tsparsesdocs/embedding.md,docs/testing.mdanddocs/rules/deployment.md, andhost-reset.test.tsparsesdocs/embedding.md. Those take the full lane. Light:AGENTS|CLAUDE|README|CHANGELOG|DESIGN_SYSTEM|STORYBOOK.md, the otherdocs/*.mdanddocs/rules/*.md,.claude/,.vscode/. A new file underdocs/takes the full lane until added to the list.Tests
scripts/ci-workflows.test.tspinned "noif:" 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 nopaths/paths-ignoreappears.docs/testing.md’s browser-lane section claimed the lane step carries noif:. 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-scopeaction) merged as0288c17, souses: …/change-scope@mainresolves and CI here reads it.🤖 Generated with Claude Code