Repository navigation
fix(services/baidu-netdisk): preserve root and reject URI authority - #9630
Merged
Merged
Conversation
List all root children before deletion so offsets stay valid. Keep ordinary root deletion a no-op and require an empty URI authority. Refs #9552
PsiACE
approved these changes
Dec 4, 2026
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.
Which issue does this PR close?
Closes #9552.
Rationale for this change
Baidu Netdisk uses numeric list offsets. Deleting children as pages arrive can shift those offsets and skip entries. Discarding the URI authority can also silently accept a misconfigured URI when the remaining path is valid.
What changes are included in this PR?
Finish listing root children before sending exact-path deletes. Reuse the service's single-target delete so each response is checked individually. Local contract tests exercise the public operator methods with an in-process transport. The pagination case lists 1,001 children and checks from a parent operator that the configured root remains and its children are gone. Live Baidu service behavior remains unverified.
Are there any user-facing changes?
Ordinary deletion of
/succeeds as a no-op. Recursive deletion of/removes the root's children and preserves the configured directory. Recursive deletion of a named directory removes that directory and its contents.Use
baidu-netdisk:///apps/MyApp/datawith theaccess_tokenoption.Operator::from_urireturnsConfigInvalidfor a Baidu Netdisk URI with an authority.Breaking changes
AI Usage Statement
magpie/codex/gpt-6.2-astra,xhigh. Scoped and coordinated the maintenance change.magpie/codex/gpt-6.2-astra,high. Traced the public delete and URI construction paths and checked prior evidence.magpie/codex/gpt-6.2-sol,max. Implemented the service changes and verified the caller contracts locally.magpie/devin/swe-2-1,high. Independently reran the deletion and URI tests through the public operator and checked the release history.