Repository navigation
tests: skip the signer's fsync in the approval state space's workers (#722) - #803
Merged
LoopGlitch26 merged 1 commit intoNov 13, 2026
Merged
Conversation
…ygnux-Labs#722) fsync was most of ApprovalStateSpace's time on windows-latest: 689 s as on main, 50 s with fsync skipped in the workers (52 s and 36 s on ubuntu-latest), with the same sequences and outcomes. The class checks the approval state machine; durability has its own tests, which the comment names. Each part skips the syncs of the signer's modules (its logs, its new files, and its state and key files) for its own run only, a patch held while the part runs in its worker process. A sync from any other module still runs and is counted, and the test expects none, so a sync the signer moves elsewhere fails it instead of making it slow again. Signed-off-by: Khushi Jain <jainkhushibts@gmail.com>
Member
|
Read it. This is what we agreed:
It goes on the merge list once CI is green. |
LoopGlitch26
enabled auto-merge (squash)
November 13, 2026 09:06
Contributor
Author
|
Thanks for reading it against the plan. The e20 change for (3) builds on this one: it moves |
Member
|
Merged, thanks. The approval state space now runs about ten minutes faster on each Windows job. |
LoopGlitch26
added a commit
that referenced
this pull request
Nov 13, 2026
…ne signer_without_fsync (lint) (#820) * tracekit audit: a gptme call its hook can't read is blocked, not an error gptme's checks of a call's shape raised a plain ValueError. Its hook blocks such a call, but since #779 audit counts only UnreadableCall as blocked and ends the replay on any other ValueError, so main's audit test failed for gptme (test_the_guard_line_names_the_calls_files_agent). The two PRs each passed CI before the other merged. Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com> * tracekit audit: a gptme MCP call whose content isn't JSON is blocked, not an error The same mismatch as the shape checks: json.loads raised a plain ValueError, which gptme's hook blocks and audit ended the replay on. Found by the independent review of this PR. Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com> * tests: one signer_without_fsync, from factories (main's lint) #803 defined it in test_bounded.py and #806 moved it to factories and imported it; merged together, test_bounded.py kept both and pyflakes failed (redefinition of unused 'signer_without_fsync'). The bodies were the same. Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com> --------- Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
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.
Part (2) of #722, as agreed there: tests only.
Why
On windows-latest,
ApprovalStateSpacespent most of its time infsync. One part profiled in-process spent 2.4 s of 4.9 s innt.fsync, against 0.08 s of 1.0 s on Linux. The syncs come from the signer's file store, its new files, and its state and key files. This class checks the approval state machine; durability has its own tests (test_storage_file.py:test_durability_modes,test_a_failed_background_sync_names_the_records_not_known_durable;storage_contract.py:test_torn_tail_is_set_aside_and_reported).Change (
tests/test_bounded.py)part()runs its sequences insidesigner_without_fsync(), a patch held while that part runs, in its own worker process. Inside it,os.fsyncandos.fdatasyncskip the calls made from the signer's modules (SIGNER_SYNCS:tracekit.storage.file,tracekit.signer.service,tracekit.deploy.files).storage.file._syncis a no-op too, since on macOS it syncs with anfcntl.explore()asserts there are none, so a sync the signer moves to another module fails the test and names that module, instead of quietly making it slow again.part()is now_part(), unchanged.Checked on my fork
ApprovalStateSpace, both tests passing, with the same sequences and outcomes:* a slower runner on that run; the experiment on #722, with
fsyncstubbed the same way, measured 36 s against 52 s on ubuntu-latest.The guard checked against a mutation, with every sync treated as made outside the signer: both tests fail with
['tracekit.deploy.files', 'tracekit.signer.service', 'tracekit.storage.file'] != []on all four. The first version of this change only coveredstorage.file, and the guard caught the other two.pyflakes tests/test_bounded.pyis clean.Next is part (3), the E20 test.