lambdaclass / lambdaclass/eth-agent
RPC batch partial failure scenarios not tested
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Related to #8 - there are no tests verifying behavior when some requests in a batch succeed while others fail.
Current State
Tests likely only cover:
- All requests succeed
- All requests fail
Missing coverage for:
- Mixed success/failure in same batch
- Different error types in same batch
- Recovery from partial failures
Recommendation
Add tests for partial failure scenarios:
describe('batch requests', () => {
it('should handle mixed success/failure responses', async () => {
mockRpc.mockResponses([
{ result: '0x1' },
{ error: { code: -32000, message: 'execution reverted' } },
{ result: '0x3' },
]);
const results = await rpc.batchCall([...]);
expect(results[0]).toEqual({ success: true, value: '0x1' });
expect(results[1]).toEqual({ success: false, error: expect.any(Error) });
expect(results[2]).toEqual({ success: true, value: '0x3' });
});
});
Priority
Medium - Important for reliability
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the existing RPC batch request tests and the rpc.batchCall entry point first. Run the current test suite to confirm coverage for all-success and all-failure batches, then add cases for mixed outcomes, different error types, and recovery from partial failures. Done means the assertions verify successful and failed results remain correctly associated with their requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100