test(privacy): fold the block-timestamp cheat into the apply helpers - #948
Open
avi-starkware wants to merge 1 commit into
Open
test(privacy): fold the block-timestamp cheat into the apply helpers#948avi-starkware wants to merge 1 commit into
avi-starkware wants to merge 1 commit into
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
avi-starkware
marked this pull request as ready for review
August 12, 2026 08:54
avi-starkware
force-pushed
the
avi/screening-v3/test-fixtures
branch
from
August 17, 2026 18:52
5e94b21 to
81ed6f7
Compare
avi-starkware
force-pushed
the
avi/screening-v3/timestamp-cheat-helpers
branch
from
August 17, 2026 18:52
38d94e3 to
acb73ff
Compare
avi-starkware
force-pushed
the
avi/screening-v3/test-fixtures
branch
from
August 18, 2026 13:45
81ed6f7 to
76d1fca
Compare
avi-starkware
force-pushed
the
avi/screening-v3/timestamp-cheat-helpers
branch
from
August 18, 2026 13:45
acb73ff to
b0a31b3
Compare
`apply_actions_screened_at` and `assert_apply_fails_at` wrap the start_cheat_block_timestamp / apply / stop_cheat_block_timestamp sequence that each attestation-freshness test spelled out. Those tests need a moved clock because a fresh test starts at timestamp 0, where "one second past the max age" is not expressible, so they set a `now` and sign relative to it. The helpers stop the cheat before asserting, which is what the four tests already did by hand — the gain is that the ordering is now structural rather than per-test discipline, and a new freshness test cannot leave the pool's clock frozen by forgetting the stop. Also adopts the fixtures from the preceding commit at the two-user funding preamble they missed. test_server.cairo loses 23 more lines. 77 tests, none renamed, no assertion changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
avi-starkware
force-pushed
the
avi/screening-v3/test-fixtures
branch
from
August 18, 2026 14:31
76d1fca to
07ad60b
Compare
avi-starkware
force-pushed
the
avi/screening-v3/timestamp-cheat-helpers
branch
from
August 18, 2026 14:31
b0a31b3 to
3ef7d2b
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.

apply_actions_screened_atandassert_apply_fails_atwrap the start_cheat_block_timestamp / apply /stop_cheat_block_timestamp sequence that each attestation-freshness test spelled out. Those tests need
a moved clock because a fresh test starts at timestamp 0, where "one second past the max age" is not
expressible, so they set a
nowand sign relative to it.The helpers stop the cheat before asserting, which is what the four tests already did by hand — the
gain is that the ordering is now structural rather than per-test discipline, and a new freshness test
cannot leave the pool's clock frozen by forgetting the stop.
Also adopts the fixtures from the preceding commit at the two-user funding preamble they missed.
test_server.cairo loses 23 more lines. 77 tests, none renamed, no assertion changed.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
This change is