From b38dfe54e8e175dce54cf04892b7e79b66009737 Mon Sep 17 00:00:00 2001 From: Sulthan Zaki Date: Sat, 22 Aug 2026 18:26:34 +0700 Subject: [PATCH] Record per-site probe provenance in completed fixtures (#168) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spec review flagged the live-verification acceptance criterion as unproven in the diff: the brief's adapter rule wants the probe recorded, not just the date. Each fixture comment now names how the live body was fetched on 2026-08-22 — curl probe for asura, demonic and lightnovelworld; cleared Chrome tab (CDP sidecar) for comix, kagane and novelfull, including the challenge/403 fallback story for novelfull. Also renamed lnwCompletedRe to lnwStatusRe for symmetry with the other site-marker vars. --- backend/internal/latest/sites.go | 4 +-- backend/internal/latest/sites_test.go | 42 ++++++++++++++------------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/backend/internal/latest/sites.go b/backend/internal/latest/sites.go index b23d1b1..5289346 100644 --- a/backend/internal/latest/sites.go +++ b/backend/internal/latest/sites.go @@ -437,10 +437,10 @@ func novelfullCompleted(_, body string) bool { // whole body is scanned and the comment marker is not required, unlike // lnwLatestChapter: the status block sits ahead of the visitor-writable // thread, and hiatus maps to a distinct PotentialActionStatus value. -var lnwCompletedRe = regexp.MustCompile(`"creativeWorkStatus"\s*:\s*"https://schema\.org/CompletedActionStatus"`) +var lnwStatusRe = regexp.MustCompile(`"creativeWorkStatus"\s*:\s*"https://schema\.org/CompletedActionStatus"`) func lnwCompleted(_, body string) bool { - return lnwCompletedRe.MatchString(body) + return lnwStatusRe.MatchString(body) } // siteCompletedFrom reports whether the Site calls this work completed, via diff --git a/backend/internal/latest/sites_test.go b/backend/internal/latest/sites_test.go index 833f82a..40d3926 100644 --- a/backend/internal/latest/sites_test.go +++ b/backend/internal/latest/sites_test.go @@ -193,21 +193,22 @@ const lnwSeriesFixture = ` // from the consts and must answer false. // Trimmed from https://asurascans.com/comics/solo-leveling (301 to -// /comics/solo-leveling-b60d532c) fetched 2026-08-22. The astro-island props -// are HTML-escaped in the served document, so the quotes arrive as ". +// /comics/solo-leveling-b60d532c) fetched 2026-08-22 by a curl probe from +// this machine. The astro-island props are HTML-escaped in the served +// document, so the quotes arrive as ". const asuraCompletedFixture = ` "bookmarkCount":[0,39128],"status":[0,"completed"],"type":[0,"manhwa"] ` // Trimmed from https://asurascans.com/comics/chronicles-of-the-demon-faction-f886a8af -// fetched 2026-08-22. +// fetched 2026-08-22 by a curl probe. const asuraOngoingFixture = ` "bookmarkCount":[0,54027],"status":[0,"ongoing"],"type":[0,"manhwa"] ` // Trimmed from https://demonicscans.org/manga/Solo-Leveling fetched -// 2026-08-22. The info block is sloppy: bare
  • s inside a
    , label and -// value as a sibling pair. +// 2026-08-22 by a curl probe. The info block is sloppy: bare
  • s inside a +//
    , label and value as a sibling pair. const demonicCompletedFixture = `
  • Status
  • @@ -216,7 +217,7 @@ const demonicCompletedFixture = ` ` // Trimmed from https://demonicscans.org/manga/Catastrophic-Necromancer -// fetched 2026-08-22. Same block, ongoing value. +// fetched 2026-08-22 by a curl probe. Same block, ongoing value. const demonicOngoingFixture = `
  • Status
  • @@ -224,12 +225,12 @@ const demonicOngoingFixture = `
    ` -// Trimmed from https://comix.to/title/q77m-countach fetched 2026-08-22 over a -// cleared Chrome tab (the in-tab fetch of the Series URL, the same -// server-rendered payload the poll reads). The served page escapes the query -// map keys as \u0022; the fixture carries the decoded form, which parses to -// the same key. The recommended strip on this very page carries a finished -// entry; only the ["manga","detail","q77m"] entry counts. +// Trimmed from https://comix.to/title/q77m-countach fetched 2026-08-22 by a +// cleared Chrome tab (the CDP sidecar: the Series URL is fetched in-tab, the +// same server-rendered payload the poll reads). The served page escapes the +// query map keys as \u0022; the fixture carries the decoded form, which +// parses to the same key. The recommended strip on this very page carries a +// finished entry; only the ["manga","detail","q77m"] entry counts. const comixCompletedFixture = `` // Trimmed from https://comix.to/title/n8we-dungeons-and-crayons fetched @@ -238,14 +239,15 @@ const comixCompletedFixture = `` -// Trimmed from GET https://kagane.to/api/v2/series/019c29c3-5abd-70e6-9efc-1f1f22d839f6 -// on 2026-08-22. -const kaganeCompletedFixture = `{"series_id":"019c29c3-5abd-70e6-9efc-1f1f22d839f6","title":"Real Account 1-17","publication_status":"Completed","upload_status":"Completed"}` - // Trimmed from GET https://kagane.to/api/v2/series/019f84bc-9ba0-7ed9-86f5-8b905ec7c28b -// on 2026-08-22. +// fetched 2026-08-22 in a cleared Chrome tab (plain TLS serves the Cloudflare +// challenge). const kaganeOngoingFixture = `{"series_id":"019f84bc-9ba0-7ed9-86f5-8b905ec7c28b","title":"Infinite Decryption: The Strongest Level 0","publication_status":"Ongoing","upload_status":"Ongoing"}` +// Trimmed from GET https://kagane.to/api/v2/series/019c29c3-5abd-70e6-9efc-1f1f22d839f6 +// fetched 2026-08-22 the same way. +const kaganeCompletedFixture = `{"series_id":"019c29c3-5abd-70e6-9efc-1f1f22d839f6","title":"Real Account 1-17","publication_status":"Completed","upload_status":"Completed"}` + // Composed, not a single live trim: upload Completed alongside a // non-Completed publication status is the research note's inferred inverse // case and did not turn up in the ~1900-series live scan of 2026-08-22 (both @@ -255,12 +257,12 @@ const kaganeOngoingFixture = `{"series_id":"019f84bc-9ba0-7ed9-86f5-8b905ec7c28b const kaganeDivergentFixture = `{"series_id":"019f84bc-9ba0-7ed9-86f5-8b905ec7c28b","title":"Infinite Decryption: The Strongest Level 0","publication_status":"Ongoing","upload_status":"Completed"}` // Trimmed from https://novelfull.com/reverend-insanity.html fetched -// 2026-08-22 (the challenge served to plain TLS cleared in a real Chrome the -// same day). +// 2026-08-22 in a cleared Chrome tab after the plain-TLS probe was served the +// challenge (time-varying; plain curl answered 403 the same day). const novelfullCompletedFixture = `

    Status:

    Completed
    ` // Trimmed from https://novelfull.com/a-cunning-pervert-in-the-cultivation-world.html -// fetched 2026-08-22. +// fetched 2026-08-22 the same way. const novelfullOngoingFixture = `

    Status:

    Ongoing
    ` // Trimmed from the JSON-LD block in the head of