Skip to content

fix(marker): temper every opener in the [OPTIONS streaming probe - #10923

Merged
KiroCrewCaptain merged 1 commit into
kirodotdev:mainfrom
rnoack1:split/option-actions-marker-grammar-py
Oct 27, 2026
Merged

KiroCrewCaptain merged 1 commit into
kirodotdev:mainfrom
rnoack1:split/option-actions-marker-grammar-py

Conversation

@rnoack1

@rnoack1 rnoack1 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Fix an inherited defect in the shipped [OPTIONS:] streaming probe, where a nested head opened by a lookalike bracket is held as a still-streaming marker that no continuation can ever complete, so the reply's text is detached and never delivered.

split_trailing_protocol_suffix holds back a reply tail that is still streaming into a marker, so a length rotation cannot cut a marker in half and post the pieces as raw protocol text. The decision is made by _OPTIONS_TAIL_PREFIX_RE, a deliberately loose prefix probe: a tail is held when every byte so far could still extend into a legal [OPTIONS:] body.

One of its rules was spelled narrower than the body it has to agree with. The complete body refuses a nested [OPTIONS: head after every opener the grammar pairs, because its ordinary-character alternative is [^{_MARKER_BRACKETS}] and so an opener is never an ordinary character there. The probe's ordinary alternative was [^[], which excludes only the ASCII [. The grammar pairs three more openers (\u3010, \uff3b, \u3014), and each of them matched [^[]. So a tail carrying a nested head behind a lookalike opener was held as streaming while the body could never accept it: a dead tail, held forever, its text cut out of the visible half.

Why it matters

The holding decision reaches live channel output. split_trailing_protocol_suffix is called by telegram/renderer.py, discord/renderer.py and whatsapp/turn_renderer.py, and WhatsApp discards the detached suffix at on_done, so a wrong hold loses the text outright rather than deferring it.

Measured end to end on pristine main, over a generated corpus of 3,770 tails: 150 tails are held, nest a head after an opener, and can never be completed. Driving each of those through the real split_trailing_protocol_suffix, 138 have their text detached out of the visible cut. [OPTIONS:\u3010OPTIONS: appended to Line one leaves Line one\n visible and the rest gone.

Not a goal

  • The [OPTION-ACTIONS:] grammar. Earlier revisions of this PR landed that grammar as the bottom layer of the feat(chat): render zero-turn option action chips in the follow-up bar #6823 stack. First Principles Review blocked it as having zero consumers, and Opus 5.5 Review separately asked for it to leave constants.py, which is already over its 1,600-line working target. Both are answered by deferring it: it now lands with the feat(chat): render zero-turn option action chips in the follow-up bar #6823 slice that first emits the marker. What remains is only the probe fix above, which stands alone and fixes a defect present on main today.
  • Widening the unfinished-marker check for a lookalike CLOSER. The same corpus shows a much larger class of tails held, detached and uncompletable because that check is ASCII-only about closers. It is inherited in full, none of it is introduced here, and it is deliberate: test_options_marker_closers.py locks it, its module docstring says not to widen the asymmetry, and a revision that did was rejected. A closer can still be rescued by the next byte; a nested head is already in the buffer and cannot be. Different in kind, so only the head rule is tightened, and a control asserts the closer looseness survives.
  • A new module for the marker grammar. With the action grammar deferred, constants.py gains 5 net lines rather than about 100, so the finding that asked for the split no longer applies.

What changed

src/kiro_crew/constants.py, two edits:

  • _MARKER_NON_OPEN_CLASS is derived from MARKER_OPENERS, the same string _MARKER_OPEN_CLASS is built from. It is the negation: what a pattern applying a per-opener rule may consume without applying it. Closers are deliberately not excluded, which is what keeps the probe looser than the body about closers.
  • _OPTIONS_TAIL_PREFIX_RE consumes that class instead of [^[], and applies the existing nested-head lookahead after _MARKER_OPEN_CLASS rather than after a literal [. Both classes come from the one MARKER_OPENERS string, so adding a fourth pair cannot reintroduce the gap.

The guard is spelled inline, matching how main already spells it at its other sites. No new shared temper constant is introduced.

Nothing else moves. The complete body, the trailer matcher, the closer rules and the steer-ack probe are untouched, so the only behaviour that changes is which tails are held. constants.py is 1,812 lines against a base of 1,807, inside the 2,000-line cap.

Tests

test/test_marker_probe_agreement.py is new and generated rather than hand-picked. It asserts the probe and the complete body agree about nested heads over a mechanical corpus, in the direction that holds: every tail nesting a head after an opener is refused, and refusing it is correct because none of them can be completed.

Proof: PROVEN test/test_marker_probe_agreement.py::TestTheNestedHeadGuardAgreesWithTheBody::test_every_tail_nesting_a_head_after_an_opener_is_refused, test/test_marker_probe_agreement.py::TestTheNestedHeadGuardAgreesWithTheBody::test_a_nested_head_after_any_opener_strands_no_text[\u3010], test/test_marker_probe_agreement.py::TestTheNestedHeadGuardAgreesWithTheBody::test_a_nested_head_after_any_opener_strands_no_text[\uff3b], test/test_marker_probe_agreement.py::TestTheNestedHeadGuardAgreesWithTheBody::test_a_nested_head_after_any_opener_strands_no_text[\u3014] (head 02e718c)

Two properties of its construction matter, both of which caused a false pass while being written:

  • The corpus is built from tokens, not characters. A nested head is eight characters, so no single-character alphabet can spell one, and a character corpus reports agreement on a rule it never exercised. Its brackets are read from MARKER_OPENERS and MARKER_CLOSERS, so a newly added pair cannot leave it blind, and test_the_corpus_can_spell_a_nested_head_after_every_opener fails if it does.
  • The assertion is stated over the tails themselves, not over the filtered set. Phrased as "no held tail nests a head it cannot complete" it passes vacuously once the probe is correct, because the fix removes those tails from the held set and the filter then finds none. It is stated positively over the 200 nesting tails instead, with a length assertion as the working-set control.

It carries its own controls: that the corpus yields complete markers and streaming tails at all, that the completion search can still return "impossible" for a tail that genuinely is, and that the deliberate closer looseness survives.

Fail-first. Reverting only the probe regex to its [^[] spelling fails 4 of the module's 13 tests, covering all three lookalike openers; the restore is byte-identical to the committed file by sha256. Over one 3,770-tail corpus on this tree the old probe holds 150 uncompletable nesting tails and the shipped probe holds 0. Removing the nested-head guard entirely holds all 200 of the working set, 50 of which lose their text end to end, so the 0 is discriminating rather than vacuous.

Verification on this revision. 9,674 passed, 5 skipped, 3 xfailed and 1 failure across 221 marker, options, channel, renderer, dispatcher and direct-constants-importer test files, reconciling exactly with the 9,683 that --collect-only reports. The one failure, test/test_search_segment_route.py::test_one_dictionary_per_host, is not this change's: it fails identically on a pristine main worktree at the merge base (1 failed, 31 passed in that file on both trees), and this PR touches no search or segmenter code. The marker blast radius plus test/test_crew_log_fullscan_guard.py is 551 passed and 3 xfailed across 13 files.

constants.py coverage is 85% over those 13 files against a floor of 80, its misses all pre-existing and none of them on the lines this change adds (479-481, 1309-1310, 1319-1320, 1329). black, isort and flake8 are clean; mypy src/kiro_crew/ is clean at 3,666 source files; the comment-history gate passes in enforcing mode at merge base cd89e05194, scoped to the two changed files.

scripts/check_file_line_cap.py reports 0 failures over 17,229 code files.

Rebased onto current main (3b96b6c499). Preservation is proven by CONTENT rather than by a whole-commit patch-id, which moves whenever upstream edits a file this PR also touches: the added and removed line SET is byte-identical at 198 lines (sha256 c5c398cf... before and after), the commit message sha256 is identical at 20a5e744..., the file list is identical, no per-file patch-id moved, and the commit is one commit with a single parent. A mutation control is armed: altering one added line moves that digest to e0bcc6ea..., so the identical digest discriminates. The rebase also brings the merged upstream fix #24531, which clears the two test_telegram_dispatcher.py injection-audit failures that were red on the previous revision; those were inherited, reproduced on a pristine main worktree carrying none of this diff, and pass there once that commit is in the tree.

Sibling sweep

Swept: every negated character class in src/kiro_crew/constants.py that mentions a bracket, every tail-prefix probe in the repo, and the dashboard's own copy of this grammar. The sibling class is "a pattern that must apply a per-opener rule, whose ordinary-character alternative is spelled as a literal [ instead of being derived from MARKER_OPENERS". Only one site instantiated it. The two complete bodies at constants.py:674 and :679 already derive their class from _MARKER_BRACKETS, so an opener is never an ordinary character there, and the other tail probe at constants.py:1332 admits no bracket class at all.

Sibling: src/kiro_crew/constants.py:1329 -- changed here
Sibling: website/src/app-sdk/protocol/optionMarker.ts:378 -- not affected -- the dashboard's streaming counterpart holds on a closer search rather than a body prefix closure, so it has no ordinary-character class and no nested-head lookahead to spell narrowly; it also runs only under an isStreaming gate, so a wrong hold is a transient frame and the sealed render shows the text as written.

Pattern harvest

Rule candidate: agents-md

Pattern: a prefix probe paired with a complete pattern must build its character classes from the same named constant the complete pattern uses, and must carry a generated-corpus agreement test. A class spelled as a literal cannot be seen to drift, because the two patterns agree on every input except the widest ones: here the probe and the body differed only on three non-ASCII openers, and every test of either one in isolation passed.

Where it applies: the defect itself had no second site, but the mechanism that let it ship does. test/test_marker_probe_agreement.py is the repo's only generated-corpus agreement test between a probe and its complete pattern. constants.py:1332's steer-ack probe and the three _prefix_closure control-comment markers at constants.py:1134-1138 have no such test, and neither does the Python/TypeScript pair that implements this grammar twice; each is referenced only by usage tests today. The rule asks that the next probe added, and any of those revisited, carries the agreement test rather than relying on hand-picked cases.

@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 15, 2026
@dwu96

dwu96 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review.

When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically.

@rnoack1
rnoack1 marked this pull request as ready for review September 15, 2026 00:58
@rnoack1
rnoack1 requested review from a team and buluoray September 15, 2026 00:58
@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
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 02e718c714670e65f0424378cb19299df2780ae1 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the probe now uses the same MARKER_OPENERS-derived guard the body already applies at constants.py:631 and :669, and it refuses only tails that can never be completed.

Notes

  • The ## Backwards compatibility section falls past the description's truncation point, so I could not read it. The only thing the patch takes away is holding tails that are already uncompletable, so I found no reader that breaks.

[DESIGN-REVIEWED] 02e718c

Description read

[DESCRIPTION-READ] 43a28cf6c67fc20d48d5c07574193546a2d2f817507cafaeeff5c7c22ecb112a

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

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

Review details

No findings.
[GPT-REVIEWED] 02e718c

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of 02e718c714670e65f0424378cb19299df2780ae1 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 does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (3 items) — 3 justified

Intent: stop a reply tail that nests [OPTIONS: after a lookalike opener (\u3010, \uff3b, \u3014) from being held as a streaming marker forever, which loses its text. This is a FIX.

  1. A tail that nests a head after a lookalike opener is no longer held, so its text stays visible in Telegram, Discord and WhatsApp output — justified
  2. Private _MARKER_NON_OPEN_CLASS, built from MARKER_OPENERS; the probe's opener guard now uses the _MARKER_OPEN_CLASS(?!OPTIONS:) spelling that the body sites at constants.py:631, :669 and :674 already use — justified
  3. A new generated test module, test/test_marker_probe_agreement.py, that fails on base and keeps the closer looseness as a control — justified

[FIRST-PRINCIPLES-REVIEWED] 02e718c

Description read

[DESCRIPTION-READ] 4dd77dac283564b28b50373c767e213c9a61af634ebc2a85bb6cde7e3f09c4ab

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@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
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

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

Review details

No findings.

Notes:

  • The new (?!OPTIONS:) guard on lookalike openers also applies inside the stray (...) tic. So a tail like [OPTIONS: A】(【OPTIONS: is no longer held, even though adding ) would make it a valid marker. That exact streaming tail is too contrived to count as a real input, but the new comment ("a tail holding one can never become legal") overstates the case for the tic position.

[OPUS-REVIEWED] 02e718c

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 15, 2026
@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch from e3254a2 to bb330dc Compare September 15, 2026 23:47
@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 merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 15, 2026
@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch 2 times, most recently from 9349b98 to 0e22071 Compare September 16, 2026 01:50
@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 16, 2026
@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch from 0e22071 to e503a5e Compare September 16, 2026 03:03
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 16, 2026
@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 19, 2026
@NicholasRBowers NicholasRBowers added needs-pr-triage PR scanner: awaiting automated triage drive-to-green PR claimed by drive-to-green pipeline and removed needs-pr-triage PR scanner: awaiting automated triage labels Sep 26, 2026
@NicholasRBowers

Copy link
Copy Markdown
Contributor

🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR was flagged for automated triage with failing CI. I've assessed the blockers and they appear resolvable — I'll push fixes directly to this branch as a co-author.

Assessment: nothing here is a code failure. Both blocking readiness items are review lanes that never produced a verdict — GPT 5.6 logged ERROR: Reconnecting... 5/5 then Connection failed: error sending request on both passes and failed closed, and Opus 4.8 died on connect ECONNREFUSED 54.185.253.63:443 with exit 127; Design Review and First Principles hit the same outage and read "review incomplete (advisory)". The readiness run at 06:41 today records exactly failed=[Opus 5 Review (failure) GPT 5.6 Review (failure)] with nothing pending, and every other lane under passed. There is no merge conflict: a trial git merge-tree against current main is clean, constants.py auto-merges, and the four standalone test files pass 79/79 on the merged tree.

I tried the cheap fix first and it is not available: both Stage-2 lane runs answer cannot be rerun; This workflow run cannot be retried. And a rerun would be the wrong instrument anyway — this branch is 952 commits behind main, so any verdict it earned would describe a merge base nobody is going to merge, and the rebase you eventually need would invalidate it again. So the plan is a rebase onto today's main, which mints a fresh head and re-fires all five lanes against the tree that will actually land.

Two things I'll fix while I'm in there, because they are the reason Design and First Principles both raised CONCERNS on the 09-16 head and would raise them again unchanged:

  • The description says the change is additive, but this PR's own test_options_parsing_riders.py says "They are not additive" and pins three live [OPTIONS:] behaviour changes. I'll correct the description to declare those three changes rather than leave a claim the tests contradict — a reviewer approving on the strength of "additive" would be approving something untrue.
  • Those CONCERNS have no dispositions on record. I'll post one per item against the new head once the lanes restamp.

Worth noting for the record: GPT's last real verdict (on the older head e82c0d4) was a fenced security-class BLOCKING at constants.py:1310 asking the nested-head guard to use _MARKER_BODY_TEMPER, and your current head already applies exactly that at constants.py:1603-1604 — but no lane has confirmed it, which is what the rebase will settle.

What I will not do is act on First Principles' item 8, the seven new public helpers with no src/ caller yet (match_action_markers, strip_action_markers, excise_marker_spans, marker_head_len, rfind_marker_head, starts_with_marker_head, MARKER_STRIP_ANYWHERE_RE). You describe this PR as the bottom layer of #6823 cut to stand alone, with the sibling slice #10924 consuming it, so deleting them would gut the slice's purpose. That is your sequencing decision, not mine — I'll disposition it and, if a lane turns it into a BLOCK on the fresh head, hand it back to you rather than subtract your seams.

If you'd prefer I don't touch this PR, add the pr-no-autofix label.

@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch from 55bca06 to 2e7a3dc Compare September 26, 2026 11:38
@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 26, 2026
@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch from 2e7a3dc to a46ad7b Compare September 27, 2026 00:13
@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 27, 2026
@rnoack1
rnoack1 force-pushed the split/option-actions-marker-grammar-py branch from a46ad7b to 617fa45 Compare September 27, 2026 02:42
@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 27, 2026

Copy link
Copy Markdown
Contributor

Triage (open-PR sweep, 2026-10-05): REBASE + MERGE-DISCUSSION. Keep open.

Main coverage. origin/main (5edf2feecb) has none of this. git grep finds no OPTION-ACTIONS, _MARKER_BODY_TEMPER, MARKER_PREFIXES, excise_marker_spans or rfind_marker_head under src/, test/ or website/src/. split_trailing_protocol_suffix on main still runs one OPTIONS_RE_TRAILER.search(text[:suffix_start]) (constants.py:1273). No merged PR supersedes this one. That includes #14313 (merged PR, glued-marker recovery) and #15945 (merged PR, dashboard asks list), both of which touch this area.

Freshness. Head 98173854a2 is still the 09-15 commit. The rebase announced on 09-26 did not happen, and the branch is now 1363 commits behind main. A trial merge onto current main is clean. On that merged tree, 1164 tests pass (2 skipped): the PR's 6 test files plus every test/*options*/*marker*/*suffix*/*renderer* suite. A rebase is still needed so that the GPT and Opus lanes, which failed on infrastructure, give a verdict on the tree that would actually land.

Behaviour change on main, not purely additive. I checked this by calling split_trailing_protocol_suffix on main and on the merged tree. For "Line one\n[OPTIONS: a | b]\n[OPTIONS: c | d]", main leaves the first marker in the visible half. With this PR, both markers go into the suffix. On WhatsApp (turn_renderer.py:334) the suffix is discarded, so that earlier raw marker line no longer appears in the bubble. Telegram and Discord carry the whole run along with the tail. I found no case where prose is swallowed: a body closer must be followed by |, , or another closer, so "Prose [OPTIONS: a | b] see below [OPTION-ACTIONS: close=X]" keeps see below visible. Not a P0 and not breaking, but the description should say so, as Design and First Principles already ask.

Merge discussion: stack order and parity.

No request-changes from this sweep: I found no breaking change or P0 that the existing lanes haven't already raised.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision 02e718c714670e65f0424378cb19299df2780ae1 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@rnoack1

rnoack1 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Re the 2026-10-05 triage sweep: every item is satisfied at head 429741b18e9a97664b8efe202b8ffd96dd172009. Most of them by deletions made after you wrote it, so this is a status note rather than a request to re-review.

Rebase: done. You measured 98173854a2 as 1363 behind. The branch is now ahead 2, behind 84, merge base 512f13c792. All five AI lanes have rendered verdicts naming the current head.

The behaviour change you measured is gone. You found that main keeps the first marker visible for "Line one\n[OPTIONS: a | b]\n[OPTIONS: c | d]" while this PR pulled both into the suffix. That came from a multi-marker run walk, which has since been removed. At this head:

visible  'Line one\n[OPTIONS: a | b]\n'
suffix   '[OPTIONS: c | d]'

The first marker stays in the visible half, matching main. So there is no WhatsApp difference left to describe, and the description change you and the lanes asked for is moot.

The zero-caller public helpers are all gone. git grep at this head over src/, test/ and website/src/ returns 0 for match_action_markers, strip_action_markers, excise_marker_spans, MARKER_STRIP_ANYWHERE_RE, rfind_marker_head, MARKER_PREFIXES and OPTION_ACTIONS_RE_LINE. Positive control on the same grep, so those zeros are not blind: OPTION_ACTIONS_RE_TRAILER 17 hits, _MARKER_BODY_TEMPER 12. The only public symbol this PR adds is OPTION_ACTIONS_RE_TRAILER, and split_trailing_protocol_suffix is its caller.

The parity split with #10924 no longer exists on this side. _MARKER_HEADS is gone (0 hits), along with the per-head casing machinery, so there is no second casing rule to reconcile. Both heads are matched case-sensitively now, as the shipped [OPTIONS:] head always has been, and the singular [OPTION: is not a declared head here. #10924 is open and carries the web half.

Your positive finding still holds. "Prose [OPTIONS: a | b] see below [OPTION-ACTIONS: close=X]" keeps see below visible.

Still open, and not something I can settle: First Principles blocks on the grammar landing before its emitter, which is a stack-order call rather than a defect.

The unfinished-marker probe admitted any character except an ASCII `[`, so a lookalike opener carried a nested `[OPTIONS:` head past the guard; the body refuses a head after every opener, so such a tail was held as a still-streaming marker no continuation could finish, and a detached suffix is discarded rather than rendered, so the reply silently lost that text. The ordinary alternative now excludes every opener the grammar pairs, and each opener carries the body's own guard.

Over the new test's generated corpus of 3,770 tails, 150 were held and uncompletable before this change and none is now, while a probe with the guard removed leaves 200. The deliberate looseness about a lookalike CLOSER mid-label is untouched, with a negative control pinning it.

Co-authored-by: Robert Noack <rnoack1@users.noreply.github.com>

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

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 (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the [OPTIONS streaming probe applies the nested-head guard after every opener the grammar knows, with a token-corpus agreement test.

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.

6 participants