From 0eccf2429c16136aeb7bfb22974b9720cee5ed3d Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 6 Nov 2026 21:27:33 -0500 Subject: [PATCH 1/4] docs: keep the plan, research, agent notes, ADRs and metrics off the docs site --- docs/_config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/_config.yml b/docs/_config.yml index 662e804..314ef6f 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -16,5 +16,13 @@ defaults: values: layout: "default" +# Project-internal notes live in the repository, not on the site. exclude: - .gitignore + - Gemfile + - Gemfile.lock + - adr/ + - agents/ + - plans/ + - research/ + - metrics.md From fa833f66193aee5415300791cd4af344d05d7c59 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 6 Nov 2026 21:27:33 -0500 Subject: [PATCH 2/4] docs: drop the modernization plan reference from CONTRIBUTING --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 15e52f6..098294a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ Here are a couple of guidelines that will help you contribute. Before we get sta ### Things to keep in mind * Smaller PRs are likely to be merged more quickly than bigger changes. -* Every merge needs maintainer review. Feature/community PRs wait until the modernization coverage work is done (see the plan); they are not merged before that gate. +* Every merge needs maintainer review. * This project is using [Semantic Versioning 2.0.0](http://semver.org/) ## Branching and releases From 0823c6549e53da76b565a2085041073a9b0e4870 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 6 Nov 2026 21:27:33 -0500 Subject: [PATCH 3/4] docs: add a public-text rule to the coding standards --- docs/agents/coding-standards.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/agents/coding-standards.md b/docs/agents/coding-standards.md index d5f20db..c402389 100644 --- a/docs/agents/coding-standards.md +++ b/docs/agents/coding-standards.md @@ -27,6 +27,22 @@ Human PR/process stays in `CONTRIBUTING.md`. Use **[Conventional Commits](https://www.conventionalcommits.org/)**. Each message is **1–3 lines** total (subject plus at most a short body). Prefer the type that matches the change (`fix`, `feat`, `docs`, `test`, `chore`, `refactor`, `ci`, `build`). Omit `Co-authored-by` and similar trailers. +## Public text + +Public text is anything a user of the library reads: `README.md`, `CONTRIBUTING.md`, `SECURITY.md`, the +docs site pages, comments in `src/` (they ship in `dist/`), GitHub release notes, security advisories, +and issue, PR and drupal.org comments. + +- Write it so it makes sense without the internal notes in `docs/plans/`, `docs/research/`, + `docs/agents/` and `docs/adr/`. Those may be removed or condensed later. +- Don't mention plan phases ("Phase 8"), internal finding IDs (`W1`, `D-09`, `SER-18`, `IFR-122`), + `it.fails` records or probes. Name the behavior, the version, the GHSA or CVE ID, or the GitHub + issue instead. +- Don't link to `docs/plans/` or `docs/research/`. An ADR link is fine where its reasoning helps a + contributor. +- The docs site (`docs/` on `main`) excludes those folders in `docs/_config.yml`. Keep a new + internal folder or file out of it the same way. + ## Tests - **Names:** BDD-style — behavior in plain language (`describe` / `it` or the runner's equivalent), e.g. when X, it should Y. From a8e341167b6e4d582a0bfb3b1d82993705a9e122 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 6 Nov 2026 21:42:26 -0500 Subject: [PATCH 4/4] ci: run the required checks on docs-only PRs and skip their slow steps --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dca9499..1e67ca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,9 @@ on: push: branches: [main] paths-ignore: ["docs/**", "**/*.md"] + # No paths-ignore on pull requests: a skipped workflow never reports the required checks, which + # blocks the merge. The `changes` job skips the slow steps instead when only docs changed. pull_request: - paths-ignore: ["docs/**", "**/*.md"] concurrency: group: ci-${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -15,8 +16,33 @@ permissions: contents: read jobs: + # code is "false" for a pull request that only changes docs/ or Markdown files. + changes: + runs-on: ubuntu-latest + timeout-minutes: 2 + outputs: + code: ${{ steps.diff.outputs.code }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 2 + - name: Check for changes outside docs + id: diff + run: | + if [ "$GITHUB_EVENT_NAME" != "pull_request" ]; then + echo "code=true" >> "$GITHUB_OUTPUT" + elif git diff --name-only HEAD^1 HEAD | grep -qvE '^docs/|\.md$'; then + echo "code=true" >> "$GITHUB_OUTPUT" + else + echo "Only docs changed: lint and format:check run, the build and suites are skipped." + echo "code=false" >> "$GITHUB_OUTPUT" + fi + test: + needs: changes runs-on: ubuntu-latest + env: + CODE: ${{ needs.changes.outputs.code }} steps: - name: Set timings file path run: echo "TIMINGS=$RUNNER_TEMP/timings.tsv" >> "$GITHUB_ENV" @@ -32,13 +58,16 @@ jobs: npm ci - name: Get Playwright version id: playwright + if: env.CODE == 'true' run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT" - name: Cache Playwright browsers + if: env.CODE == 'true' uses: actions/cache@v6 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }} - name: Install Chromium + if: env.CODE == 'true' run: | start=$(date +%s) trap 'printf "%s\t%s\n" "Install Chromium" "$(($(date +%s) - start))" >> "$TIMINGS"' EXIT @@ -64,16 +93,19 @@ jobs: trap 'printf "%s\t%s\n" "npm run format:check" "$(($(date +%s) - start))" >> "$TIMINGS"' EXIT npm run format:check - name: npm run build + if: env.CODE == 'true' run: | start=$(date +%s) trap 'printf "%s\t%s\n" "npm run build" "$(($(date +%s) - start))" >> "$TIMINGS"' EXIT npm run build - name: vitest run --coverage + if: env.CODE == 'true' run: | start=$(date +%s) trap 'printf "%s\t%s\n" "vitest run --coverage" "$(($(date +%s) - start))" >> "$TIMINGS"' EXIT npx vitest run --coverage --reporter=default --reporter=json --outputFile.json=vitest-report.json - name: Check committed dist matches the build + if: env.CODE == 'true' run: | start=$(date +%s) trap 'printf "%s\t%s\n" "Check committed dist matches the build" "$(($(date +%s) - start))" >> "$TIMINGS"' EXIT @@ -95,8 +127,11 @@ jobs: } >> "$GITHUB_STEP_SUMMARY" # The suite against the jQuery support floor, the latest 3.x, and 4.x. + # Branch protection requires each matrix check by name, so a docs-only PR skips the steps, not the + # job: a job skipped by `if` reports one unexpanded "jQuery ${{ matrix.jquery }}" check instead. jquery: name: jQuery ${{ matrix.jquery }} + needs: changes runs-on: ubuntu-latest timeout-minutes: 10 strategy: @@ -106,26 +141,35 @@ jobs: - { jquery: "1.7.2", file: ".jquery/jquery-1.7.2.js" } - { jquery: "3.7.1", file: "node_modules/jquery/dist/jquery.js" } - { jquery: "4.0.0", file: "node_modules/jquery4/dist/jquery.js" } + env: + CODE: ${{ needs.changes.outputs.code }} steps: - uses: actions/checkout@v7 + if: env.CODE == 'true' - uses: actions/setup-node@v7 + if: env.CODE == 'true' with: node-version-file: .nvmrc cache: npm - run: npm ci + if: env.CODE == 'true' - name: Get Playwright version id: playwright + if: env.CODE == 'true' run: echo "version=$(node -p "require('playwright/package.json').version")" >> "$GITHUB_OUTPUT" - name: Cache Playwright browsers + if: env.CODE == 'true' uses: actions/cache@v6 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }} - run: npx playwright install chromium + if: env.CODE == 'true' - name: Fetch jQuery 1.7.2 - if: matrix.jquery == '1.7.2' + if: env.CODE == 'true' && matrix.jquery == '1.7.2' run: scripts/fetch-jquery.sh 1.7.2 - name: Run the suite on jQuery ${{ matrix.jquery }} + if: env.CODE == 'true' run: npx vitest run --project suite env: JQUERY_FILE: ${{ matrix.file }}