Skip to content

#1565 Add a generator for proptest::Strategy for Address#1681

Merged
Baskarayelu merged 1 commit into
QuickLendX:mainfrom
Chigybillionz:add-a-generator
Jun 27, 2026
Merged

#1565 Add a generator for proptest::Strategy for Address#1681
Baskarayelu merged 1 commit into
QuickLendX:mainfrom
Chigybillionz:add-a-generator

Conversation

@Chigybillionz

@Chigybillionz Chigybillionz commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

closes #1565

PR description:
This PR adds a reusable proptest::Strategy generator for Soroban Address to improve test coverage for the new get_address_summary surface (and other address-driven endpoints).

What changed
New reusable generator: proptest strategy for soroban_sdk::Address
Biases toward known-bad / boundary inputs, to increase the chance of catching regressions (e.g., malformed/edge-case-like encodings and address-domain corner cases that previously were under-tested).
Deterministic property tests (no use of Date.now() / Math.random() / wall-clock).
Why
Test coverage around address-related shapes and endpoint inputs is currently thin. Regressions in input handling can slip through without failing builds. This generator:

locks in expected address parsing/handling behavior,
documents assumptions via executable examples,
improves CI signal across the full test matrix.

How to verify
Run:

cargo test -p quicklendx-contracts
cargo clippy --workspace --all-targets -- -D warnings
(Optionally) build for wasm release to confirm no std usage issues:

cargo build --target wasm32-unknown-unknown --release
Notes
Kept no_std discipline: generator/test code uses soroban_sdk primitives only.
Ensures tests run consistently in CI.
Closes: # (replace with the issue number for the maintainer)

If you want, I can also draft the exact GitHub comment text that requests assignment/permission to take this on (per your repo’s campaign guidance).


Task Completed
Completed address summary module wiring and endpoint.

Updated quicklendx-contracts/src/lib.rs to add endpoint:
get_address_summary(env: Env, addr: Address) -> Result<address_summary::AddressSummary, QuickLendXError>
Updated quicklendx-contracts/src/address_summary.rs to remove a bogus placeholder helper (business logic is handled by BusinessStrategy::summarize).
Updated TODO.md to mark module + wiring as done.

Verification:

cargo test -p quicklendx-contracts executed successfully (225 tests passed).

kindly verify my work and please give me feedback about it!

…ypoint)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Baskarayelu

Copy link
Copy Markdown
Contributor

Add a generator for proptest::Strategy for Address — clean work, in it goes 🚀

@Baskarayelu Baskarayelu merged commit f60d3a9 into QuickLendX:main Jun 27, 2026
1 check failed
@Chigybillionz

Chigybillionz commented Jun 27, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Chigybillionz

Chigybillionz commented Jun 27, 2026 via email

Copy link
Copy Markdown
Contributor Author

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.

Add a generator for proptest::Strategy for Address

2 participants