Skip to content

Feat/examples sandbox tests#237

Merged
salazarsebas merged 8 commits into
salazarsebas:mainfrom
KevinMB0220:feat/examples-sandbox-tests
Jul 3, 2026
Merged

Feat/examples sandbox tests#237
salazarsebas merged 8 commits into
salazarsebas:mainfrom
KevinMB0220:feat/examples-sandbox-tests

Conversation

@KevinMB0220

Copy link
Copy Markdown
Contributor

Pull Request: Align Canonical Examples with Quality Standards & Implement GameHarness Sandbox Tests

Description

This PR brings the canonical 1.1.0 reference examples to full compliance with EXAMPLE_STANDARD.md (Issue #217) and integrates GameHarness and Scenario-based multi-turn integration testing across key onboarding examples (Issue #222).

Key Changes

  1. Dependency Modernization:

    • Swapped all local path references to published versions of cougr-core = "1.1.0" in target examples dependencies.
    • Configured cougr-core = { version = "1.1.0", features = ["testutils"] } in dev-dependencies.
    • Standardized soroban-sdk = "25.1.0".
  2. GameHarness Scenario Tests:

    • Created sandbox_tests.rs modules containing multi-step scenario tests (at least 3 actions with intermediate state assertions) for spawn_and_move, tic_tac_toe, snake, and battleship.
    • Derived Clone on game contracts (TicTacToeContract, SnakeContract, BattleshipContract) to support testing registry constraints in the harness.
  3. Standard-Compliant Documentation:

    • Authored new README.md files for tic_tac_toe, session_arena, hidden_hand, fog_explorer, dice_duel, and blind_auction covering all required sections of §4 (API tables, storage model, gameplay flow, architecture).
    • Updated existing READMEs for spawn_and_move, snake, and battleship to recommend GameHarness and Scenario as the primary testing tools.
    • Added ZK reference architectures to the canonical catalog list in examples/README.md.
  4. CI Pipelines:

    • Added CI workflows for spawn_and_move and session_arena using the reusable workflow runner.
    • Extended .github/workflows/circuit_examples.yml ZK check matrices to execute stellar contract build (WASM target build checks) in addition to tests.

Verification

Verified all targets locally with:

  • cargo test -> Passed successfully.
  • stellar contract build -> WASM compilation succeeded.

Related Issues

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@KevinMB0220 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

KevinMB0220 and others added 4 commits June 30, 2026 01:12
…as#225

- Add .gitignore to all 39 examples (target/, *.wasm; keep Cargo.lock)
- Remove Cargo.lock exclusion from root and example .gitignore files
- Fix inaccurate Cargo.toml descriptions and trading_card_game package name
- Sanitize READMEs: remove contract IDs, tx hashes, promotional emoji
- Restore tic_tac_toe README markdown (no HTML entities)
- Add scripts/verify_hygiene.sh and update enforcement tooling
…rds compliance

- Replace absolute file:// sandbox_tests links with relative paths in
  snake and battleship READMEs
- Add invalid-input rejection tests for ZK canonical examples per
  EXAMPLE_STANDARD §5 (hidden_hand, fog_explorer, dice_duel, blind_auction)
- Assert hidden_hand verify_deal return value against circuit spec

@salazarsebas salazarsebas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@salazarsebas
salazarsebas merged commit 7f0d166 into salazarsebas:main Jul 3, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants