fix(douyin): make fast_detect retries independent of error wording - #2444
Open
asts-top wants to merge 1 commit into
Open
fix(douyin): make fast_detect retries independent of error wording#2444asts-top wants to merge 1 commit into
asts-top wants to merge 1 commit into
Conversation
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.
Description
fast_detectcurrently decides whether to retry by searching error-message text. This makes retry behavior depend on wording and can silently stop working when the upstream response or wrapper changes.This patch gives Douyin browser requests stable typed error metadata (
errorCode,phase, HTTP/API status) while keeping the existing publicCOMMAND_EXECenvelope.publishnow retries only transient failures from thefast_detectphase: empty responses, network failures, timeouts, and transport-level HTTP 404s. API-level 404s, parse failures, malformed responses, and other non-transient errors are surfaced without retrying.The scope is intentionally limited to request classification and the
fast_detectretry decision. Uploading, polling,create_v2, CLI arguments, and other adapters remain unchanged. Keeping the change focused preserves existing behavior, reduces regression and review cost, and makes verification of #2319 straightforward.Related issue: Fixes #2319
Type of Change
Checklist
Documentation (if adding/modifying an adapter)
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
Focused regression tests:
Full Douyin adapter suite:
Additional checks passed:
npm run typechecknpm run buildnpm run check:typed-error-lintnpm run check:silent-column-dropnode dist/src/main.js validate douyinnpm audit --registry=https://registry.npmjs.org/ --omit=dev --audit-level=highgit diff --checkThe typed-error lint remained at
current=130, baseline=130, new=0, and the silent-column-drop check remained atcurrent=94, baseline=94, new=0.Manual verification with a logged-in Douyin creator session confirmed that an empty
fast_detect/pre_checkresponse entered the retry path and allowed the pipeline to continue into polling. A later emptycreate_v2response was observed separately; this PR does not claim to fix that downstream issue.