Repository navigation
fix(scraper-hook): move beforecreate to the enrich band - #4
Merged
Merged
Conversation
The hook ran in the pre-resolve band, which fails its chain closed. With `*://*/*` host permissions, any failure or slow page aborted the creation of every HTTP task (agalwood/Motrix#2189). Looking up a direct link on an HTML page is an optional convenience and must never veto a download. Run beforeCreate in the enrich band. There a failure or overrun drops the plugin's contribution and Motrix downloads the URL the user gave. pre-resolve is also reserved for builtin origin, and Motrix is retiring the plugin from its bundled set, so the plugin could not load there without this change. Bump to 1.1.0, which also ships the single three-second discovery deadline merged in #3. Document the move in the READMEs.
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.
Refs agalwood/Motrix#2189.
What
motrix.scraper-hooknow runs itsbeforeCreatehook in theenrichrole band instead ofpre-resolve.CLAUDE.mdnow say the plugin fails open and is no longer bundled with Motrix.Why
pre-resolvemakes a failure fatal: the hook chain is aborted, and with it the task. With*://*/*host permissions, one slow or failing page lookup blocked every new HTTP download ("plugin chain aborted: motrix.scraper-hook: plugin hook aborted"). Finding a direct link on an HTML page is an optional convenience and should never veto a download. In theenrichband, a failure or overrun drops the plugin's contribution and Motrix downloads the URL the user gave.pre-resolveis also reserved for builtin plugins. Motrix is retiring scraper-hook from its bundled set (agalwood/Motrix companion PR), so without this change the plugin could not load there at all.Verification
pnpm vitest run plugins/motrix.scraper-hook: 9 passed.pnpm lintandpnpm -r typecheckare clean.No release or lockfile bump is needed on the Motrix side, because the plugin is leaving the bundled set.