feat(ci): add live-verification check for plugin PRs - #1
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>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.Motivated by the Baka-Tsuki plugin work:
tsc/ESLint/Prettier were all clean while six real bugs were live (zero chapters returned, search leaking foreign-language pages). None of that is visible to a compiler when the target is a user-edited site with no schema — only actually running the plugin against the live site catches it.Private review draft on my own fork — not yet proposed to
lnreader/lnreader-pluginsupstream.Test plan
plugins/english/bakaTsuki.ts(known-good) — all 4 steps PASSchrysanthemumgarden.ts(mutated chapter selector) — correctly FAILs atparseChapteronly, earlier steps still PASSnpm run lint/npm run format:checkclean on new files🤖 Generated with Claude Code