Summary
Second-pass well-written-code audit finding. packages/client/src/client.ts has a file-level max-lines disable and still centralizes the full client lifecycle in an 861-line file.
Evidence
packages/client/src/client.ts:1 disables max-lines for the whole file.
packages/client/src/client.ts:63 through packages/client/src/client.ts:70 list the surface handled here: handshake, submit, cancel, close, ack, listJobs, and subscribe.
- The file currently has 861 lines.
Why it matters
The client is a concurrency-heavy protocol boundary. Keeping connection state, pending accepts, resume, heartbeat/liveness, job submission, list-jobs, subscriptions, and close semantics in one suppressed file makes review difficult and lets new behavior accumulate without an architectural boundary.
Proposed fix
Split the implementation into cohesive modules, for example connection/session lifecycle, job submission/handles, subscription/list-jobs operations, and heartbeat/liveness. Keep ARCPClient as the public facade and remove the file-level max-lines disable.
Acceptance criteria
packages/client/src/client.ts no longer needs a file-level max-lines disable.
- Extracted modules preserve the existing public API and tests.
- New or moved tests cover the extracted lifecycle/submission/subscription boundaries.
Summary
Second-pass well-written-code audit finding.
packages/client/src/client.tshas a file-levelmax-linesdisable and still centralizes the full client lifecycle in an 861-line file.Evidence
packages/client/src/client.ts:1disablesmax-linesfor the whole file.packages/client/src/client.ts:63throughpackages/client/src/client.ts:70list the surface handled here: handshake, submit, cancel, close, ack, listJobs, and subscribe.Why it matters
The client is a concurrency-heavy protocol boundary. Keeping connection state, pending accepts, resume, heartbeat/liveness, job submission, list-jobs, subscriptions, and close semantics in one suppressed file makes review difficult and lets new behavior accumulate without an architectural boundary.
Proposed fix
Split the implementation into cohesive modules, for example connection/session lifecycle, job submission/handles, subscription/list-jobs operations, and heartbeat/liveness. Keep
ARCPClientas the public facade and remove the file-levelmax-linesdisable.Acceptance criteria
packages/client/src/client.tsno longer needs a file-levelmax-linesdisable.