Repository navigation
Conversation
The Smoke job built, uploaded and smoked a preview for every push, including ones that touched only Markdown, `docs/` or `.claude/`, which nothing in the build or the smoke lane reads. Such a push now takes a third quiet state, `docs`, beside `fork` and `queue`. On a later push of the same PR the skip also needs the previous head's own Smoke check to have passed, so a docs-only push cannot put a green check over a red one for the same code. A failed, empty or 300-file compare publishes as usual, and a missing secret stays loud. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
The session for review-pr did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The feature is right-sized and the safety work is its best part: failing toward publishing, the predecessor-green condition and the stated annotation each close a masking path. Two things to weigh. The logic landed in YAML, where this repo's convention is a scripts/*.mjs with a spec beside it — and the new tests show the strain, asserting the step's text rather than its behaviour. And the measurement counts whole PRs (7 of 80 docs-only) while the mechanism fires per push, so the figure cited neither bounds nor justifies the per-push skip. The per-push rate is what decides whether this pays its rent.
Findings
should-fix—docs_onlybelongs inscripts/, where its cases become assertions (.github/workflows/ci.yml:215)should-fix— the predecessor rule now has three homes (docs/testing.md:44)consider—DOCSis named for documentation but covers.claude/config and hooks (.github/workflows/ci.yml:211)
What was checked
All three files whole, plus the smoke job and the on: block. The ladder: on.pull_request.paths-ignore is workflow-level and would skip the gate job too, and a path-skipped required check never reports — the platform has no answer here, so that held. scripts/ does: seven assert-*/check-* helpers each with a .test.ts, one already run by this job. DOCS reaches nothing the build or smoke lane reads — no .md or .claude/ path is read by src/, public/, vite.config.ts or tests/smoke/ — so the quiet skip is sound. Guards walked: a failed, empty or 300-file compare, a cancelled or absent predecessor, and merge_group all reach publish or queue. checks: write on the job already covers the new check-runs read. smoke: is the last job, so slicing to EOF still sees only it. No contract surface touched, and the diff touches no preview surface.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The skip was twenty lines of bash and two API calls inside `ci.yml`, which no spec can execute — so the new assertions regexed the step's text, and the eight cases run by hand lived only in the pull-request body. This repo's convention is a `scripts/*.mjs` with a spec beside it, and this job already runs one. `scripts/plan-preview.mjs` now owns the question, with the reads injected, so `plan-preview.test.ts` holds every case: both directions of the pattern, an empty and a capped compare, each predecessor conclusion, the newest run, this installation's run alone, the base the lookup asks about, and a refused read. All eleven assertions were watched fail under mutation. The step runs after the checkout, because a script is a repo file. The step above still decides first, so a merge-queue entry and a fork pay for nothing; an `unread` push pays one checkout and skips the install, the build, the upload and the specs. It reads through `gh`, so the credential is the one every other API call in this job already carries. The pattern is `UNREAD_BY_CI` rather than `DOCS`, and the state `unread` rather than `docs`: it also covers `.claude/`, which is config and hook code, and the report told a reader "only documentation" for a hooks push. What makes the skip safe is that nothing CI runs reads any of it. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZNrU2ZZJTqj1wPYo1
The invariant carried the predecessor rule and the green-over-red argument a second time, beside the same two sentences in `ci.yml`. A fact gets one home, and prose never restates config. The bullet names the state and the script; the script's docblock owns both guards. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZNrU2ZZJTqj1wPYo1
|
All three adversarial-review threads adopted, in 04119ad and 2a041ce.
The review body's measurement had no thread: 7-of-80 counts PRs, while the skip fires per push. The body now calls it a floor. The decision also ran live, six cases in the body. Lean gate: lint, typecheck, 2170 tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
Closing: the owner chose not to skip previews for docs-only pushes. This job publishes its own preview and never waited, so the skip saved only a few CI minutes. |
Summary
scripts/plan-preview.mjsdecides whether theSmokejob publishes a preview. A push whose every changed file matchesUNREAD_BY_CI((^|/)[^/]*\.md$|^(docs|\.claude)/) is reported asunread, and the install, build, publish, check-run and smoke steps skip; the report step annotates it and exits 0.ci.ymlcould be asserted only as text — which is what the first draft's tests did. With the two reads injected,scripts/plan-preview.test.tsholds every case as an assertion instead.Smokecheck run to have concludedsuccess. A failed, cancelled or missing predecessor publishes as usual, so anunreadpush can't put a green check over a red one.publish. The question is asked only once publishing is otherwise possible, so a missing secret stays loud and forks are untouched..claude/, which is config and hook code. So the state isunreadand the annotation reads "only files the build and the smoke lane do not read".tests/and.github/stay out of it on purpose, because changing either is what the smoke lane is for.queue,forkandno-credentialsfirst, so a merge-queue entry and a fork pay for no setup at all. The script is a repo file, so it runs afteractions/checkout: anunreadpush pays one checkout and skips everything after it. It reads throughgh, so the credential is the one every other API call in this job already carries.scripts/ci-workflows.test.tsholds the quiet set (fork/queue/unread) against the reasons the script exports, pins this job's check name against the script's own constant, and pins that the job still runs the script — the one thing no spec of the script can see.docs/testing.mdnames the state and points at the script rather than restating its guards.What it saves, measured. 7 of the last 80 merged PRs were docs-only. That is a floor, not the rate: the skip fires per push, and a docs-only push inside a mixed PR skips too. The per-push rate is not measured.
Test results
.claude/skills/pr-prep/check.sh): lint, typecheck and 2170 unit tests pass.tests/, an empty compare counted as unread, a capped compare trusted, the predecessor's conclusion ignored, another app's check run accepted, the oldest run read instead of the newest, the lookup moved to the head, the catch removed, the check name renamed, the report case renamed back todocs, and therun:line dropped.gh:5eb5621(opened) and0ce1c81(reopened) →unread.f315e96(code) and this PR's own head →publish.publish.synchronizewhose predecessor's ownSmokerun concludedsuccess→unread.Smokecheck — every recent commit onmaincarries a green one. That branch is covered by the spec in both directions, and the field shapes it reads (conclusion,started_at,app.slug) were confirmed against a real response.unreadrun of this job. This PR changes.github/andscripts/, so its own run publishes as usual.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjZNrU2ZZJTqj1wPYo1