Skip to content

feat: add jsonrpc prt tests#733

Open
mpolitzer wants to merge 1 commit intonext/2.0from
feature/add-jsonrpc-prt-tests
Open

feat: add jsonrpc prt tests#733
mpolitzer wants to merge 1 commit intonext/2.0from
feature/add-jsonrpc-prt-tests

Conversation

@mpolitzer
Copy link

@mpolitzer mpolitzer commented Jan 27, 2026

closes #682

@mpolitzer mpolitzer self-assigned this Jan 27, 2026
@mpolitzer mpolitzer added the #feat:tests Feature: tests label Jan 27, 2026
@mpolitzer mpolitzer force-pushed the feature/add-jsonrpc-prt-tests branch from 5b26aa7 to 875aa23 Compare January 27, 2026 18:19
@vfusco vfusco requested review from Copilot and removed request for renatomaia and vfusco February 11, 2026 12:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands JSON-RPC test coverage for tournament-related (“prt”) methods and adjusts repository/query behavior to make list endpoints deterministic and align empty-list responses with existing “Application not found” semantics.

Changes:

  • Add extensive JSON-RPC tests for tournament/commitment/match/match-advanced endpoints.
  • Make list endpoints return RESOURCE_NOT_FOUND: Application not found when the result is empty and the application does not exist.
  • Stabilize ordering for pagination in Postgres queries (commitments and match advances).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
internal/repository/postgres/match_advanced.go Changes ordering for ListMatchAdvances to sort by OtherParent (stabilizes pagination within a fixed epoch/tournament/id_hash).
internal/repository/postgres/commitment.go Adds secondary ORDER BY on Commitment to make pagination deterministic when many rows share the same EpochIndex.
internal/jsonrpc/jsonrpc.go Adds “application exists” checks for multiple list handlers; tweaks GetMatchAdvanced parent handling.
internal/jsonrpc/util_test.go Adds helper result structs for JSON unmarshalling in tests.
internal/jsonrpc/jsonrpc_test.go Adds large suite of tests for new/expanded tournament data methods.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mpolitzer mpolitzer force-pushed the feature/add-jsonrpc-prt-tests branch 2 times, most recently from a13fa56 to 290a589 Compare February 12, 2026 19:12
@mpolitzer mpolitzer force-pushed the feature/add-jsonrpc-prt-tests branch from 290a589 to fc5f9a4 Compare February 13, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#feat:tests Feature: tests

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

Add unit tests for new JSON-RPC methods (PRT dispute entities) Tests: JSON-RPC correctness, limit & security coverage, and OpenRPC schema compliance

1 participant