Skip to content

Capabilities.interrupt defaults to true, contradicting its own KDoc and RFC §7 #62

@nficano

Description

@nficano

Capabilities at lib/src/main/kotlin/dev/arcp/messages/Session.kt:32 carries the class-level KDoc "Absent boolean fields default to false per §7", but its interrupt property at lib/src/main/kotlin/dev/arcp/messages/Session.kt:50 defaults to true. docs/guides/sessions.md:90 even calls this out (interrupt is the only boolean that defaults to true; all others default to false per RFC §7), so two pieces of documentation disagree about the same line of code. The asymmetry also leaks into negotiate at lib/src/main/kotlin/dev/arcp/runtime/CapabilityNegotiation.kt:52: a peer that omits interrupt from its wire Capabilities is deserialized with the Kotlin default true, so the AND-style negotiation reports interrupt = true even when neither side intended to advertise it.

Fix prompt: Pick one interpretation and apply it everywhere. If interrupt should default to true for SDK ergonomics, update the class-level KDoc to call out the deliberate exception (and reference RFC §10.5), and add a comment on the property explaining why. If RFC §7 governs, change the default to false and update docs/guides/sessions.md accordingly. Either way, add a CapabilityNegotiationTest case asserting that two peers that both omit interrupt end up with the documented negotiated value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:mediumMedium severity issue

    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