maintenance: expand weekly guardrails, add utils.js tests, PR hygiene CI#79
Merged
maintenance: expand weekly guardrails, add utils.js tests, PR hygiene CI#79
Conversation
- weekly-tests.yml: add content-rules parity, validate-content-rules, deploy regression, news-bullet/stale-search targeted tests, teaching markdown lint, ruby toolchain check, and jekyll build to the weekly schedule so maintenance guardrails from PRs #73/#76 run continuously - tests/utils.test.js: 18 new Jest tests covering initScrollReveal (IO available + unavailable + no blocks), copyToClipboard (clipboard API, execCommand fallback, rejected clipboard, missing text, attribute variants), safeQuery/safeQueryAll (valid, no-match, invalid selector, context), and window.Utils export shape - pr-hygiene-check.yml: new workflow that warns when a dependency/security PR also changes unrelated app/content files; warning-only mode, suppress with 'mixed-changes-ok' label, flip ENFORCE=true to hard-fail - PR template: add checklist item requiring a regression test or linked follow-up issue for every accepted review finding that identifies a reproducible bug or edge case
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bff45ba799
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…fix markdownlint gating pr-hygiene-check.yml: - Use grep -c || true instead of grep | wc -l so pipefail does not exit on zero matches (was causing the CI failure on every non-dep PR) - Scan PR title only for CVE/Dependabot signals, not body — avoids false-positives on maintenance PRs that mention CVEs in context - Use grep -cv || true for unrelated file count for the same reason weekly-tests.yml: - Replace markdownlint || true with an existence check so real lint errors are not silently swallowed; step is simply skipped when no teaching files are present
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements all four maintenance items identified from the March 16–20 PR chain review (#62, #73, #75, #76, #77).
Changes Made
1. Expanded
weekly-tests.yml(was: npm test + lint only)The weekly schedule now also runs:
python3 scripts/check-content-rules-trigger-parity.py./scripts/validate-content-rules.shbash tests/deploy-script-regression.shnpm test -- --runInBand tests/news-bullet-regression.test.js tests/command-palette-stale-search.test.jsmarkdownlint-cli2over teaching contentbash scripts/check-ruby-toolchain.sh(usingruby/setup-rubywith the pinned.ruby-version)bundle exec jekyll build— exercises the Ruby+Node pipeline end-to-endAll the guardrails added in PRs #73/#76 now run continuously, not just when their source paths change.
2. New
tests/utils.test.js(18 tests)Direct Jest coverage for
assets/js/utils.jsshared utilities — previously untested:initScrollReveal(): IO unavailable → immediate fallback; IO available → observer set up and fires; no blocks → no-opcopyToClipboard(): navigator.clipboard path; execCommand fallback when clipboard missing; fallback when writeText rejects; no-text guard;data-text/data-clipboard-text/ explicit argument variantssafeQuery()/safeQueryAll(): valid selector, no match, invalid selector (warn + null/[]), context elementwindow.Utilsexport shape and backwards-compat aliasesAll 69 tests pass (18 new + 51 existing).
3. New
pr-hygiene-check.yml(warning mode)Flags PRs that mix dependency/security changes with unrelated app/content files — the pattern that let CVE+issue-closure mixing slip through in #77.
ENFORCE: false) — never blocks mergemixed-changes-oklabel on a PRENFORCE: trueto make it a hard failure once confidence is high4. PR template: regression-test / follow-up requirement
Added one checklist item:
Testing Done
npx jest --runInBand --no-coverage: 69/69 passweekly-tests.ymlscript commands verified against files present in repoType of Change
Checklist