Skip to content

Keep the reply-toll test within the reward window - #87

Open
dnlbui wants to merge 1 commit into
test/settle-attachment-menu-scrollfrom
test/reply-within-toll-window
Open

dnlbui wants to merge 1 commit into
test/settle-attachment-menu-scrollfrom
test/reply-within-toll-window

Conversation

@dnlbui

@dnlbui dnlbui commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

The read-and-reply toll test now waits for the expected reward balances instead of spending the reply window in fixed sleeps.

  • Reuse expectLiberdusBalanceToEqual() for bounded checks of both reward balances.
  • Let the existing message assertions wait for arrival; remove duplicate wallet navigation and fixed pauses.
  • Preserve the precise toll setup, both six-decimal reward assertions, and shared chat-readiness safeguards.

Fixed Flow

Send the paid message → wait for its arrival → confirm the read reward → reply → confirm the reply reward.

Why

In run 37319184103, all three replies arrived just after the network's 60-second reward deadline (60.333–60.837 seconds). The server accepted the replies but correctly omitted the expired reward. Removing unnecessary waits lets the test verify both rewards within the window.

Validation

Against https://liberdus.com/dev/, three consecutive Chromium runs passed with retries disabled. Captured transaction timestamps show replies at 34.906, 36.429, and 36.296 seconds, leaving over 23 seconds of margin.

CI=true ./node_modules/.bin/playwright test tests/multiUser.e2e.test.js --grep 'should receive toll on read and on reply' --project=chromium --workers=1 --retries=0 --repeat-each=3 --trace=on --reporter=line --output=/tmp/liberdus-reply-toll-85

After rebasing #84 onto this branch, both multi-user tests passed with two workers and retries disabled:

CI=true ./node_modules/.bin/playwright test tests/multiUser.e2e.test.js --project=chromium --workers=2 --retries=0 --trace=on --reporter=line --output=/tmp/liberdus-reply-toll-85-stacked

The rebased stack also passed npm run test:diagnostics (nine cases, including two intentional first-attempt failures whose retained artifacts are verified). git range-diff confirmed the diagnostics patch is unchanged.

node --check, git diff --check, and a separate make-code-skimmable review passed. The diff changes one test and adds no new helpers or options. The full 84-test suite was not rerun for this focused change.

Stack: #83 → #87 → #84. Review this PR against test/settle-attachment-menu-scroll.

Closes #85

@dnlbui
dnlbui added this pull request to stack #88 October 5, 2026 16:26
@dnlbui
dnlbui marked this pull request as ready for review October 5, 2026 16:26
@dnlbui dnlbui linked an issue Oct 5, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
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.

Keep the read-and-reply toll test inside the network reward window

1 participant