Skip to content

Comments

fix: fullstack script#63

Merged
GabrielePicco merged 1 commit intomainfrom
fix/fullstack-script
Feb 21, 2026
Merged

fix: fullstack script#63
GabrielePicco merged 1 commit intomainfrom
fix/fullstack-script

Conversation

@GabrielePicco
Copy link
Contributor

@GabrielePicco GabrielePicco commented Feb 21, 2026

Summary by CodeRabbit

  • New Features

    • Added SKIP_LOCAL_VALIDATOR flag to control local validator startup and shutdown behavior during testing.
    • Added automatic 100 SOL airdrop to upgrade authority during local network setup.
  • Chores

    • Improved output formatting and error message consistency across test logs.
    • Enhanced validator startup and shutdown logic with early configuration validation.

@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
er-rolldice Ready Ready Preview, Comment Feb 21, 2026 1:28am
magicblock-engine-examples Ready Ready Preview, Comment Feb 21, 2026 1:28am
spl-tokens Ready Ready Preview, Comment Feb 21, 2026 1:28am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The fullstack-test.sh script introduces helper utility functions (run_clean_output, is_truthy, has_ancestor_flag, has_anchor_cli_skip_local_validator, airdrop_upgrade_authority) and a SKIP_LOCAL_VALIDATOR feature flag to optionally bypass local validator startup. Output handling is refactored to normalize colors and CRLF handling, with carriage-return progress indicators replaced by fixed-line messaging. Anchor.toml validation and cluster extraction are added earlier in the flow.

Changes

Cohort / File(s) Summary
Fullstack Test Script Refactoring
fullstack-test.sh
Adds helper functions for output normalization, truthiness checking, process ancestry detection, CLI flag parsing, and SOL airdrop. Introduces SKIP_LOCAL_VALIDATOR flag to conditionally skip local validator startup/cleanup. Refactors progress output from carriage-return echoes to wrapped run_clean_output calls. Adds Anchor.toml validation with early cluster extraction. Updates startup, cleanup, build, deploy, and test invocation logic to respect the new flag and use consistent output handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fullstack-script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4fa3016e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if [ "$EPHEMERAL_VALIDATOR_STARTED_BY_US" = true ]; then
pkill -f "ephemeral-validator" 2>/dev/null || true
echo -e "\n[SETUP] ${YELLOW}Cleaning up validators...${NC}"
if ! is_truthy "$SKIP_LOCAL_VALIDATOR"; then

Choose a reason for hiding this comment

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

P1 Badge Clean up validators started by this script in skip mode

When SKIP_LOCAL_VALIDATOR is true, cleanup() skips all process termination under if ! is_truthy "$SKIP_LOCAL_VALIDATOR", but the script can still start ephemeral-validator itself earlier (when port 7799 is free). In that flow, the process is left running after tests, so later runs may attach to stale state on port 7799 instead of a fresh reset, which can corrupt test reliability and cause hard-to-reproduce failures.

Useful? React with 👍 / 👎.

}

has_anchor_cli_skip_local_validator() {
if pgrep -af "anchor" 2>/dev/null | awk '($0 ~ /test/) && ($0 ~ /--skip-local-validator/) { found=1; exit } END { exit (found?0:1) }'; then

Choose a reason for hiding this comment

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

P2 Badge Limit skip-local-validator auto-detection to this process tree

has_anchor_cli_skip_local_validator() scans all system processes with pgrep -af "anchor" and sets SKIP_LOCAL_VALIDATOR if any matching command includes test and --skip-local-validator, even if that command is unrelated to this run. In shared dev/CI hosts, an unrelated Anchor test can therefore force this script into skip mode, and the later skip-local-validator branch will fail if no validator is already on port 8899 instead of starting one.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant