Skip to content

[PeerX Backlog # 8] Add a tracing-based test-logging harness in CI #8

Description

@ameeribro4-sudo

Problem Statement
The contract supports soroban_sdk::events as the only observability
surface. Tests collapse all events into a single stream and a failing
assertion cannot easily be tied to a specific event sequence.

Why it matters
For property-based invariant testing and fuzzing, deterministic replay
of failed sequences is essential.

Expected Outcome
Tests can be replayed with --nocapture --test-threads=1 against a
deterministic ledger so any invariant failure reproduces bit-for-bit.

Acceptance Criteria

  • Jest-style test artifacts (CARGO_TARGET_TMPDIR/timing) are published.
  • An example test (swap_invariant) demonstrates the harness.

Implementation Notes
Use env.ledger().with_mut(|l| { l.timestamp = … }) — already exercised
in rate_limit.rs:sensitive_tests.

Files Affected

  • peerx-contracts/counter/Cargo.toml ([features] test-determinism).
  • Several *_tests.rs modules.

Dependencies Issue #1.
Difficulty / Effort 🥈 / S
Labels ci, testing, dx

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26ciPeerX Backlog label ci (bulk-imported)dxPeerX Backlog label dx (bulk-imported)testingPeerX Backlog label testing (bulk-imported)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions