Repository navigation
Conversation
The Supabase chapters table no longer allows anonymous reads ("permission
denied for table chapters"), so parseChapter got no chapter_content back.
parseChapter now reads the body from the site's own reader endpoint,
/api/chapters/<id>/content, which returns it as data.chapter_content. The
API-key scraping from the page scripts is removed because nothing uses it.
Bump version 2.0.1 -> 2.0.2.
…ore fetching content
[Medium impact] The PR appears safe to merge; no actionable defect was established. SummaryRestores Genesis chapter reads through the site's content endpoint.
Acknowledged by PR author RibatTRW: anonymous requests, server-side refusal for paid chapters, and the listing lock gate are intentional. RibatTRW also states that the unreleased-chapter case could not be tested against live data. Reviews (1) · Last reviewed commit: "no-mistakes(review): fix(english/genesis..." · Reviewed by Greptile |
This branch has not been deployed
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.
Intent
Fix the broken genesis source so a reader can read its chapters again, and include screenshots of the working fix in the PR.
plugins/english/genesis.ts lists and opens novels, but reading a chapter fails: the plugin's own live check fails parseChapter with
Cannot read properties of undefined (reading 'chapter_content'), while the site's Directus API answers 200 with about 77 KB. So the site is up and serving chapters - the chapter object the plugin reads simply no longer exposeschapter_content. This is one of the plugins this fleet's plugin health sweep confirmed as genuinely broken today (not a site-side block).Make sure the fix's pull request shows a photo of the plugin working correctly inside the plugin playground, and run that screenshot process headless if possible.
What Changed
parseChapternow requests/api/chapters/{id}/contentdirectly instead of scraping a Supabase key from the site's scripts and querying the Supabase chapters table. A failed response, an error payload, or missing or'None'content throws "This chapter is locked on the site".status === 'released'. Locked chapters get a/viewer/locked/{id}path, whichparseChapterrejects before any fetch.cheerioimport, addsstatusto the listing type, and bumps the plugin version from 2.0.1 to 2.0.3.Risk Assessment
Testing
Baseline and target were both run live: base reproduces the reported parseChapter failure, and target passes popularNovels, searchNovels, parseNovel and parseChapter against genesistudio.com. Adversarial scenarios (listed-locked chapter, stale /viewer/ path for a locked chapter, nonexistent id) all refuse with the locked message, and the hideLocked setting hides locked chapters. The playground was driven headless and produced three screenshots showing free chapter content, the locked refusal, and the novel chapter list. The released-status filter could not be exercised because no unreleased chapter exists on the live site. Overall result: the fix works as intended.
~/.no-mistakes/evidence/01M4ZVC32WPHMCZ39CV2EB131R/02-parse-chapter-free-chapter.png)~/.no-mistakes/evidence/01M4ZVC32WPHMCZ39CV2EB131R/03-parse-chapter-locked-refused.png)~/.no-mistakes/evidence/01M4ZVC32WPHMCZ39CV2EB131R/04-parse-novel-chapter-list.png)Evidence: Live check output on target commit
Evidence: Live check output on base commit (reproduces the bug)
Screenshots
These come from this repo's plugin playground (headless Chromium,
npm run dev:start), not from the LNReader app. The Android toolchain is not installed on the machine that made this change, so this fix has not been tested in the app. Each image shows Genesis results loaded through the playground against the live site.The listing's cover images do not load: the site's storage returns 400 for those cover URLs. That is unchanged by this fix.
Locked and released evidence
/api/chapters/101541/content(chapter 90 of Become a Legend, listedisUnlocked: false,isPaid: true) returns HTTP 401Authentication required, withchapter_content: "None". The paywall is enforced by the site, and this plugin'sparseChapterreports that refusal as a locked chapter.statusfield, and every chapter observed hasreleased(His Empire, My Revenge 5 of 5; Become a Legend 157 of 157). The listing keeps only released chapters, which restores the oldstatus=eq.releasedfilter. On the live data observed so far the filter removes nothing.AI authorship
The change, its commit messages, and this PR description were written by an AI agent (Claude Haiku 5.5) under firstmate's supervision. The captain approved the pipeline's review gate. No further human code review is recorded here.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm ci (dependency install in worktree)npm run check:plugin -- plugins/english/genesis.ts (target commit: popularNovels, searchNovels, parseNovel, parseChapter all PASS; parseChapter 9120 chars)Temporary copy of base commit 49b4727 plugins/english/genesis.ts run through npm run check:plugin (reproduces parseChapter FAIL: Cannot read properties of undefined (reading 'chapter_content')); temp file removedBundled plugin with esbuild and driver script /tmp/gdriver/run.cjs against live genesistudio.com: popularNovels (245), searchNovels, parseNovel /novels/BAL (157 chapters, 🔒 prefix matches /viewer/locked/ path for all chapters), hideLocked filter removes locked chapters, parseChapter free chapter /viewer/104793 (9453 chars), parseChapter listed-locked /viewer/locked/101543 refuses, parseChapter stale /viewer/101543 refuses via HTTP 401, parseChapter nonexistent /viewer/999999999 refuses via HTTP 404Site scan of all 245 novels' chapter listings: 33269 chapters, 18479 isUnlocked=false, 0 with status other than releasedPlayground: npx vite on 127.0.0.3:3000 (localhost mapped via Chromium host-resolver-rules, required because the dev proxy's CORS origin is hardcoded to http://localhost:3000), headless Chromium driven over CDP by /tmp/gdriver/play.mjs: Parse Chapter /viewer/104793 renders chapter text; Parse Chapter /viewer/locked/101543 on a fresh page shows 'This chapter is locked on the site'; Parse Novel /novels/BAL renders title, 157 total chapters, and Export EPUBnpm run clean:multisrc to remove generated multisrc plugin files; dev servers and headless Chromium stopped✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.