Skip to content

[PHP] Keep pulled deletions within selected paths - #585

Closed
adamziel wants to merge 1 commit into
codex/share-remote-to-local-path-mappingfrom
codex/selection-aware-remote-deletion
Closed

[PHP] Keep pulled deletions within selected paths#585
adamziel wants to merge 1 commit into
codex/share-remote-to-local-path-mappingfrom
codex/selection-aware-remote-deletion

Conversation

@adamziel

Copy link
Copy Markdown
Collaborator

Pulled remote deletions now stop at the active include, exclude, and remap boundaries.

For example, when /var/www/html is remapped to site and that whole remote tree disappears, the sparse index can identify /var as the first absent parent. Pull now stops at /var/www/html and removes site instead of mapping /var to an unrelated local path. An excluded descendant or a separate remap target also keeps a broader parent from being deleted.

FileSyncPatchPlanner and files-pull now use the same sparse-index deletion rule. When a former empty-directory entry is replaced by a descendant, pull removes the stale index entry without removing the directory.

Testing

The focused tests cover nested includes, excluded descendants, complete remapped-tree deletion, overlapping local remap targets, and an empty directory becoming non-empty.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Pull pipeline performance — large-directory

Site: large-directory · 2,000+ plus targeted file-transfer scenarios files · 10,000 posts · 25,000 postmeta · PHP 8.5.9

Stage PR trunk Δ Status Details
playground-sqlite-db-pull 9.45 s 9.41 s ⚪ +43 ms (+0.5%) condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
trunk: condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
playground-sqlite-db-apply 3.65 s 3.62 s ⚪ +25 ms (+0.7%) condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
trunk: condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
Total 13.10 s 13.03 s ⚪ +68 ms (+0.5%)

Numbers carry runner noise; treat single-run deltas as directional, not authoritative.

📈 Trunk performance history — commit-by-commit timeline.

@adamziel
adamziel force-pushed the codex/selection-aware-remote-deletion branch from 93c2ec0 to 45df39c Compare August 13, 2026 23:34
@adamziel
adamziel force-pushed the codex/selection-aware-remote-deletion branch from 45df39c to 076db24 Compare August 13, 2026 23:50
@adamziel

Copy link
Copy Markdown
Collaborator Author

Superseded by a single minimal PR based directly on trunk.

@adamziel adamziel closed this Aug 15, 2026
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.

1 participant