Skip to content

runtime/server.rs exceeds the audit file-length threshold (1534 > 800 LOC) #74

@nficano

Description

@nficano

Category: refactor Severity: major
Location: crates/arcp-runtime/src/runtime/server.rs:1-3

What

At 1534 lines, server.rs owns builder configuration, handshake, transport loops, job dispatch, cancellation, subscriptions, artifacts, and utility helpers. This size makes spec-critical behavior hard to audit and has already hidden several missing conformance paths.

Evidence

//! ARCP runtime — the server side that drives the ARCP v1.1 §6.2
//! hello/welcome handshake (serialized as `session.open` / `session.accepted`)
//! and dispatches subsequent envelopes.

Proposed fix

Split server.rs along existing cohesion boundaries: handshake/session lifecycle, job invocation/cancel, subscription handling, artifact dispatch, and builder/configuration.

Acceptance criteria

  • No extracted runtime module exceeds 800 lines, and the public runtime API plus existing tests continue to pass.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions