Skip to content

ci: add parser_cli to StageX build matrix#232

Closed
shahan-khatchadourian-anchorage wants to merge 14 commits into
mainfrom
shahankhatch/stagex-parser-cli
Closed

ci: add parser_cli to StageX build matrix#232
shahan-khatchadourian-anchorage wants to merge 14 commits into
mainfrom
shahankhatch/stagex-parser-cli

Conversation

@shahan-khatchadourian-anchorage
Copy link
Copy Markdown
Contributor

@shahan-khatchadourian-anchorage shahan-khatchadourian-anchorage commented Apr 3, 2026

Summary

  • Add images/parser_cli/Containerfile for Solana-only CLI build using StageX
  • Runs cargo test before cargo build to fail fast and warm the compilation cache
  • Add parser_cli target to Makefile and stagex.yml matrix
  • Incorporates PR ci: label-triggered stagex builds and cache/credential fixes #226: stagex PR builds now require the stagex label instead of auto-triggering on path changes; GHCR login moved after build; disable setup-rust-toolchain built-in cache in main.yml

Stacked on #224.

Test plan

  • StageX build passes for parser_cli in CI (add stagex label to trigger)
  • Existing parser_app and parser_gateway builds unaffected
  • Push to main with relevant path changes still triggers the build
  • GHCR push still works on push to main
  • Continuous Integration no longer shows Cargo.toml not found errors

🤖 Generated with Claude Code

Move proptest and fuzz jobs out of main.yml into dedicated workflow
files (proptest.yml, fuzz.yml) so they appear as distinct named checks.
Add pull-requests: write permission to fuzz job to allow posting crash
comments via gh pr comment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shared composite action posts crash/failure output as a PR comment
and tags @copilot to fix the issue. Fuzz and proptest workflows use
it via extract steps that write output to GITHUB_OUTPUT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 'labeled' to pull_request trigger types and allow the ubuntu job
to run when the 'ci' label is present, not just for PRs targeting main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pin fuzz Cargo.lock to avoid spl-token-2022 breakage on nightly
  (spl-token-group-interface 0.7.2 pulled in solana-nullable which is
  incompatible with spl-token-2022 10.0.0)
- Remove stale Cargo.lock gitignore rule from visualsign-solana
- Remove post-failure-comment action and simplify fuzz/proptest workflows
- Use continue-on-error on fuzz steps so crashes show as warnings
  (known pre-existing panics in instructions.rs bounds checking)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On crash/failure, add fuzz-failure or proptest-failure label to the PR.
On clean run, remove the label. This gives visible signal without
blocking the check.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add || true to --add-label calls so the step doesn't fail if the label
operation itself has issues (e.g. label not yet created in the repo).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pin nightly toolchain to 2026-03-13 (known-good) in both
  rust-toolchain.toml and fuzz.yml
- Use --locked for cargo install cargo-fuzz in CI and docs
- Cache fuzz/target/ and key off fuzz/Cargo.lock instead of src/Cargo.lock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use ..VisualSignOptions::default() in test helpers to prevent
  breakage when new fields are added to the struct
- Pass github.event.pull_request.number through env var instead
  of direct context interpolation in shell blocks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract load_idl_from_env into common/mod.rs and add
real_idl_validation.rs with deterministic structural invariant
tests for production IDLs: discriminator presence/uniqueness,
instruction name uniqueness, and IDL hash stability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ightly env var

- Rename fuzz.yml -> fuzz-solana.yml and proptest.yml -> proptest-solana.yml
  with chain-scoped workflow names for future multi-chain CI
- Extract nightly toolchain version to NIGHTLY_VERSION env var in fuzz workflow
- Pin rust-toolchain.toml to 1.88.0 to match StageX pallet-rust:1.88.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Containerfile for parser_cli (Solana-only) with cargo test before
build. Tests run first to fail fast and warm the compilation cache.
Add Makefile target and stagex.yml matrix entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shahan-khatchadourian-anchorage shahan-khatchadourian-anchorage marked this pull request as draft April 4, 2026 02:42
Base automatically changed from shahankhatch/real-idl-structural-tests to main April 5, 2026 13:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shahan-khatchadourian-anchorage shahan-khatchadourian-anchorage marked this pull request as ready for review April 10, 2026 14:16
Copilot AI review requested due to automatic review settings April 10, 2026 14:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Solana-only parser_cli image to the StageX CI build matrix and introduces deterministic “real IDL” structural validation tests for the Solana parser test suite.

Changes:

  • Add images/parser_cli/Containerfile and a corresponding Makefile target to build a Solana-only parser_cli image via StageX (runs cargo test before cargo build).
  • Add real_idl_validation.rs and extract load_idl_from_env into tests/common/mod.rs for reuse across Solana tests.
  • Update CI workflows: include parser_cli in .github/workflows/stagex.yml matrix and clarify Solana-specific workflow names / nightly pin usage.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/rust-toolchain.toml Pins Rust toolchain patch version to align with StageX base images.
src/chain_parsers/visualsign-solana/tests/real_idl_validation.rs New deterministic structural invariant tests for decoded real IDLs.
src/chain_parsers/visualsign-solana/tests/fuzz_idl_parsing.rs Reuses shared load_idl_from_env helper from tests/common.
src/chain_parsers/visualsign-solana/tests/common/mod.rs Adds shared load_idl_from_env helper for real-IDL-based tests.
Makefile Adds out/parser_cli/index.json build target for StageX pipeline.
images/parser_cli/Containerfile New StageX container build for parser_cli (Solana-only) with test-before-build.
.github/workflows/stagex.yml Adds parser_cli to build matrix and improves job naming.
.github/workflows/proptest-solana.yml Renames workflow to be Solana-specific.
.github/workflows/fuzz-solana.yml Renames workflow and centralizes pinned nightly via NIGHTLY_VERSION.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/chain_parsers/visualsign-solana/tests/common/mod.rs
Comment thread src/chain_parsers/visualsign-solana/tests/common/mod.rs Outdated
Comment thread src/chain_parsers/visualsign-solana/tests/real_idl_validation.rs Outdated
…criminators

- Use imported `Idl` type alias instead of fully-qualified path
- Update doc comment to note decode failures are logged, not silent
- Require discriminators on all instructions in uniqueness test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Incorporates changes from PR #226:
- stagex.yml: PR builds require `stagex` label instead of auto-triggering
  on path changes. GHCR login moved after build step.
- main.yml: disable setup-rust-toolchain built-in cache which fails
  because Cargo.toml is in src/, not repo root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shahan-khatchadourian-anchorage shahan-khatchadourian-anchorage added the stagex Trigger stagex OCI image build label Apr 11, 2026
shahan-khatchadourian-anchorage added a commit that referenced this pull request Apr 11, 2026
- Add images/parser_cli/Containerfile for Solana-only CLI build
- Add parser_cli target to Makefile and stagex.yml matrix
- stagex.yml: PR builds require `stagex` label instead of
  auto-triggering on path changes; GHCR login moved after build
- main.yml: disable setup-rust-toolchain built-in cache (Cargo.toml
  is in src/, not repo root)

Incorporates PR #226 (now closed).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shahan-khatchadourian-anchorage
Copy link
Copy Markdown
Contributor Author

Rebased cleanly onto current main as a single commit. Superseded by new PR from shahankhatch/stagex-parser-cli-rebased.

shahan-khatchadourian-anchorage added a commit that referenced this pull request Apr 13, 2026
## Summary

- Add `images/parser_cli/Containerfile` for Solana-only CLI build using
StageX
- Add `parser_cli` target to `Makefile` and `stagex.yml` matrix
- **Incorporates PR #226**: stagex PR builds now require the `stagex`
label instead of auto-triggering on path changes; GHCR login moved after
build; disable setup-rust-toolchain built-in cache in main.yml

Replaces #232 (rebased). Stacked on #224.

## Test plan

- [ ] StageX build passes for `parser_cli` in CI (add `stagex` label to
trigger)
- [ ] Existing `parser_app` and `parser_gateway` builds unaffected
- [ ] Push to main with relevant path changes still triggers the build
- [ ] GHCR push still works on push to main

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stagex Trigger stagex OCI image build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants