Skip to content

[Push] Persist target path mappings with pull state - #414

Open
adamziel wants to merge 1 commit into
adamziel/remote-index-state-directoryfrom
adamziel/persist-path-mapping
Open

[Push] Persist target path mappings with pull state#414
adamziel wants to merge 1 commit into
adamziel/remote-index-state-directoryfrom
adamziel/persist-path-mapping

Conversation

@adamziel

@adamziel adamziel commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

This stores the resolved pull path mapping with each target relationship, so later commands can address the same local tree without repeating preflight.

path-mapping.json records the target document root, canonical local tree, and resolved remote/local prefix rules. The first mapping is immutable: reusing the same target and state directory with another local tree fails with an instruction to use another --state-dir.

Relationship discovery reads the mapping file. The relationship directory remains keyed only by the target URL after URL user-info, SECRET_KEY, and the site-export-api endpoint alias are removed. Before file work begins, the old root-level pull state moves into the relationship directory after preflight identifies the target and local tree. When apply-runtime receives a flattened root which no longer matches the original local tree, it selects the sole persisted pull state or refuses an ambiguous state directory.

Stacked on #413.

@github-actions

github-actions Bot commented Jul 30, 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.32 s 9.29 s ⚪ +36 ms (+0.4%) 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.64 s ⚪ +16 ms (+0.4%) 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 12.97 s 12.92 s ⚪ +52 ms (+0.4%)

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/remote-index-state-directory branch from 21ff077 to 73dbdcd Compare July 30, 2026 02:25
@adamziel
adamziel force-pushed the adamziel/persist-path-mapping branch from 8b56a49 to df803cb Compare July 30, 2026 02:30
@adamziel
adamziel force-pushed the adamziel/remote-index-state-directory branch from 73dbdcd to f3084d9 Compare July 30, 2026 02:51
@adamziel
adamziel force-pushed the adamziel/persist-path-mapping branch from df803cb to 4d99a76 Compare July 30, 2026 02:56
@adamziel
adamziel force-pushed the adamziel/remote-index-state-directory branch from f3084d9 to 25e0c48 Compare July 30, 2026 10:27
@adamziel
adamziel force-pushed the adamziel/persist-path-mapping branch from 4d99a76 to b07fb19 Compare July 30, 2026 10:33
@adamziel
adamziel force-pushed the adamziel/remote-index-state-directory branch from 25e0c48 to 77106b6 Compare July 30, 2026 10:36
@adamziel
adamziel force-pushed the adamziel/persist-path-mapping branch from b07fb19 to 90fa74c Compare July 30, 2026 10:37
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