FAILURE MAP
← Case archive

FA-80595 / Bidirectional text layout / Member archive

Bracket pair identification: pair ordering · case 05

Bracket pairs come back ordered by closing position.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input [text, classes, stack limit]. Only characters of class ON take part. Openers ( [ { are pushed; on overflow of the stack limit stop and keep pairs found so far. A closer searches the stack from the top for its opener; if found it pairs and discards that entry and everything above; otherwise it is ignored. Return pairs sorted by opener.

Why this case matters

Mixed right-to-left and left-to-right text must resolve levels and visual order exactly, or words, numbers and carets land in the wrong place.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: pair ordering[[3, 5], [2, 7]][[2, 7], [3, 5]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗