Skip to content

fix: preserve explanation text trapped inside GenUI fences - #419

Draft
taekchef wants to merge 5 commits into
mainfrom
codex/preserve-fence-tail-418
Draft

taekchef wants to merge 5 commits into
mainfrom
codex/preserve-fence-tail-418

Conversation

@taekchef

@taekchef taekchef commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

When a response places explanation text after a complete JSON value but before the closing dsh-ui fence (or omits the closing fence), the renderer previously adopted the JSON prefix, hid the whole source block, and silently hid the explanation. The same prefix-only repair could be returned by validate_dsh_ui as replacement JSON.

Repair now reports unconsumed source text. Settled rendering keeps the entire original block visible with a localized diagnostic, validation refuses a lossy replacement, and bounded feedback requests both the corrected fence and preserved text. A valid unclosed JSON body remains renderable; normal replies and progressive streaming are unchanged. Generic-label diagnostics use the same ownership rules as takeover. No prompt or component-selection rules are changed.

Issue #420 is also fixed: the tier-2 quote scanner now closes a malformed object key at its matching object delimiter, preserving the missing-colon JSON error and preventing later keyvalue pairs or sibling components from being absorbed into the key. Regression tests cover the reported sample with and without following sibling components, including validate_dsh_ui diagnostics.

Validation:

  • TypeScript, all 153 test files / 2,113 tests, tsdown build, standalone runtime check and lazy map asset check passed locally for the existing PR changes.
  • Regression coverage includes missing/late closing fences, streaming-to-settled restoration, corrected output, quoted/array/shape-repaired roots, validator rejection, panel/export prevention, and bounded feedback.
  • Added [Bug] keyvalue 记录漏写 "value": 成员名 → tier-2 补全吞成巨型成员名,校验器误报 requires value (a string) #420 regression coverage for malformed keyvalue member names and validator output. CI for the updated head commit is running.
  • Added installed-renderer browser acceptance to the existing smoke pipeline, including source visibility, inert HTML text and corrected-output recovery. Local Chromium installation failed because the downloaded archive was invalid; browser acceptance is pending CI, so this PR remains draft.

Related to #418. Fixes #420. This fixes a confirmed synthetic content-loss path for #418, not a confirmed diagnosis of that reporter's original session. Keep #418 open pending the original sample or reporter retest.

@wang-kaopu
wang-kaopu force-pushed the codex/preserve-fence-tail-418 branch from 67bb6a9 to 0eda442 Compare November 6, 2026 05:59

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] keyvalue 记录漏写 "value": 成员名 → tier-2 补全吞成巨型成员名,校验器误报 requires value (a string)

2 participants