Repository navigation
perf(workflows): skip binary diff for ignored repositories - #298
Merged
tt-a1i merged 3 commits intoAug 30, 2026
Merged
Conversation
…y diff Replay is disabled wholesale for repositories with ignored files, but repositoryFingerprint() still paid for a full `git diff --binary` (up to 32 MiB buffered) before discovering that. Move every cheap terminating check ahead of the diff: repository root, ignored files, HEAD, tracked modes/symlinks, then the diff, then untracked collection and hashing. All git invocations share a single deadline, so reordering a fixed command set cannot change the outcome for any input; the unbounded non-git work still runs after every git call. Ignored-file repositories now fail within two git processes instead of five to six and never buffer the diff. repositoryFingerprint() is exported with an injectable git runner so a regression test can lock the command order: a disqualifying repository must never reach the diff. Fixes openpi-dev#294
samsen3
force-pushed
the
perf/replay-fingerprint-cheap-checks-first
branch
from
August 30, 2026 04:52
9a1b32e to
818c186
Compare
tt-a1i
approved these changes
Aug 30, 2026
tt-a1i
left a comment
Collaborator
There was a problem hiding this comment.
已按精确 head 2f239d0 重新审查并验证。该 PR 保留了 ignored 仓库在昂贵 binary diff 前快速退出的性能收益,同时修复了重排导致的 fail-closed 竞态:diff 后继续复查 tracked symlink/gitlink 与 ignored 文件,因此外部进程在同步 diff 期间创建这些可观察资源时不会生成不完整 replay identity。新增注入式回归覆盖 ignored、tracked symlink、gitlink 三类并发变化以及成功路径命令顺序。分支已合入最新 main;本地 bun run check 通过,专项 15/15,全量 Node 1050 passed、1 skipped、0 failed,Vitest 30/30;GitHub Node 22、Node 24、Windows 和 label checks 在该 head 全绿。未发现新的 P0-P2 阻塞,批准合并。
agnitum2009
pushed a commit
to agnitum2009/openpi
that referenced
this pull request
Sep 3, 2026
…v#298) * perf(workflows): run cheap replay fingerprint checks before the binary diff Replay is disabled wholesale for repositories with ignored files, but repositoryFingerprint() still paid for a full `git diff --binary` (up to 32 MiB buffered) before discovering that. Move every cheap terminating check ahead of the diff: repository root, ignored files, HEAD, tracked modes/symlinks, then the diff, then untracked collection and hashing. All git invocations share a single deadline, so reordering a fixed command set cannot change the outcome for any input; the unbounded non-git work still runs after every git call. Ignored-file repositories now fail within two git processes instead of five to six and never buffer the diff. repositoryFingerprint() is exported with an injectable git runner so a regression test can lock the command order: a disqualifying repository must never reach the diff. Fixes openpi-dev#294 * fix(workflows): recheck replay disqualifiers after diff --------- Co-authored-by: zhangms <[email protected]> Co-authored-by: tt-a1i <[email protected]>
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.
Problem
repositoryFingerprint()paid for a fullgit diff --binarybefore discovering that repositories containing ignored files cannot be replayed. Repositories withnode_modules, build output, or.envtherefore paid for a large synchronous diff whose result was discarded.Fixes #294
Value
The original Windows benchmark used 32 replay-eligible calls in a synthetic repository with a 2.29 MiB dirty diff and
node_modules:Ignored-file repositories now exit after two cheap Git commands and never run the binary diff.
Approach
repositoryFingerprint(cwd, runGit?)so tests can lock command ordering and inject concurrent repository changes.Clean replayable repositories perform one additional ignored-file scan; their fingerprint value and persisted replay identity remain unchanged.
Validation
bun run check: passed.Impact
No user-visible or model-visible surface changes. Replay remains fail closed, existing journal identities remain compatible, and the common ignored-repository path avoids the discarded diff.