Skip to content

Conversation

@mehmetyavuzz43
Copy link

@mehmetyavuzz43 mehmetyavuzz43 commented Dec 28, 2025

Adds a JSON fixture representing a sample market with realistic fields, to be used in unit tests or examples.


Note

Introduces a simple tooling and test fixture addition.

  • Adds scripts/bash/check_env.sh to validate .env presence and required vars (POLYGON_WALLET_PRIVATE_KEY, OPENAI_API_KEY); exits with error if missing/empty
  • Adds tests/fixtures/sample_market.json providing realistic market data for unit tests/examples

Written by Cursor Bugbot for commit 07840b6. This will update automatically on new commits. Configure here.

Provides a .env sanity-check script that validates required variables for Polymarket Agents.
Adds a JSON fixture representing a sample market with realistic fields, to be used in unit tests or examples.
export "${key}=${value}"
;;
esac
done < "${ENV_FILE}"
Copy link

Choose a reason for hiding this comment

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

Last line of .env skipped without trailing newline

The while IFS='=' read -r key value loop fails to process the last line of the .env file if it doesn't end with a trailing newline. When read encounters EOF without a newline, it returns a non-zero exit status even though it successfully populated the variables, causing the while loop to exit before processing that line. This could silently skip exporting critical environment variables like OPENAI_API_KEY, leading the validation to incorrectly report them as missing. The fix requires adding || [ -n "$key" ] to the while condition.

Fix in Cursor Fix in Web

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