Skip to content

M3: Uri.EscapeDataString TFM divergence — refuse, normalize, or tolerate (R2-3) #32

Closed

Description

@Blind-Striker

From the second verified review of PR #26 (finding R2-3, CONFIRMED). Policy decision needed.

Finding. Uri.EscapeDataString behaves differently across the locked TFM matrix: net472/netstandard2.0 throw UriFormatException for inputs over 32766 chars or containing lone surrogates, while net8+ silently substitutes U+FFFD. Same input: untyped crash outside the SDK exception taxonomy on one TFM, silently altered wire data on another. Reaches user input via SessionListRequest.Search, server-echoed cursors (OpenCodeRoutes.cs), and path ids; no guard normalizes or validates first.

Options to weigh: validate at the route boundary (refuse lone surrogates/oversize with a typed ArgumentException on every TFM — fail-closed and uniform); normalize deliberately (document U+FFFD substitution as a recorded tolerance); or wrap the net472 UriFormatException into the taxonomy. The fail-closed posture favors uniform refusal.

Trigger: adversarial or truncated user-supplied Search text on the net472 leg; must seal before any GA. No legitimate traffic hits it today.

Milestone: M3 (rides the net472 cluster with the ServicePointManager item).

Activity

  1. Blind-Striker commented on Aug 15, 2026

    @Blind-Striker
    CollaboratorAuthor

    Sealed as uniform route-boundary refusal (research log Session 24): lone surrogates and oversize inputs refuse with a typed ArgumentException on every TFM before escaping. Executes in the M3 net472 cluster (plan Arc 5), which the ADR-0010 singleton posture promotes to a GA gate.

  2. Blind-Striker commented on Aug 20, 2026

    @Blind-Striker
    CollaboratorAuthor

    Implemented in b261014 and verified by hosted CI run 32350952168 on Linux, Windows, and macOS. Every generated path value and query/deep-object value now refuses inputs over 32,766 UTF-16 code units and lone surrogates before Uri.EscapeDataString. Existing path blank/dot-segment guards and empty opaque cursor behavior remain unchanged. Boundary, valid-pair, exact-limit, generator snapshot, and generated-source compilation evidence are green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions