Repository navigation
tests: skip the signer's fsync in the e20 model arm test (#722) - #806
Merged
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>
…#722) test_e20_model_arm_scores_both_sets_with_a_fake_model records every scored session in e20's in-process signer, and its syncs were most of the test's time on windows-latest. signer_without_fsync moves from test_bounded.py to tests/factories.py, unchanged but for its docstring, and the test holds it around model_main, with the same guard: a sync from outside the signer's modules still runs and fails the test. Signed-off-by: Khushi Jain <jainkhushibts@gmail.com>
Member
|
Read it:
It goes on the merge list once CI is green. |
LoopGlitch26
enabled auto-merge (squash)
November 13, 2026 10:58
Member
|
Merged, thank you. Skipping the signer's fsync in that test takes away the slow part you measured on the low-memory machine, and the test still checks the same thing. #807 is next in line; it merges by itself once CI is green. |
9 of 10 tasks
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 (3) of #722, step (1): the tests side, as agreed there. Built on #803, whose commit is the first one here until it lands; this PR's own change is dc7f2a1.
Why
ModelArm::test_e20_model_arm_scores_both_sets_with_a_fake_modelrecords every scored session in e20's in-process signer. Its syncs run on the signer's thread, and on windows-latest they were about half the test's time. In the measurements on #722, stubbingfsynctook the test from 172 s to 71 s there.Change
signer_without_fsyncandSIGNER_SYNCSmove fromtests/test_bounded.pytotests/factories.py. The code is unchanged; the docstring now describes any test of what a signer decides and records, not just the state space.test_bounded.pyimports them.signer_without_fsync()arounde20.model_main(...), and asserts that no sync was made outside the signer's modules. That's the same guard as tests: skip the signer's fsync in the approval state space's workers (#722) #803.Checked on my fork
Both changed tests, with the change:
On main, the e20 test took 172 s and 232 s on windows-latest in two runs, and 38-40 s on ubuntu-latest. Windows runners vary a lot between runs. The rest of the Windows gap is the SSL context per model call, which is step (2), a separate PR in
client.py.The guard, checked with every sync counted as made outside the signer: all three tests fail on all three jobs with
['tracekit.deploy.files', 'tracekit.signer.service', 'tracekit.storage.file'] != [].pyflakesis clean on the three files.