📋 Description
diagnostics.rs emits domain-tagged structured signals, but there is no single read entrypoint returning a compact counter summary (invoice count by status, active bids, open disputes, escrows held) that an off-chain scraper can poll in one call. Scrapers currently must aggregate from many separate getters.
Why this matters: observability scrapers want one cheap snapshot, not N round-trips. A single diagnostics summary read gives monitoring a stable, low-cost contract for protocol-health counters.
🎯 Requirements & Context
Context & constraints
- SDK
25.1.1. Pure read; no auth.
🛠️ Suggested Execution
git checkout -b feature/diagnostics-summary
cargo test -p quicklendx-contracts diagnostics_summary -- --nocapture
cargo clippy -p quicklendx-contracts --all-targets -- -D warnings
- Edge cases: empty protocol (all zeros); counts after a full lifecycle; bounded behavior with many records.
Example commit message
feat(diagnostics): add get_diagnostics_summary counter snapshot
One bounded read returning invoice/bid/dispute/escrow counters for off-chain
scrapers.
✅ Acceptance Criteria & Guidelines
| Requirement |
Target |
| Single bounded summary read |
Required |
| Reuses existing counters (no re-scan) |
Required |
| Test coverage |
≥ 95% |
cargo clippy clean |
Required |
| Timeframe |
96 hours from assignment |
💬 Community & Support
Join Discord: https://discord.gg/VpngvTjWa — comment to claim. 🚀
📋 Description
diagnostics.rsemits domain-tagged structured signals, but there is no single read entrypoint returning a compact counter summary (invoice count by status, active bids, open disputes, escrows held) that an off-chain scraper can poll in one call. Scrapers currently must aggregate from many separate getters.🎯 Requirements & Context
get_diagnostics_summary(env) -> DiagnosticsSummaryaggregating counts from existing getters (invoice status counts, active bids, open disputes viaget_invoices_with_disputes, escrows held).count_active_invoices) rather than re-scanning.///doc comments.Context & constraints
25.1.1. Pure read; no auth.🛠️ Suggested Execution
git checkout -b feature/diagnostics-summary cargo test -p quicklendx-contracts diagnostics_summary -- --nocapture cargo clippy -p quicklendx-contracts --all-targets -- -D warningsExample commit message
✅ Acceptance Criteria & Guidelines
cargo clippyclean💬 Community & Support
Join Discord: https://discord.gg/VpngvTjWa — comment to claim. 🚀