Skip to content

Binder: factor out the duplicated missing / element-loop / wrapping logic across converters #150

Description

@Reefact

Review finding 14/19 · conventional-comment issue (maintainability) · area binder · gate: decide before the v1 API freeze
To add once they exist: label binder; milestone v1. (Already applied: enhancement.)

Problem

The same shapes are copied across the converters: the "record REQUEST_ARGUMENT_REQUIRED and return a default token" block appears in roughly five places, ListOfSimpleProperties and ListOfComplexProperties carry twin element loops, and the nested-failure wrapping runs at two sites.

Impact

Several copies of the same invariant drift independently: a fix or a message change must be made in every copy, and one can be missed.

Direction

Extract the shared pieces — a RecordMissing(path) helper, a common element-iteration primitive, and the single NestedFailure.Group wrapping — so each converter expresses only what differs.

Context

Surfaced by the RequestBinder review (design spec #126, shipped in #141). Finding 14 of 19.
Note: finding #3's fix (nested PrimaryPortError leaf path) already landed in #141 and centralized one wrapping site into NestedFailure.Group — re-scope this against the current code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions