Advance the local index from completed files-pull mutations - #446
Open
adamziel wants to merge 1 commit into
Open
Advance the local index from completed files-pull mutations#446adamziel wants to merge 1 commit into
adamziel wants to merge 1 commit into
Conversation
Contributor
Pull pipeline performance —
|
| Stage | Wall time | Resume attempts | Status | Details |
|---|---|---|---|---|
playground-sqlite-db-pull |
9.45 s | 1 | ✓ | 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.53 s | 1 | ✓ | 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.98 s |
Numbers carry runner noise; treat single-run deltas as directional, not authoritative.
📈 Trunk performance history — commit-by-commit timeline.
adamziel
force-pushed
the
adamziel/write-local-index-after-files-pull
branch
from
July 31, 2026 15:09
a127118 to
8a30670
Compare
adamziel
force-pushed
the
adamziel/filter-skipped-files
branch
from
July 31, 2026 15:33
b4281a1 to
846efae
Compare
adamziel
force-pushed
the
adamziel/write-local-index-after-files-pull
branch
from
July 31, 2026 16:50
8a30670 to
92b5ae8
Compare
adamziel
force-pushed
the
adamziel/write-local-index-after-files-pull
branch
from
July 31, 2026 16:52
92b5ae8 to
903340d
Compare
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.
files-pullnow advances<remote-state-directory>/local_index.jsonlonly for local paths whose pull mutations complete. Selected, filtered, remapped, and preserve-local pulls therefore leave pending local work elsewhere visible tofiles-diffandfiles-push.Implementation
The pull-side index-update WAL carries two projections. Every record carries the remote absolute path. Upserts also carry the remote-observed type, size, and ctime needed by
remote-index.jsonl. A completed non-skipped local mutation carries its mapped local relative path and locally observed type, size, and ctime.Applying a batch updates the remote index first, merges the local projection into
local_index.jsonlsecond, and clears the WAL only after both replacements finish. The local merge synthesizes parent directories, recomputes directory emptiness, removes replaced or deleted subtrees, and returns the retained index to the raw path order consumed byPushPlan. It external-sorts streaming files rather than materializing either index in memory.The empty WAL remains the unfinished files-pull marker. Resume and abort replay it.
files-diffandfiles-pushreject that marker, while files-pull rejects an unfinished files-push, so neither index writer can expose the other writer's intermediate state.There is no post-fetch filesystem scan,
local-indexstage, building file, swap file, traversal cursor, or 1,000-step invocation limit. A successful initial pull with no recorded local paths creates an empty local index.Testing
The focused importer suite passes 104 tests with 1,671 assertions and one skipped test. CI passes PHPUnit on PHP 8.1 through 8.4, exporter/importer E2E jobs from PHP 7.2 through 8.5, the Playground CLI E2E job, PHPStan, PHP compatibility, and the pull pipeline benchmark. PHP syntax and
git diff --checkalso pass.