Skip to content

Capabilities Javadoc says unknown features round trip but code drops them #35

@nficano

Description

@nficano

Capabilities documents that unknown feature strings are preserved on the wire as ignored but round-trip-safe at arcp-core/src/main/java/dev/arcp/core/capabilities/Capabilities.java around line 13. The JSON creator in the same file around line 30 converts wire strings through Feature.fromWire and flatMap, so unknown strings are silently dropped and are not stored anywhere for later serialization. This makes the Javadoc factually inaccurate and can mislead downstream implementors about forward compatibility behavior.

Fix prompt: Decide whether unknown feature preservation is a supported behavior. If it is not, update the Javadoc to say unknown feature strings are ignored and dropped during decoding. If preservation is required, extend Capabilities with storage for unknown feature wire strings, include them in featuresWire(), and add round-trip tests that parse a known and unknown feature together and serialize both back to the wire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:lowLow severity

    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