Skip to content

starknet_os_flow_tests: make fuzz test Cairo1 scenarios an enum#13153

Merged
dorimedini-starkware merged 1 commit into
mainfrom
03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum
Apr 5, 2026
Merged

starknet_os_flow_tests: make fuzz test Cairo1 scenarios an enum#13153
dorimedini-starkware merged 1 commit into
mainfrom
03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware commented Mar 10, 2026

Note

Low Risk
Low risk: changes are limited to fuzz-test Cairo1 contracts and expected test addresses, with no production runtime impact. Main risk is potential mismatch between orchestrator-provided scenario IDs and the new enum mapping causing test failures.

Overview
Refactors the Cairo1 fuzz revert contracts (fuzz_revert.cairo and the auto-generated fuzz_revert_2.cairo) to replace numeric SCENARIO_* constants with a typed Scenario enum and a felt252 -> Scenario conversion, switching the dispatcher to a single match.

Adds an explicit failure path for unknown scenario identifiers: the orchestrator now exposes should_fail_invalid_scenario_panic_message, and the fuzz contracts panic with this value when an invalid ID is encountered; the orchestrator also treats this as an unexpected error during start_test.

Updates starknet_os_flow_tests expected deployed fuzz contract addresses to match the new class hashes produced by the Cairo1 contract changes.

Reviewed by Cursor Bugbot for commit fb35a9d. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Yoni-Starkware reviewed 11 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@dorimedini-starkware dorimedini-starkware force-pushed the 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario branch from 0b51682 to 989ba5f Compare March 11, 2026 12:31
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch 3 times, most recently from f5a603b to 9db6e63 Compare March 11, 2026 16:19
@dorimedini-starkware dorimedini-starkware force-pushed the 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario branch 2 times, most recently from 88a0573 to 133ea1e Compare March 15, 2026 14:30
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from 9db6e63 to 36ce413 Compare March 15, 2026 14:30
@dorimedini-starkware dorimedini-starkware force-pushed the 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario branch from 133ea1e to f11c982 Compare March 16, 2026 13:01
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from 36ce413 to e158327 Compare March 16, 2026 13:01
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from e158327 to bb9a379 Compare March 24, 2026 15:57
@dorimedini-starkware dorimedini-starkware force-pushed the 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario branch from f11c982 to b8fc30a Compare March 24, 2026 15:57
Copy link
Copy Markdown
Collaborator

@Yoni-Starkware Yoni-Starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Yoni-Starkware reviewed 10 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from bb9a379 to a8d3ad0 Compare March 31, 2026 07:16
@dorimedini-starkware dorimedini-starkware force-pushed the 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario branch 2 times, most recently from 1f2e886 to d377b30 Compare March 31, 2026 08:57
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from a8d3ad0 to 60d66e9 Compare March 31, 2026 08:57
@dorimedini-starkware dorimedini-starkware changed the base branch from 03-08-starknet_os_flow_tests_fuzz_test_call_libcall_bad_entrypoint_scenario to main April 5, 2026 07:10
@dorimedini-starkware dorimedini-starkware force-pushed the 03-09-starknet_os_flow_tests_make_fuzz_test_cairo1_scenarios_an_enum branch from 60d66e9 to fb35a9d Compare April 5, 2026 07:12
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 5, 2026

Merge activity

  • Apr 5, 7:12 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorimedini-starkware reviewed 4 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on dorimedini-starkware).

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue Apr 5, 2026
Merged via the queue into main with commit 394b22c Apr 5, 2026
40 of 59 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants