Skip to content

feat(diagnostics): add bounded counter summary#1796

Open
brentthomas248 wants to merge 1 commit into
QuickLendX:mainfrom
brentthomas248:feat/diagnostics-summary
Open

feat(diagnostics): add bounded counter summary#1796
brentthomas248 wants to merge 1 commit into
QuickLendX:mainfrom
brentthomas248:feat/diagnostics-summary

Conversation

@brentthomas248

Copy link
Copy Markdown

Closes #1738

Summary

  • add a public get_diagnostics_summary entrypoint returning compact protocol counters for off-chain scrapers
  • count invoice status buckets through existing indexes and bound active bid, open dispute, and held escrow scans with a documented scan limit/truncation flag
  • add focused tests for empty protocol state and active bid -> funded/disputed/held escrow transitions
  • include narrow baseline CI repairs needed for the current repository state to compile, lint, test, and run the wasm size gate

Verification

  • PATH="/Users/brentthomas1/.cargo/bin:/Users/brentthomas1/.codex/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Users/brentthomas1/.codex/tmp/arg0/codex-arg0F2qOjC:/Users/brentthomas1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:/Users/brentthomas1/.bun/bin:/Users/brentthomas1/.codex/bin:/Users/brentthomas1/.local/bin:/Users/brentthomas1/bin:/Users/brentthomas1/.npm-global/bin:/Users/brentthomas1/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" cargo test -p quicklendx-contracts diagnostics_summary -- --nocapture
  • PATH="/Users/brentthomas1/.cargo/bin:/Users/brentthomas1/.codex/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Users/brentthomas1/.codex/tmp/arg0/codex-arg0F2qOjC:/Users/brentthomas1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:/Users/brentthomas1/.bun/bin:/Users/brentthomas1/.codex/bin:/Users/brentthomas1/.local/bin:/Users/brentthomas1/bin:/Users/brentthomas1/.npm-global/bin:/Users/brentthomas1/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" cargo clippy -p quicklendx-contracts --all-targets -- -D warnings
  • git diff --check
  • PATH="/Users/brentthomas1/.cargo/bin:/Users/brentthomas1/.codex/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Users/brentthomas1/.codex/tmp/arg0/codex-arg0F2qOjC:/Users/brentthomas1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:/Users/brentthomas1/.bun/bin:/Users/brentthomas1/.codex/bin:/Users/brentthomas1/.local/bin:/Users/brentthomas1/bin:/Users/brentthomas1/.npm-global/bin:/Users/brentthomas1/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" cargo test --verbose
  • PATH="/Users/brentthomas1/.cargo/bin:/Users/brentthomas1/.codex/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Users/brentthomas1/.codex/tmp/arg0/codex-arg0F2qOjC:/Users/brentthomas1/.cache/codex-runtimes/codex-primary-runtime/dependencies/bin:/Users/brentthomas1/.bun/bin:/Users/brentthomas1/.codex/bin:/Users/brentthomas1/.local/bin:/Users/brentthomas1/bin:/Users/brentthomas1/.npm-global/bin:/Users/brentthomas1/.lmstudio/bin:/Applications/Codex.app/Contents/Resources" quicklendx-contracts/scripts/check-wasm-size.sh

Notes

  • cargo fmt --check is still blocked by broad pre-existing repository formatting drift across untouched files, so I did not run whole-repo rustfmt and avoided unrelated formatting churn.

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 diagnostics entrypoint summarizing protocol counters for off-chain scraping in diagnostics.rs

1 participant