Skip to content

test: add regression coverage for report-period guard boundary - #2254

Merged
Baskarayelu merged 1 commit into
QuickLendX:mainfrom
xtrial01:test/report-period-guard-2070
Jul 27, 2026
Merged

test: add regression coverage for report-period guard boundary#2254
Baskarayelu merged 1 commit into
QuickLendX:mainfrom
xtrial01:test/report-period-guard-2070

Conversation

@xtrial01

Copy link
Copy Markdown
Contributor

Closes #2070

Adds two regression tests to test_analytics_consistency.rs:

  • Property-style test covering small timestamps to lock in saturating behavior for timed periods
  • Deterministic test for the AllTime window confirming it preserves the full history range

Blocked on verification: main (3241a44) currently fails cargo check with 36 pre-existing, unrelated compile errors in quicklendx-contracts (duplicate QuickLendXError definitions, missing InvoiceLock/is_frozen/set_frozen, duplicate imports in idempotency.rs, etc.). Confirmed via git stash that this is not caused by this branch's diff. Opening as draft until main is fixed and I can confirm tests pass, clippy is clean, and the wasm build succeeds.

See issue comment for full error details.

Adds a property-style test for saturating timestamp behavior on timed
periods and a deterministic test confirming the AllTime window preserves
the full history range.

Note: main currently fails to compile (36 errors in
quicklendx-contracts, unrelated to this change) — see issue comment
for details. Verified via 'git stash' that main is broken independent
of this diff.
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@xtrial01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@xtrial01

xtrial01 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Started work on this — tests are written and pushed in draft PR #2254, but I can't verify them because main (3241a44) currently fails cargo check -p quicklendx-contracts with 36 errors unrelated to this issue.

Confirmed via git stash + cargo check that this is present on a clean main, not caused by my changes.

Most notable errors:

  • QuickLendXError defined twice (inline in lib.rs:22 and in errors.rs:8) with conflicting trait impls
  • Duplicate import block in idempotency.rs (symbol_short, Address, Bytes, BytesN, Env, Symbol imported twice)
  • Several missing items referenced but not defined: InvoiceLock (storage.rs), InvoiceStorage::is_frozen/set_frozen, QuickLendXError::UnstableCursor/BatchSizeExceeded/AccountIsFrozen

Given the commit history (#2136#2143 landed in quick succession), this looks like it could be a merge/rebase issue across a few recent PRs rather than one bad commit. Flagging so it can get fixed, happy to help narrow it down further if useful. Full error log is in the draft PR description (#2254).

@Baskarayelu
Baskarayelu merged commit 25405e8 into QuickLendX:main Jul 27, 2026
0 of 2 checks passed
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 tests for the report-period guard

2 participants