Skip to content

Stabilize HDoujin runtime: fix tag leak, harden staging, add helpers#8

Open
nacl-dev wants to merge 1 commit into
mainfrom
fix/hdoujin-runtime-hardening
Open

Stabilize HDoujin runtime: fix tag leak, harden staging, add helpers#8
nacl-dev wants to merge 1 commit into
mainfrom
fix/hdoujin-runtime-hardening

Conversation

@nacl-dev
Copy link
Copy Markdown
Owner

Summary

  • Fix function:0x tag leak (P1): Collection/table-to-string-slice conversion now skips *lua.LFunction values in tableStrings(), infoString(), and luaValueToGo(), preventing helper methods from leaking into tags and metadata strings.
  • Harden multi-chapter import/scan (P2): Scanner now skips .tanuki-job-* staging directories and .part files during walks, so in-progress downloads never appear as library media.
  • Add lightweight test fixtures (P3): New TestHDoujinLuaEngineLargeGalleryFixture (5-page gallery) and TestHDoujinLuaEngineChapterSeriesFixture (3-chapter series with JSON pages) replace the need for large live-site test runs during routine validation.
  • Add next-wave runtime helpers (P4): Fail, SetParameter, DecodeBase64, StripParameters, and Paginator.New are now registered in the Lua runtime, each with a dedicated test.
  • Update docs (P5): docs/TODO_METADATA_AND_DOWNLOADS.md and docs/HDOUJIN_INTEGRATION_PLAN.md updated to reflect completed stabilization work.

Test plan

  • go test ./internal/downloader/... passes (44 tests, including 9 new tests)
  • Verify function:0x strings no longer appear in tag lists from Lua modules with collection helpers
  • Verify scanner ignores .tanuki-job-* directories and .part files during library scans
  • Verify new runtime helpers work with real HDoujin Lua modules that call Fail(), SetParameter(), DecodeBase64(), StripParameters(), and Paginator.New()

🤖 Generated with Claude Code

- Fix function:0x tag leak by skipping *lua.LFunction values in
  tableStrings(), infoString(), and luaValueToGo() conversions
- Harden scanner to skip .tanuki-job-* staging dirs and .part files
- Add lightweight test fixtures for large-gallery and chapter-series hosts
- Add runtime helpers: Fail, SetParameter, DecodeBase64, StripParameters,
  Paginator.New
- Update docs to reflect completed stabilization work

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants