Two audit-driven bug fixes, both live-verified against real Aozora Bunko data (not yet built/deployed - held locally pending explicit deployment confirmation):
hasCompletedBaseline no longer marked true on a walk that parsed zero real rows. Previously set whenever the catalog loop finished without halting, regardless of whether parseCatalogRow() recognized any row - a future Aozora column rename (作品ID or テキストファイルURL) would have made every row return null while the run still "completed" and silently marked the baseline done. Now gated on having parsed at least one real row this run (shouldMarkBaselineComplete), with a new log.warning (isSuspiciousZeroParseRate) when a non-trivial raw row count parses to zero.
- Delivered
plain_text/raw_text_with_markup no longer retain Aozora's trailing bibliographic colophon. stripLegendPreamble only ever stripped the opening legend block; the closing "底本:" source-edition/transcriber-credits/volunteer-boilerplate block survived into every delivered record. A new stripColophon stripping stage (run after the legend strip, before the ruby strip) removes it. Verified against three independently downloaded real works (059898 "ウェストミンスター寺院", 000128 "羅生門", 048222 "銀河鉄道の夜") - each real colophon fully removed, real story content byte-for-byte intact, and real inline uses of the bare word "底本" (legitimate editorial annotations, not colophon) correctly left untouched.
11 automated tests added (3 for the baseline-completion gate, 3 for the zero-parse-rate warning, 5 for colophon stripping) on top of the original 32, for 43 total. npm run build, npm run lint, and npm test all pass clean.
Initial build. Delta engine over Aozora Bunko's real, live-confirmed catalog
export (19,502 rows), filtering to confirmed-public-domain works, decoding
per-work Shift_JIS text ZIPs, and stripping Aozora's legend preamble plus
all three real ruby/annotation markup conventions to produce clean reading
text alongside the markup-intact original. SHA-256 dual-fingerprint delta
engine (BASELINE_SNAPSHOT/NEW_TEXT/REVISED_TEXT/STATUS_CHANGE/
SNAPSHOT_NO_DIFF), Pay-Per-Event billing tiered on whether full text was
actually delivered.
Live-verified end-to-end against the real aozora.gr.jp catalog and a real
per-work text file, including two separate runs proving state persistence
across 10 distinct real works. Caught and fixed, before it could ship, a
content-fingerprint design bug that would have made every already-baselined
work spuriously reclassify as changed on every run (contentHash/
characterCount, populated only after classification, were wrongly included
in the fingerprint) - fixed by relying on Aozora's own declared
last-modified date instead. Full account in AGENTS.md. 32 automated tests,
clean build/lint. Not yet pushed to Apify Console.