-
Notifications
You must be signed in to change notification settings - Fork 13
Add fuzz targets, semantic tests, and CI for visualsign-solana #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
fdf9063
Add cargo fuzz targets for visualsign-solana
shahan-khatchadourian-anchorage 04a63e2
Add proptest and fuzz label-triggered CI jobs
shahan-khatchadourian-anchorage 73c07ef
Post fuzz crash summary as PR comment on failure
shahan-khatchadourian-anchorage 2352f90
Split proptest and fuzz workflows into separate files
shahan-khatchadourian-anchorage de7515d
Add reusable post-failure-comment action tagging @copilot
shahan-khatchadourian-anchorage 0014722
Extract shared pipeline helpers into common module
shahan-khatchadourian-anchorage c48dda4
Add semantic pipeline tests for 8 embedded IDLs
shahan-khatchadourian-anchorage 6a667ad
Allow triggering CI on any PR via 'ci' label
shahan-khatchadourian-anchorage 7e3b9f0
Fix fuzz build and simplify CI workflows
shahan-khatchadourian-anchorage b19f3d9
Add failure labels to fuzz and proptest workflows
shahan-khatchadourian-anchorage 0b545b9
Harden label steps in fuzz and proptest workflows
shahan-khatchadourian-anchorage 3938dbf
docs: add cargo fuzz, semantic tests, and CI labels to testing guide
shahan-khatchadourian-anchorage bfde987
Address Copilot review: pin nightly, lock cargo-fuzz, fix cache key
shahan-khatchadourian-anchorage 2a84706
Address code review: Default::default(), env var for PR number
shahan-khatchadourian-anchorage febf931
Fix panics on malformed transaction data in legacy instruction decodi…
shahan-khatchadourian-anchorage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Fuzz Testing | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] | ||
|
|
||
| jobs: | ||
| fuzz: | ||
| if: contains(github.event.pull_request.labels.*.name, 'fuzz') | ||
| runs-on: ubuntu-latest-4-cores | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - name: git checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Install Rust (nightly) | ||
| uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0 | ||
| with: | ||
| toolchain: nightly-2026-03-13 | ||
| - name: Install cargo-fuzz | ||
| run: cargo install cargo-fuzz --locked | ||
| - name: Cache Rust dependencies | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| src/target/ | ||
| src/chain_parsers/visualsign-solana/fuzz/target/ | ||
| key: ${{ runner.os }}-cargo-fuzz-${{ hashFiles('src/chain_parsers/visualsign-solana/fuzz/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-fuzz- | ||
| ${{ runner.os }}-cargo- | ||
| - name: install protoc | ||
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | ||
| with: | ||
| version: "21.4" | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: free disk space | ||
| run: | | ||
| sudo swapoff -a | ||
| sudo rm -f /swapfile | ||
| sudo apt clean | ||
| df -h | ||
| - name: Run codegen | ||
| run: make -C src generated | ||
| - name: Fuzz fuzz_transaction_string (30s) | ||
| id: fuzz_transaction_string | ||
| continue-on-error: true | ||
| run: cargo +nightly-2026-03-13 fuzz run fuzz_transaction_string -- -max_total_time=30 | ||
| working-directory: src/chain_parsers/visualsign-solana/fuzz | ||
| - name: Fuzz fuzz_versioned_transaction (30s) | ||
| id: fuzz_versioned_transaction | ||
| continue-on-error: true | ||
| run: cargo +nightly-2026-03-13 fuzz run fuzz_versioned_transaction -- -max_total_time=30 | ||
| working-directory: src/chain_parsers/visualsign-solana/fuzz | ||
| - name: Label PR on fuzz failure | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| if [ "${{ steps.fuzz_transaction_string.outcome }}" = "failure" ] || [ "${{ steps.fuzz_versioned_transaction.outcome }}" = "failure" ]; then | ||
| gh pr edit "$PR_NUMBER" --add-label fuzz-failure || true | ||
| else | ||
| gh pr edit "$PR_NUMBER" --remove-label fuzz-failure || true | ||
| fi |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Property Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, labeled] | ||
|
|
||
| jobs: | ||
| proptest: | ||
| if: contains(github.event.pull_request.labels.*.name, 'proptest') | ||
| runs-on: ubuntu-latest-4-cores | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - name: git checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Install Rust | ||
| uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0 | ||
| with: | ||
| components: clippy, rustfmt | ||
| - name: Cache Rust dependencies | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| src/target/ | ||
| key: ${{ runner.os }}-cargo-proptest-${{ hashFiles('src/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-proptest- | ||
| ${{ runner.os }}-cargo- | ||
| - name: install protoc | ||
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | ||
| with: | ||
| version: "21.4" | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: free disk space | ||
| run: | | ||
| sudo swapoff -a | ||
| sudo rm -f /swapfile | ||
| sudo apt clean | ||
| df -h | ||
| - name: Run codegen | ||
| run: make -C src generated | ||
| - name: Run proptest tests | ||
| id: proptest | ||
| continue-on-error: true | ||
| run: cargo test -p visualsign-solana | ||
| working-directory: src | ||
| - name: Label PR on proptest failure | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| if [ "${{ steps.proptest.outcome }}" = "failure" ]; then | ||
| gh pr edit "$PR_NUMBER" --add-label proptest-failure || true | ||
| else | ||
| gh pr edit "$PR_NUMBER" --remove-label proptest-failure || true | ||
| fi |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| target | ||
| corpus | ||
| artifacts | ||
| coverage |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.