Skip to content

[Push] Capture the previous local index from compatible file-only pulls#386

Open
adamziel wants to merge 2 commits into
trunkfrom
adamziel/pull-previous-local-index
Open

[Push] Capture the previous local index from compatible file-only pulls#386
adamziel wants to merge 2 commits into
trunkfrom
adamziel/pull-previous-local-index

Conversation

@adamziel

@adamziel adamziel commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Compatible file-only pulls now refresh the pair's previous_local_index.jsonl, so files-diff and the next push compare against the last completed pull or push. A selected pull updates only the paths it applied; local additions, edits, and deletions elsewhere remain pending.

The pull retains its applied-path F/D records at the same durable boundary as the importer index. The first capture seeds covered paths from the final importer index and overlays those retained records; later captures merge only the retained records into the existing baseline. This keeps the local type, size, and ctime observed when each path was applied instead of absorbing edits made while an interrupted capture waits to resume.

Capture is a resumable stage after fetch. Aborting an incomplete pull invalidates the old baseline. A pull mode that cannot publish a matching baseline removes it before mutating the tree. files-push snapshots the shared baseline when planning starts so a later pull cannot change an active plan.

Testing

The integration tests run real file-only pulls against a local server and cover initial and partial capture, pending work outside the selected subtree, target deletions, type replacements, interruption and abort recovery, streamed-file timeout boundaries, and paths outside push scope.

@github-actions

github-actions Bot commented Jul 21, 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.8

Stage PR trunk Δ Status Details
playground-sqlite-db-pull 7.22 s 7.10 s ⚪ +120 ms (+1.7%) 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 2.84 s 2.90 s ⚪ -58 ms (-2.0%) 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 10.06 s 10.00 s ⚪ +62 ms (+0.6%)

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

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

@adamziel
adamziel force-pushed the adamziel/pull-previous-local-index branch from 99922e9 to 3d1bebf Compare July 21, 2026 22:12
@adamziel
adamziel force-pushed the adamziel/files-local-diff-command branch 2 times, most recently from 3126ef3 to 74d6077 Compare July 21, 2026 22:36
@adamziel
adamziel force-pushed the adamziel/pull-previous-local-index branch from 3d1bebf to daab326 Compare July 21, 2026 22:36
@adamziel
adamziel force-pushed the adamziel/files-local-diff-command branch from 74d6077 to 9e85c29 Compare July 21, 2026 23:01
@adamziel
adamziel force-pushed the adamziel/pull-previous-local-index branch 2 times, most recently from 04b07fd to ca8f6a1 Compare July 24, 2026 22:07
@adamziel
adamziel changed the base branch from adamziel/files-local-diff-command to trunk July 24, 2026 22:07
@adamziel
adamziel force-pushed the adamziel/pull-previous-local-index branch from ca8f6a1 to 4e85296 Compare July 25, 2026 02:55
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