Extract each class in @sig/jsonrpc.rbs into its own file.
- User
Extract each class in @sig/jsonrpc.rbs into its own file.
Assistant
I'll start by exploring the existing structure to understand the conventions used in this project.
Assistant
Let me look at the existing split sig files to follow the established conventions.
Assistant
Now I understand the convention — each class wraps in
module JSONRPC ... end, mirroringlib/paths. I'll extract the eight JSONRPC classes into their own files and leave shared types, interfaces, module-level methods, and external library shims in the main file.Assistant
Now I'll rewrite the main
jsonrpc.rbs, removing the extracted classes while keeping the shared types, interfaces, module-level methods,Errorsmodule, and external library shims.Assistant
Now let me verify the signatures still validate. Let me check how this project type-checks.
Assistant
The
Loggererrors come frommiddleware.rbs(which I didn't touch) — they're pre-existing noise from running barerbs validatewithout library deps. Let me use the configured tool, Steep:Assistant
Let me confirm the 172 problems are pre-existing and not introduced by my change, by comparing against the original state.
Assistant
My stash comparison was contaminated — the untracked split files stayed in place. Let me measure the true baseline properly.
Assistant
Confirmed: 172 problems before and after — the split is type-check neutral. (The earlier 117 figure was a contaminated measurement where duplicate definitions coexisted.) The 172 pre-existing problems are unrelated to this work (railtie/
Dry/Typesdeclarations).Let me do a final sanity check on the directory layout:
Assistant
Done. The new-diagnostics shown are false positives from the IDE checking
jsonrpc.rbsin isolation — RBS/Steep load the entiresig/tree together, so cross-file references (Configuration,JSONRPC::Error) and the type aliases resolve fine. This is the same pattern the pre-existingparser.rbs/middleware.rbsalready rely on (they referenceRequest,Notification, etc. defined elsewhere). The authoritative check —bundle exec steep checkover the whole tree — reports 172 problems before and after, all pre-existing and unrelated.Summary
Extracted each of the 8 JSONRPC classes from
sig/jsonrpc.rbsinto its own file, mirroring thelib/layout and the existing split convention (each wrapped inmodule JSONRPC ... end):sig/jsonrpc/error.rbssig/jsonrpc/request.rbs