xgbtxy opened a new pull request, #9077:
URL: https://github.com/apache/opendal/pull/9077

   # Which issue does this PR close?
   
   Closes #9076.
   
   # Rationale for this change
   
   `GlobLayer` emits implied parent directories via `ImpliedDirectories` when 
filtering a recursive listing without `start_after` (#8966), but passes 
`implied: None` whenever `start_after` is set. On flat-listing services such as 
`services::Memory` (where objects are stored without explicit directory 
markers), combining `start_after` with a multi-level glob pattern (`**/`, `**`, 
`t/*/`) silently drops all matching implied directories after the cursor.
   
   # What changes are included in this PR?
   
   - In `core/core/src/layers/glob.rs`, enable `ImpliedDirectories` on 
`FilteredLister` when `start_after` runs a recursive listing for non-versioned, 
non-deleted queries (`recursive && !args.versions() && !args.deleted()`).
   - Store `start_after: Option<String>` on `FilteredLister` and emit an 
implied parent directory only when `parent > marker`, preventing directories at 
or before the cursor from being re-emitted.
   - Add unit tests in `core/core/src/layers/glob/tests.rs` verifying cursor 
resumption parity on `services::Memory` for `**`, `**/`, `t/*/`, and 
non-trailing-slash prefixes, deduplication with explicit directory markers, and 
preserving no synthetic directories for `versions(true)`.
   
   # Are there any user-facing changes?
   
   `list_with(...).glob(...).start_after(...)` on flat-listing services now 
returns matching implied directories after the cursor instead of omitting them.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Antigravity
   - Model: Gemini 3.1 Pro
   - Effort: High
   - Role: Investigated `GlobLayer` `FilteredLister` cursor handling, 
reproduced the missing implied directories on `services::Memory`, implemented 
the `start_after`-bounded `ImpliedDirectories` fix and unit tests, and ran 
local `cargo test`, `cargo clippy`, and `cargo fmt` verification.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to