feat(ci): add live-verification check for plugin PRs - #2386
Merged
Conversation
Type-checking/lint/prettier all pass while a plugin can still be genuinely broken - the Baka-Tsuki plugin shipped six real bugs (zero chapters, foreign-language search leakage, etc.) that none of them caught. scripts/live-check-plugin.js bundles a plugin with esbuild and runs it against the real site (popularNovels, searchNovels, parseNovel, parseChapter), classifying each step PASS/FAIL/INCONCLUSIVE so a target site being briefly down or Cloudflare-blocked never fails CI. Wired into .github/workflows/plugin-live-check.yml: runs only against plugin files changed in a PR, posts one summary comment, and only fails the check on a genuine FAIL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat(ci): add live-verification check for plugin PRs
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.
Summary
scripts/live-check-plugin.js: bundles a plugin with esbuild and runs it against the real site (popularNovels->searchNovels->parseNovel->parseChapter), classifying each step PASS/FAIL/INCONCLUSIVE..github/workflows/plugin-live-check.yml: runs the check on PRs that touchplugins/**/*.ts(excluding multisrc-generated files), posts a summary PR comment, and only fails the check on a genuine FAIL — a target site being briefly down or Cloudflare-blocked never blocks a merge.npm run check:plugin -- <path>for local use before opening a PR; documented indocs/testing.md.Motivation
tsc/ESLint/Prettier are clean on plugins that are still genuinely broken, because the sites plugins scrape are user-edited HTML with no schema. While building a new plugin I hit six real bugs (zero chapters returned, search leaking foreign-language pages, etc.) that all three tools missed — the only thing that caught them was manually bundling the plugin and running it against the live site. This wires that same live check into CI automatically, scoped to just the plugin files a PR actually touches.Test plan
bakaTsuki.ts, currently in review as feat: add Baka-Tsuki plugin (english) #2380) — all 4 steps PASSchrysanthemumgarden.ts(mutated chapter-content selector) — correctly FAILs atparseChapteronly, earlier steps still PASSnpm run lint/npm run format:checkclean🤖 Generated with Claude Code