Skip to content

Contributing and Development

Dhanush edited this page Oct 23, 2026 · 1 revision

Contributing and Development

Contributions can improve an adapter, add synthetic fixtures, clarify docs, or validate an implemented provider with a real account. Read the contribution guide and code of conduct before opening a pull request.

Local setup

git clone https://github.com/dhanushk-offl/agentstat.git
cd agentstat
cargo test --all-features

Use stable Rust. Python 3.11 or newer is needed for the coverage script. Normal tests use synthetic fixtures and require no live account. CI validates Linux, macOS, and Windows; local CLI probes have Unix restrictions.

Before a pull request

cargo fmt --check
cargo test --all-features
cargo test --no-default-features
cargo test
cargo clippy --all-features --all-targets -- -D warnings
python3 scripts/check_coverage.py

For a provider change, also check its individual feature with cargo check --no-default-features --features <provider>. The full feature matrix is in scripts/check_features.sh; CI runs additional documentation, packaging, and socket checks.

Adding or repairing a provider

  1. Identify a read-only account data interface. An audited POST report query can be acceptable; an inference request is not.
  2. Add or update the Cargo feature, provider catalog entry, adapter, and account routing.
  3. Add synthetic fixtures that assert the actual method, URL, auth placement, response normalization, and important errors. Tests must not need live credentials.
  4. Update the coverage manifest, provider table, README, and relevant examples.
  5. Check the adapter with a real account if available, then submit a provider-check report without secrets.

Preserve exact money, unknown limits, account scope, and valid overages. Local probes require bounded execution and output, fixed read-only arguments, and cleanup on cancellation. The development guide explains the architecture and packaging checks in detail.

Pull request content

Explain the concrete problem, resulting behavior, tests run, and known limits. Keep unrelated changes separate. Do not commit credentials, raw authenticated payloads, or build output. Security issues use the private reporting process.

Clone this wiki locally