Skip to content

fix(options): parse lookalike bracket pairs in [OPTIONS:] labels - #10835

Merged
iamwhatever merged 1 commit into
kirodotdev:mainfrom
jeeshofone:fix/9375-options-marker-lookalike-pairs
Sep 15, 2026
Merged

iamwhatever merged 1 commit into
kirodotdev:mainfrom
jeeshofone:fix/9375-options-marker-lookalike-pairs

Conversation

@jeeshofone

@jeeshofone jeeshofone commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

A model that substitutes a fullwidth / CJK lookalike bracket emits a whole
matched PAIR (【...】, [...], 〔...〕), not just a stray closer. The
grammar accepted the lookalike CLOSERS (MARKER_CLOSERS) but had no matching
OPENER set: the matched-pair body form opened only on ASCII [ and closed on
any closer. So a label like [OPTIONS: 修复【x】 | 跳过] read its 】 as an
unmatched closer, the marker declined, and the turn silently lost its follow-up
pills.

Why it matters

[OPTIONS:] follow-up pills are how a turn offers choices. A single
lookalike-pair label makes the whole marker leak into the message as literal
text with no buttons — a silent loss of the turn's interaction, common in
Chinese output.

What changed

Add MARKER_OPENERS = "[\u3010\uff3b\u3014", paired POSITIONALLY with
MARKER_CLOSERS = "]\u3011\uff3d\u3015" ([<->], 【<->】, [<->],
〔<->〕). _MARKER_LABEL_PAIR now emits ONE matched-pair alternative per
pair by zipping the two strings: each alternative opens on its own opener, its
interior excludes [ and every closer, and it closes on THAT pair's closer
only. So [OPTIONS: 【x】 | Skip] parses exactly as [OPTIONS: [x] | Skip]
does, while a MISMATCHED pair (【 ... ]) has no pair parse and declines toward
a visible marker rather than deleting prose.

The disjointness invariant is preserved: every opener keeps its (?!OPTIONS:)
guard (load-bearing on [, a harmless no-op on the lookalikes, so "no bracket
form consumes a nested head" holds by construction); each per-pair form's
trailing lookahead stays the negation of _MARKER_LABEL_CONTINUES over the full
closer class; the body stays linear (each alternative begins at a distinct
opener, an unmatched lookalike opener falls to the negated-char run, and no span
has two parses). The TS mirror optionMarker.ts is updated in agreement (both
the wrapped and bare branches of OPTION_MARKER_RE). Explanatory comments are
rewritten in present tense to describe the paired opener set.

The balance check the patterns cannot make (_marker_labels_have_unmatched_opener / labelsHaveUnmatchedOpener) pairs openers by TYPE as well: a closer pops the innermost opener only when it is that opener's partner, and a closer of another kind is ignored exactly like an unmatched one. Under the previous single shared count [OPTIONS: A 【x] | B] parsed — the ] after x closed the 【 — and a label with a half-open lookalike pair rendered as options; now the 【 is still open at the terminator (the bare-opener shape) and the candidate declines with no prose moved.

Tests

The two suites that pinned the old cost are flipped to expect a parse, all other
assertions unchanged and passing:

  • test/test_options_marker_label_closers.py: the lookalike-PAIR "cost" case
    now asserts a matched-pair parse; a mismatched-pair cost is added; the
    non-destructive-decline case swaps its now-parsing lookalike-pair input for a
    mismatched-pair input. A new TestLookalikeBracketPairsParse covers each of
    the three CJK/fullwidth pairs (LINE and TRAILER), a mismatched pair declining
    non-destructively, a citation still parsing, and the trailing-prose and
    bare-opener-terminator declines still holding.
  • website/src/test/optionsMarkerLabelClosers.test.ts: the lookalike-PAIR cost
    test is flipped to a matched-pair parse; mismatched-pair, per-pair, citation,
    and bare-opener-terminator cases are added.
  • Typed pairing: test_a_mismatched_pair_declines_even_when_the_closer_ends_the_label (py) and declines a mismatched pair even when its closer ends the label (ts) pin [OPTIONS: A 【x] | B] and its three sibling shapes to decline non-destructively while cross-kind nesting ([x【y】]) and the unmatched-closer shape still parse; both fail on the previous head's shared-count check.

Verified from the worktree with the repo venv: options Python suites green
(281 across all test/test_*options*), frontend options suites green (109
across the four optionsMarker* vitest files), tsc -b and eslint clean.
Old-head check confirmed the new CJK-pair assertions fail on the base
constants.py. black / check_black_formatting / isort / flake8 / mypy /
comment-history / brand-name gates pass; zero .github/ diff.

Closes #9375. Lands after #10058 (merged via #10084), whose bare-opener terminator gate is what makes the opener set safe: without it, teaching the grammar that 【…】 is a pair would have turned the visible-marker failure into silent prose deletion for CJK labels — the reason this fix was deliberately held.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable) — the grammar's explanatory comments in constants.py describe the opener set
  • No secrets, credentials, or internal references in the diff

Pattern harvest

Rule candidate: when a regex grammar gains a new opener/closer family, EVERY negated body class and EVERY balance counter that referenced the old opener must be widened — and a balance counter must pair by TYPE, not by count, or the new family's closers close the old family's openers. Both must change in the same commit as the opener set. A class that excludes only the original opener turns a repeated new-opener run quadratic, and a counter blind to the new opener reopens the terminator / prose-deletion hole the balance gate exists to close. Neither is visible to parse-correctness tests; each needs its own pin — an adversarial-run cost ratio against the ASCII run, and a bare-new-opener-before-terminator decline.

@jeeshofone
jeeshofone requested review from a team and iamwhatever September 14, 2026 18:32
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — ✅ PASS

UX-level review of 72d0ccc6f41aa59556a8462444a6599473a84c85 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Verify once in the live chat that a [OPTIONS: 【x】 | Skip] turn renders pill buttons — the diff is parser-only, with no rendered evidence attached.

[UX-REVIEWED] 72d0ccc

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 72d0ccc6f41aa59556a8462444a6599473a84c85 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Only removed behavior: [OPTIONS: A 【x] | B] parsed on base (shared-count balance), now declines — unpinned on base, justified only by this PR's own reasoning; confirm that decline is wanted.

What this change ships

Inventory (8 items) — 8 justified

Intent: FIX — a matched CJK/fullwidth bracket pair inside an [OPTIONS:] label no longer silently costs the turn its follow-up pills (#9375).

  1. Matched 【】/[]/〔〕 pairs in labels now render pills on both surfaces — justified
  2. Half-open lookalike shapes ending on the wrong closer (A 【x] | B) no longer parse — justified
  3. Bare lookalike opener before the terminator now declines like ASCII [ — justified
  4. New MARKER_OPENERS constant plus derived classes — justified
  5. Balance check pairs openers by type instead of one shared count (py + TS) — justified
  6. TS mirror regex widened in both branches — justified
  7. "Lookalike pair is a cost" pins flipped in both suites — justified
  8. New opener-run linearity ratio pins — justified

Notes a human can audit: the deleted pins are declared, and their recorded reason for existing (no safe terminator gate) is answered by _marker_labels_have_unmatched_opener present on the base (src/kiro_crew/constants.py:398, landed via #10058); MARKER_OPENERS has 4 counted consumers (_MARKER_OPEN_CLASS, _MARKER_BRACKETS, the _MARKER_LABEL_PAIR zip, the balance check); grep for opener-counting siblings (ch === '[' / char == "[") found exactly the two sites the diff fixes; downstream partial-cut gates test closers only, so no sibling is left unwidened; the shape is pinned by linked issue #9375, so lens 9 does not apply.

[FIRST-PRINCIPLES-REVIEWED] 72d0ccc

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 72d0ccc6f41aa59556a8462444a6599473a84c85 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm #9375 intended lifting the lookalike-pair "cost" now that #10058's terminator gate landed — the flipped pins rest on that sequencing claim.

Suggestions

  • The old TestAcceptedCosts pin documented the lookalike pair as unaffordable because no opener set existed; the PR removes that reason with the opener set, keeps every invariant the old docs named (linearity, non-destructive decline, nested-head refusal, typed balance), pins each with a new test on both surfaces, and rewrites the docs in the same commit — no follow-up needed beyond the sequencing check above. The streaming probe (CONTINUES_LABELS_RE/CLOSER_RE) needs no change: this PR widens only openers, the closer set the probe keys on is untouched, and a mid-stream matched lookalike pair inherits exactly the documented ASCII-pair residual.

[DESIGN-REVIEWED] 72d0ccc

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 72d0ccc6f41aa59556a8462444a6599473a84c85 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 72d0ccc

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ✅ no blocking findings

Reviewed 72d0ccc6f41aa59556a8462444a6599473a84c85 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 72d0ccc

@jeeshofone
jeeshofone force-pushed the fix/9375-options-marker-lookalike-pairs branch from fdd767b to 75776cc Compare September 14, 2026 20:28
@jeeshofone

Copy link
Copy Markdown
Contributor Author

fdd767bab → 75776ccd5. Both lanes upheld two real defects in the first cut of this PR; both fixed at the seam, plus the Design/UX and PR-Hygiene reds.

Quadratic backtracking (GPT F1, Opus candidate 2, Design BLOCK). The per-pair interiors and the body's ordinary class excluded [ and the closers but NOT the three lookalike openers, so a run of 【 (an LLM repeated-token degeneration after an [OPTIONS: head) made each position start a pair attempt that scanned the whole remaining run before failing — O(n²), genuinely new to the PR. Fix: a single _MARKER_BRACKETS class (all four openers + all four closers) is what every negated class now excludes, so an unmatched opener of any kind falls to the bare-opener alternative in one step and a run costs one failed attempt per character. Measured on a 20k-opener run: ~2.7 ms (was ~300 ms on the previous head). _MARKER_OPEN_CLASS also replaces the bare \[ body alternative so every opener is covered. Mirrored in optionMarker.ts.

Silent prose deletion (Opus candidate 1, BLOCKING). The #10058 balance gate _marker_labels_have_unmatched_opener counted only ASCII [. Once lookalike openers became grammatically significant, a label like [OPTIONS: 【重要】修复 | B 详见【0】 — a matched pair then a bare 【 before the terminator — parsed and cut its trailing prose. Fix: the gate (and labelsHaveUnmatchedOpener in TS) counts every opener in MARKER_OPENERS, so a bare lookalike opener yields depth 1 and declines exactly as the ASCII bare-opener does.

Tests: the AssistantMessage shape-pin is updated to the per-pair body; new test_a_bare_lookalike_opener_before_the_terminator_declines_too and test_a_run_of_any_opener_costs_the_same_as_a_run_of_ascii_openers (plus TS twins) both FAIL on the previous head (the prose-deletion case parses; the run-cost ratio blows past 8×). 369 backend option-marker tests; full frontend suite 2085 files / 33,324 tests. All gates green; no .github/ diff. PR Hygiene: single commit, Conventional Commits title, and the ## Pattern harvest section is added below.

Pattern harvest

Rule candidate: when a regex grammar gains a new opener/closer family, EVERY negated body class and EVERY balance-counter that referenced the old opener must be widened in the same change — a class that excludes only the original opener turns a repeated new-opener run quadratic, and a counter blind to the new opener reopens the terminator/prose-deletion hole the balance gate exists to close. Both are invisible to the parse-correctness tests and need an explicit adversarial-run timing pin and a bare-new-opener decline test.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 14, 2026
@jeeshofone

Copy link
Copy Markdown
Contributor Author

Status note on 75776ccd5: both review lanes are green and PR Hygiene passed on its re-run. The remaining reds — Backend Tests (3.12, 3), Backend Tests (Windows) (2/3) and the fail-closed Coverage Gate behind them — are test/test_pod_windows*.py (test_stop_waits_for_the_supervised_pid_before_deleting_anything, test_stop_takes_the_exact_handle_path_on_every_host, test_stop_terminally_scans_an_exited_root_before_reporting_zero_residue) plus a Windows subprocess.TimeoutExpired in test_embedding_rebuild_process.py. None of those files are in this diff (a regex constant and its TS mirror), and main's own CI on 46034d9a4 (#10586, 19:24 UTC) shows the same Backend Tests (3.12, 3) failure, so they are inherited from the merge base rather than introduced here. I'll rebase once main is green again rather than re-run into the same break.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 15, 2026
@jeeshofone
jeeshofone force-pushed the fix/9375-options-marker-lookalike-pairs branch from 75776cc to 86cbcd4 Compare September 15, 2026 06:07
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 15, 2026
@jeeshofone

Copy link
Copy Markdown
Contributor Author

86cbcd4ea → e4cc5a7d0 (86cbcd4ea was the rebase onto current main; the diff to 75776ccd5 is this fix only). GPT's blocking finding upheld: the balance check counted every closer against every opener on one shared depth, so [OPTIONS: A 【x] | B] read as balanced — the ] after x "closed" the 【 — and a label with a half-open lookalike pair was accepted and rendered as options. The pattern side already paired by type; the balance side did not, and the balance side is the one that decides.

Fixed at class level on both grammars: _marker_labels_have_unmatched_opener and labelsHaveUnmatchedOpener keep a stack of opener kinds and pop only when the closer is the innermost opener's partner (MARKER_OPENERS/MARKER_CLOSERS are index-aligned; the TS mirror uses the same two strings). A closer of another kind is ignored exactly like an unmatched one, so the supported [OPTIONS: Alpha ] | Bravo ]] shape is untouched and cross-kind nesting ([x【y】]) still parses. Under typed pairing the 【 in the reported shape is still open at the terminator — the bare-opener class — and the candidate declines with no prose moved.

Tests: test_a_mismatched_pair_declines_even_when_the_closer_ends_the_label (py, LINE + TRAILER, four sibling shapes, sub leaves the text intact) and declines a mismatched pair even when its closer ends the label (ts); both fail on the previous head. Description and Pattern-harvest updated to say a balance counter must pair by type, not count.

2084 across the options/constants suites, 138 vitest across the two options files (the linearity pins included), black/isort/flake8/mypy, tsc, eslint, i18n gate, black-formatting/comment-history/agent-sdk-boundary gates green; no .github/ diff.

@jeeshofone
jeeshofone force-pushed the fix/9375-options-marker-lookalike-pairs branch from 86cbcd4 to e4cc5a7 Compare September 15, 2026 06:32
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 15, 2026
…odotdev#9375)

## Problem / Motivation

A model that substitutes a fullwidth / CJK lookalike bracket emits a whole
matched PAIR (`【...】`, `[...]`, `〔...〕`), not just a stray closer. The
grammar accepted the lookalike CLOSERS (`MARKER_CLOSERS`) but had no matching
OPENER set: the matched-pair body form opened only on ASCII `[` and closed on
any closer. So a label like `[OPTIONS: 修复【x】 | 跳过]` read its `】` as an
unmatched closer, the marker declined, and the turn silently lost its follow-up
pills.

## Why it matters

`[OPTIONS:]` follow-up pills are how a turn offers choices. A single
lookalike-pair label makes the whole marker leak into the message as literal
text with no buttons — a silent loss of the turn's interaction, common in
Chinese output.

## What changed

Add `MARKER_OPENERS = "[\u3010\uff3b\u3014"`, paired POSITIONALLY with
`MARKER_CLOSERS = "]\u3011\uff3d\u3015"` (`[`<->`]`, `【`<->`】`, `[`<->`]`,
`〔`<->`〕`). `_MARKER_LABEL_PAIR` now emits ONE matched-pair alternative per
pair by zipping the two strings: each alternative opens on its own opener, its
interior excludes `[` and every closer, and it closes on THAT pair's closer
only. So `[OPTIONS: 【x】 | Skip]` parses exactly as `[OPTIONS: [x] | Skip]`
does, while a MISMATCHED pair (`【 ... ]`) has no pair parse and declines toward
a visible marker rather than deleting prose.

The disjointness invariant is preserved: every opener keeps its `(?!OPTIONS:)`
guard (load-bearing on `[`, a harmless no-op on the lookalikes, so "no bracket
form consumes a nested head" holds by construction); each per-pair form's
trailing lookahead stays the negation of `_MARKER_LABEL_CONTINUES` over the full
closer class; the body stays linear (each alternative begins at a distinct
opener, an unmatched lookalike opener falls to the negated-char run, and no span
has two parses). The TS mirror `optionMarker.ts` is updated in agreement (both
the wrapped and bare branches of `OPTION_MARKER_RE`). Explanatory comments are
rewritten in present tense to describe the paired opener set.

## Tests

The two suites that pinned the old cost are flipped to expect a parse, all other
assertions unchanged and passing:

- `test/test_options_marker_label_closers.py`: the lookalike-PAIR "cost" case
  now asserts a matched-pair parse; a mismatched-pair cost is added; the
  non-destructive-decline case swaps its now-parsing lookalike-pair input for a
  mismatched-pair input. A new `TestLookalikeBracketPairsParse` covers each of
  the three CJK/fullwidth pairs (LINE and TRAILER), a mismatched pair declining
  non-destructively, a citation still parsing, and the trailing-prose and
  bare-opener-terminator declines still holding.
- `website/src/test/optionsMarkerLabelClosers.test.ts`: the lookalike-PAIR cost
  test is flipped to a matched-pair parse; mismatched-pair, per-pair, citation,
  and bare-opener-terminator cases are added.

Verified from the worktree with the repo venv: options Python suites green
(281 across all `test/test_*options*`), frontend options suites green (109
across the four `optionsMarker*` vitest files), `tsc -b` and `eslint` clean.
Old-head check confirmed the new CJK-pair assertions fail on the base
`constants.py`. black / check_black_formatting / isort / flake8 / mypy /
comment-history / brand-name gates pass; zero `.github/` diff.
@jeeshofone

Copy link
Copy Markdown
Contributor Author

Same tree re-pushed as a new head: e4cc5a7d0's only red was Frontend Tests shard 2 failing SteeringTab.test.tsx ("hides the default-mode chip": Unable to find an element with the text: always), a file this diff does not touch — it passes locally on the identical tree and passed on another PR's head built from the same main. Flake; a fork PR cannot rerun jobs. If it recurs I will file it.

@jeeshofone
jeeshofone force-pushed the fix/9375-options-marker-lookalike-pairs branch from e4cc5a7 to 72d0ccc Compare September 15, 2026 07:23
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 15, 2026
@iamwhatever
iamwhatever enabled auto-merge (squash) September 15, 2026 09:07

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (5 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: root cause is that the marker grammar accepted lookalike CLOSERS but only the ASCII opener, so a model emitting a whole lookalike pair inside a label produced a closer the matched-pair form read as unmatched and the whole marker was declined, losing the option pills; MARKER_OPENERS now pairs positionally with MARKER_CLOSERS and each alternative closes on its own closer only, with mismatched pairs still refused and linearity pinned by tests. CodeQL is not applicable on this fork PR (default-setup emits no check-run); SAST coverage is Semgrep only, latest run success with 0 annotations.

@iamwhatever
iamwhatever merged commit b8a0e61 into kirodotdev:main Sep 15, 2026
82 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 15, 2026
@jeeshofone
jeeshofone deleted the fix/9375-options-marker-lookalike-pairs branch September 15, 2026 09:29
amadsalmon pushed a commit to amadsalmon/KiroCrew that referenced this pull request Sep 22, 2026
…odotdev#9375) (kirodotdev#10835)

## Problem / Motivation

A model that substitutes a fullwidth / CJK lookalike bracket emits a whole
matched PAIR (`【...】`, `[...]`, `〔...〕`), not just a stray closer. The
grammar accepted the lookalike CLOSERS (`MARKER_CLOSERS`) but had no matching
OPENER set: the matched-pair body form opened only on ASCII `[` and closed on
any closer. So a label like `[OPTIONS: 修复【x】 | 跳过]` read its `】` as an
unmatched closer, the marker declined, and the turn silently lost its follow-up
pills.

## Why it matters

`[OPTIONS:]` follow-up pills are how a turn offers choices. A single
lookalike-pair label makes the whole marker leak into the message as literal
text with no buttons — a silent loss of the turn's interaction, common in
Chinese output.

## What changed

Add `MARKER_OPENERS = "[\u3010\uff3b\u3014"`, paired POSITIONALLY with
`MARKER_CLOSERS = "]\u3011\uff3d\u3015"` (`[`<->`]`, `【`<->`】`, `[`<->`]`,
`〔`<->`〕`). `_MARKER_LABEL_PAIR` now emits ONE matched-pair alternative per
pair by zipping the two strings: each alternative opens on its own opener, its
interior excludes `[` and every closer, and it closes on THAT pair's closer
only. So `[OPTIONS: 【x】 | Skip]` parses exactly as `[OPTIONS: [x] | Skip]`
does, while a MISMATCHED pair (`【 ... ]`) has no pair parse and declines toward
a visible marker rather than deleting prose.

The disjointness invariant is preserved: every opener keeps its `(?!OPTIONS:)`
guard (load-bearing on `[`, a harmless no-op on the lookalikes, so "no bracket
form consumes a nested head" holds by construction); each per-pair form's
trailing lookahead stays the negation of `_MARKER_LABEL_CONTINUES` over the full
closer class; the body stays linear (each alternative begins at a distinct
opener, an unmatched lookalike opener falls to the negated-char run, and no span
has two parses). The TS mirror `optionMarker.ts` is updated in agreement (both
the wrapped and bare branches of `OPTION_MARKER_RE`). Explanatory comments are
rewritten in present tense to describe the paired opener set.

## Tests

The two suites that pinned the old cost are flipped to expect a parse, all other
assertions unchanged and passing:

- `test/test_options_marker_label_closers.py`: the lookalike-PAIR "cost" case
  now asserts a matched-pair parse; a mismatched-pair cost is added; the
  non-destructive-decline case swaps its now-parsing lookalike-pair input for a
  mismatched-pair input. A new `TestLookalikeBracketPairsParse` covers each of
  the three CJK/fullwidth pairs (LINE and TRAILER), a mismatched pair declining
  non-destructively, a citation still parsing, and the trailing-prose and
  bare-opener-terminator declines still holding.
- `website/src/test/optionsMarkerLabelClosers.test.ts`: the lookalike-PAIR cost
  test is flipped to a matched-pair parse; mismatched-pair, per-pair, citation,
  and bare-opener-terminator cases are added.

Verified from the worktree with the repo venv: options Python suites green
(281 across all `test/test_*options*`), frontend options suites green (109
across the four `optionsMarker*` vitest files), `tsc -b` and `eslint` clean.
Old-head check confirmed the new CJK-pair assertions fail on the base
`constants.py`. black / check_black_formatting / isort / flake8 / mypy /
comment-history / brand-name gates pass; zero `.github/` diff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OPTIONS:] labels containing a lookalike bracket pair (【…】, […], 〔…〕) are not parsed

2 participants