Skip to content

Follow-ups from PR #63 review panel (low severity) #66

Description

@carldebilly

Low-severity findings from the PR #63 review panel, deferred past the 0.11.0 cut:

  • OneOrMore + C# default value: an explicit OneOrMore arity makes the parameter's default value permanently unreachable with no registration-time signal — reject or document the combination at schema build (OptionSchemaBuilder.ResolveArity).
  • Equal-duplicate enum values: ValidateEnumConflicts exempts comparer-equal duplicates, but scalar binding then rejects two values with an unrelated 'repeated occurrences' message — dedup equal values before binding or drop the exemption (InvocationOptionParser.cs).
  • Service resolution precedes the lower-bound check: a DI-registered collection parameter type bypasses 'requires at least one value' (HandlerArgumentBinder.BindParameter, services before positional) — move the arity check ahead of implicit service resolution for user options, or add a guarding test.
  • Effective-case fallback duplication: entry.CaseSensitivity ?? global is hand-inlined at 4+ sites (builder collision check, OptionSchema.ResolveToken, ValidateEnumConflicts, binder) — centralize as OptionSchemaEntry.EffectiveCase(global) to prevent drift.
  • InvocationOptionParser.ResolveParameterArity pass-through: one-line wrapper around schema.ResolveParameterArity — inline call sites and delete.
  • CanConsumePositional dead distinction: both branches identical (HandlerArgumentBinder.cs:434..445) — collapse or restore the intended collection-specific behavior.

Origin: PR #63 review panel during 0.11 release triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions