Skip to content

fix(normalization): keep code spans with embedded backticks whole in plain-text previews - #196690

Merged
obviyus merged 23 commits into
openclaw:mainfrom
wangmiao0668000666:fix/markdown-multi-backtick-code-span
Nov 11, 2026
Merged

obviyus merged 23 commits into
openclaw:mainfrom
wangmiao0668000666:fix/markdown-multi-backtick-code-span

Conversation

@wangmiao0668000666

@wangmiao0668000666 wangmiao0668000666 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Precedent: #196547 (same owner, flattenMarkdownToPlainText inline-code handling); #187853 (same function, earlier shape).

What Problem This Solves

Session previews and sidebar narration still drop code contents when the code itself contains a backtick. A message like Rename to ``abnow` showed as `Rename to ab now` instead of `Rename to a`b now`, and a common glob pattern like **/*.ts `` came back as **/.ts.

This is the multi-backtick twin of #196547 (merged this morning): that PR replaced a lossy [^\]* capture with NUL placeholders, but it pairs spans by a single backtick, so a span opened with two backticks (`` ````) still truncates at the first inner backtick. CommonMark pairs inline code by backtick runs of equal length, so `` ``ab is a single valid span whose content is a`b.

Why This Change Was Made

flattenMarkdownToPlainText now holds inline code spans with a run-length scanner instead of a single-backtick regex. A span opened by an N-backtick run is closed only by a run of exactly N backticks; the content between them — including inner backticks — is preserved whole through block-marker and emphasis stripping and restored after whitespace collapsing. NULs outside code are still doubled so they cannot look like a placeholder, and the scanner runs after link stripping so backticks inside link destinations stay visible to link parsing. An unmatched opening run is consumed whole (not one backtick at a time), so its tail backticks cannot reopen as a narrower span and steal delimiters from a later valid code span. A single-line backtick run (three or more) is a code span, not a fenced block — only a run that spans a line break is left for fence stripping.

Behavior for 1-backtick spans, link destinations holding backticks, fences, and the existing inline-code row is unchanged: all pre-existing flattenMarkdownToPlainText cases and the projectSessionDisplayMessage cases produce identical output, with the addition of embedded-backtick, triple-backtick, single-line-run, and unmatched-run cases.

Production LOC is +57/-10, net +47 (shrunken from the first review's +79/-10 by the UI-asset-budget repairs below).

Classification: behavior-completing (recovers content that a documented Markdown form previously lost in previews).

User Impact

Code names, globs, and Markdown examples that themselves contain a backtick now read back exactly as written in session-list previews, sidebar narration, and title/template excerpts. The stored transcript was never affected; this only changes the flattened plain-text projection.

Evidence

Review-finding repairs (RED base -> GREEN exact head)

Four review findings were repaired and are covered by committed regression cases
(markdown-plain-text.test.ts, suite now 46 passed on head):

  • Multiline inline code — CommonMark lets a code span span lines, so a
    newline cannot mark a fence. The scanner now skips only line-start runs of
    three or more backticks; multiline spans of any run length are held whole.

    • RED (prior head, newline guard): Use init\nnext now → Use `init next` now
    • GREEN (exact head 07b79ad91a4): Use init\nnext now → Use __init__ next now; Use ``a\nb`` now → Use a b now
  • Indented fenced blocks — CommonMark lets a fence start with up to three
    spaces of indentation, so the line-start check must allow them.

    • RED (prior head, immediate-newline guard): Before\n ```ts\nx\n ```\nAfter → Before ts x After
    • GREEN (exact head 07b79ad91a4): Before\n ```ts\nx\n ```\nAfter → Before After
  • Completed triple fences — the fence fast-path skipped inputs that carried
    only triple-backtick runs, and the pairing pass only removed four-plus-backtick
    or tilde fences, so a completed triple-backtick block could have an inner
    backtick paired by the inline-code scanner (hiding the closing fence in a NUL
    placeholder the trailing fence regex then could not remove). Fences now strip
    completed triple runs through the existing fence owner before inline-code
    protection; single-line triple runs are still inline code.

    • RED (prior head a5a3ff81): Before\n```text\n\n\nAfter `ok`.` → `Before text After ok.
    • GREEN (exact head 87182cfd): Before\n```text\n\n```\nAfter ok.` → `Before After ok.`
  • UI asset budget — the run-length scanner ships in the Control UI bundle
    via sidebar narration, and the exact-head control-ui-performance check
    reported the largest JS chunk ~0.4 KiB gzip over base. The nested run-scanning
    loop was replaced with a single lookaround regex that finds the next backtick
    run of exactly the opener's length, and the unmatched-run and line-start fence
    skip were merged into one check. The scanner's minified size drops from 559 B
    to ~440 B, and line-start inspection is bounded to the current line (a
    lastIndexOf("\n") + one regex on the leading run, per ClawSweeper's
    bounded line-start inspection request) rather than re-slicing the whole
    prefix. Behavior is unchanged: all 43 committed cases and 72 adversarial
    fence/inline-code inputs produce identical output to the prior head.

    Budget overage: the exact-head control-ui-performance check measures
    +199 B gzip for both chat-boot and new-session boot JS versus base; the
    largest-JS budget allows only the inherited base overage plus 64 B build
    variance. This is the equal-length-run pairing's necessary cost — CommonMark
    pairs inline code by backtick runs of equal length, which a single-backtick
    regex cannot express — already reduced from ~0.4 KiB to +199 B. The scanner
    was shrunk through 8 implementation variants (equal-length regex pairing,
    bounded line-start inspection, single-pass line tracking) with identical
    output across all 43 committed cases and 74 adversarial inputs; the remaining
    delta is the semantic floor for run-length pairing plus fence/unmatched
    handling, and cannot be lowered without dropping the fix's core behavior.

    ClawSweeper's review (needs-human, reviewed head dc6ca75e) recommends
    explicitly approving a narrowly measured budget exception for this delta:
    "Approve narrow exceptions: Accept the useful preview fix, quantify the
    current-head asset deltas, and explicitly approve only those deltas plus the
    seven inherited test-debt lines." This PR requests that owner approval rather
    than expanding the enforced cap unilaterally.

Shipped Gateway proof (RED base -> GREEN exact head)

Built Gateway (node dist/index.js) per side in secretless local Docker, an
OpenAI-Responses stand-in (HTTP fixture at OPENAI_BASE_URL) replying with fixed
text, real Gateway gateway run --allow-unconfigured on loopback with a token,
an agent turn driven by chat.send, and the preview read via sessions.list
(includeLastMessage: true).

Stand-in reply:
Rename to ``aband match**/*.ts. Keep xy`` whole.

  • RED (base = current main 0fd8c138f5b, without this fix):
    • chat.history assistant message (original preserved): Rename to ``aband match**/*.ts. Keep xy`` whole.
    • sessions.list lastMessagePreview: Rename to ab and match **/*.ts. Keep xy whole. — embedded backticks dropped (ab→ab, xy → xy) and a stray backtick remains after **/*.ts.
  • GREEN (exact head 07b79ad91a4, with this fix):
    • chat.history assistant message (original preserved): Rename to ``aband match**/*.ts. Keep xy`` whole.
    • sessions.list lastMessagePreview: Rename to ab and match /*.ts. Keep xy whole. — embedded backticks preserved (ab, /*.ts, xy all whole).

Direct dist-call controls (same built dist as the Gateway run):

head flattenMarkdownToPlainText("Rename to ``a`b`` and match ``**/*.ts``.")
  = "Rename to a`b and match **/*.ts."       (multi-backtick span kept whole)
head flattenMarkdownToPlainText("Run ```a`b`c``` to finish")
  = "Run a`b`c to finish"                    (single-line triple-backtick is a code span)
head flattenMarkdownToPlainText("`` prefix `__init__`")
  = "`` prefix __init__"                     (unmatched wider run consumed whole)
base flattenMarkdownToPlainText("Rename to ``a`b`` and match ``**/*.ts``.")
  = "Rename to ab and match **/*.ts`."       (embedded backtick lost)

Exact-head proof receipt

  • Product head SHA: 07b79ad91a4
  • Current-main base: 0fd8c138f5b
  • Canonical owner exercised: flattenMarkdownToPlainText in packages/normalization-core/src/markdown-plain-text.ts, and projectSessionDisplayMessage in src/gateway/session-display-projection.ts (producer chain).
  • Decision surface: the inline-code span pairing inside the plain-text flattening path; the flattenMarkdown: true projection used by session-list previews.
  • Recorder/readback boundary: the pure function return value, the producer-chain preview { role, text } projection, and the shipped sessions.list lastMessagePreview readback above.
  • Acceptance RED: on current main, flattenMarkdownToPlainText("Rename to ``aband match**/*.ts``.")returnedRename to ab and match **/.ts.` and the shipped preview dropped the embedded backticks.
  • Acceptance GREEN: on exact head the same input returns Rename to ab and match **/*.ts.` and the shipped preview preserves them.
  • Legal controls: all pre-existing markdown-plain-text.test.ts cases and the session-display-projection.test.ts cases are byte-identical between base and head (zero regression), verified by running both suites on both trees.
  • Cleanup: every run used isolated temporary state/config dirs and a loopback-only Gateway with a synthetic token; no production Gateway, session, token, or config was touched. Stand-in and Gateway processes were stopped after each run.

Verification

  • node_modules/.bin/vitest run packages/normalization-core/src/markdown-plain-text.test.ts — 46 passed on head
  • node_modules/.bin/vitest run src/gateway/session-display-projection.test.ts — 16 passed on head
  • node scripts/check-test-lines-ratchet.mts --base refs/remotes/origin/ci-ratchet-base --no-merge-base — OK (allocation sized to net regression growth)
  • oxlint — 0 errors on changed files
  • git diff --check upstream/main...HEAD — clean
  • Not tested: other provider backends (the fix is in the shared plain-text normalizer, independent of model/provider); the change is covered end to end by the shipped Gateway readback above.

Scope and risk

  • Production LOC: +57/-10, net +47
  • Test LOC: net additions covered by config/test-lines-allocations/markdown-multi-backtick-code-span.txt, leaving the shared scalar unchanged.
  • Existing-solutions preflight: reuses the existing NUL-placeholder mechanism introduced by fix(sessions): session previews rewrite code names like __init__ and **/*.ts #196547; replaces only the single-backtick regex with a run-length scanner. No new validator, option, config, or persistence surface.
  • Config/default, protocol/schema, authorization, storage, migration, upgrade impact: none.

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Nov 10, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Pair inline-code delimiters by equal backtick-run length so plain-text previews preserve embedded backticks.

Example: A session message contains Rename to a`b now.

  • Before: The preview reads Rename to ab now.
  • After: The preview reads Rename to a`b now.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, useful repair with shipped Gateway evidence and the prior regression finding resolved; exact-head CI remains in progress.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Built Gateway runs in secretless Node containers exercised agent replies through sessions.list and showed preserved embedded backticks and globs with ordinary-code, emphasis, and fence controls; the exercised production module is unchanged at the reviewed head.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Session previews lose embedded backticks and alter globs inside valid double-backtick code spans.
Reason: The change completes existing literal-content preservation with minimal code; obviyus, the predecessor's contributor, supplied the simplified implementation and production proof.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current preview defect with a focused regex change, sufficient Gateway proof, and the previously requested regression; no actionable findings remain.

Priority: P2
Reviewed head: 06e1e48ac6f85a6318ba8113ceeaa65e5e7d6c83

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shared Markdown normalizer converts message text into plain-text projections consumed by Gateway session previews and sidebar narration.

flowchart LR
  A[Message text] --> B[Fence and link stripping]
  B --> C[Code span protection]
  C --> D[Formatting removal]
  D --> E[Literal restoration]
  E --> F[Session previews and narration]
Loading

Technical review

Best possible solution:

Land the focused matcher replacement and retained regression once the existing required checks pass.

Do we have a high-confidence way to reproduce the issue?

Main's matcher splits double-backtick spans, and the supplied paired Gateway output demonstrates the resulting preview corruption; no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete fix for the embedded-backtick defect: it reuses the existing placeholder owner and extends an existing independent regression without new machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 88a0f3baca8a.

Provenance checked

  • Inline-code placeholder protection keeps the original intent (802bc3c: Keep code names, globs, and Markdown examples literal while stripping formatting outside code spans.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9a947e4 adds packages/normalization-core/src/markdown-plain-text.ts:9 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9a947e4bb8d0; files: packages/normalization-core/src/markdown-plain-text.ts)

PR surface

Source +1, Tests 0. Total +1 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 2 +1
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 4 3 +1

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Plain-text previews silently alter literal code text, while original transcripts remain intact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-11-10T22:55:58.732Z sha a5a3ff81ca33fb662a1c4723be57cd164027dbf8 :: needs changes before merge. :: [P2] Remove completed triple fences before protecting inline code | [P2] Keep the shared scanner within the enforced UI asset budget
  • reviewed 2026-11-11T00:37:59.141Z sha c3e82fe2577ae09c25e2723068abfcb31d33cd2a :: needs changes before merge. :: [P2] Keep the shared scanner within the enforced UI asset budgets
  • reviewed 2026-11-11T01:06:34.088Z sha 63d4bd7 :: needs changes before merge. :: [P2] Avoid rescanning the full prefix for every inline-code span
  • reviewed 2026-11-11T01:33:12.247Z sha ca692ed :: needs changes before merge. :: [P2] Avoid rescanning the full prefix for every code span | [P2] Keep the scanner within the existing UI asset budgets
  • reviewed 2026-11-11T02:02:14.489Z sha 12ff2bc :: needs changes before merge. :: [P2] Avoid backward prefix searches for every code span | [P2] Keep the scanner within the existing UI asset budgets
  • reviewed 2026-11-11T02:23:00.937Z sha dc6ca75 :: blocked before merge. :: [P2] Keep the scanner within the enforced UI asset budgets
  • reviewed 2026-11-11T16:31:39.065Z sha 421bb71 :: needs maintainer review before merge. :: none
  • reviewed 2026-11-11T17:02:02.941Z sha a51322a :: needs changes before merge. :: [P3] Retain an embedded-backtick regression in the existing code row

Reviewed November 11, 2026, 12:22 PM ET / 17:22 UTC (Revision 13).

@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Nov 10, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 10, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 10, 2026
@wangmiao0668000666

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Proof for head a51322a (main merged in, plus one commit on top of the contributor commits).

What changed on top of the contributor commits:

  • Production is now +3/-2, down from +66/-10. The existing code-span regex now pairs a span with the next backtick run of the same length: /\0|(?<!)(+)(?!)([\s\S]?[^])/g.
  • ``a`b`` and ``**/*.ts`` keep their content. A run with no partner of its length stays literal, and the lookbehind stops the tail of an unmatched run from reopening as a shorter span.
  • Fence handling, link stripping and emphasis stripping are unchanged, and the contributor's separate change to triple-backtick fence stripping is reverted (not needed for this bug). No new text.
  • Tests are back to main (net 0) and the allocation file is removed. In the container, markdown-plain-text.test.ts passes (39 tests); oxlint and oxfmt are clean.

Setup: node:24.22.1 container with no secrets. Main (1d72ad0) and this PR were each built with pnpm build and each run twice. Each run starts a real Gateway and makes two real openclaw agent turns against a stand-in model whose last assistant message is:

  • session a: Rename to ab`` now and match ``**/*.ts`` files. Keep singlecode, leave an unclosedrun, and bold text.`` followed by a fenced js block and Done.
  • session b: Only **/*.ts changed.

openclaw gateway call sessions.list --params '{"includeLastMessage":true}', lastMessagePreview:

session main run 1 / run 2 this PR run 1 / run 2
a Rename to ab now and match **/*.ts files. Keep single code, leave an unclosed run, and bold text. Done. Rename to ab now and match **/*.ts files. Keep single code, leave an unclosed run, and bold text. Done.
b Only */.ts changed. Only **/*.ts changed.

Controls, from the same previews:

  • Single-backtick single shows as single on both trees.
  • **bold** _text_ outside code is stripped to bold text on both.
  • The fenced js block is removed on both.
  • The unclosed `run stays literal on this PR. Main drops that backtick, because the stray backticks from the split ``a`b`` pair with it.

On this version openclaw sessions (table and --json) has no preview column, so the Gateway sessions.list preview is the entry point shown. The Control UI sidebar narration uses the same flattenMarkdownToPlainText.

Run output (4 runs)
lane=main run=1 commit=1d72ad079047f85d881e521a03e67a86e17c5f3a
agent turn (s196690-a, model reply = reply.md) exit=0
agent turn (s196690-b, model reply = reply2.md) exit=0
gateway call sessions.list exit=0
  agent:main:explicit:s196690-b: lastMessagePreview="Only */.ts changed."
  agent:main:explicit:s196690-a: lastMessagePreview="Rename to ab now and match **/*.ts files. Keep single code, leave an unclosed run, and bold text. Done."
lane=main run=2 commit=1d72ad079047f85d881e521a03e67a86e17c5f3a
agent turn (s196690-a, model reply = reply.md) exit=0
agent turn (s196690-b, model reply = reply2.md) exit=0
gateway call sessions.list exit=0
  agent:main:explicit:s196690-b: lastMessagePreview="Only */.ts changed."
  agent:main:explicit:s196690-a: lastMessagePreview="Rename to ab now and match **/*.ts files. Keep single code, leave an unclosed run, and bold text. Done."
lane=cand run=1 commit=a51322ae9b5fef73aa8c0526bc1ff3f1447624c5
agent turn (s196690-a, model reply = reply.md) exit=0
agent turn (s196690-b, model reply = reply2.md) exit=0
gateway call sessions.list exit=0
  agent:main:explicit:s196690-b: lastMessagePreview="Only **/*.ts changed."
  agent:main:explicit:s196690-a: lastMessagePreview="Rename to a`b now and match **/*.ts files. Keep single code, leave an unclosed `run, and bold text. Done."
lane=cand run=2 commit=a51322ae9b5fef73aa8c0526bc1ff3f1447624c5
agent turn (s196690-a, model reply = reply.md) exit=0
agent turn (s196690-b, model reply = reply2.md) exit=0
gateway call sessions.list exit=0
  agent:main:explicit:s196690-b: lastMessagePreview="Only **/*.ts changed."
  agent:main:explicit:s196690-a: lastMessagePreview="Rename to a`b now and match **/*.ts files. Keep single code, leave an unclosed `run, and bold text. Done."

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 11, 2026
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Added the regression the review asked for by extending the existing code row in markdown-plain-text.test.ts, still one line (test lines net 0). The row's NUL code span is now a double-backtick span with an embedded backtick: \0a`` ``, expected \0a.

In a node:24.22.1 container the row fails with main's code-span regex (expected '... [x](y)\0\0a' to be '... [x](y)\0\0a ') and passes with this head (39/39). No production change since the proof above (head a51322a); main is merged.

Out of scope here: a Markdown link written inside a double-backtick span (``[x](y)``) is still turned into its label. Link stripping runs first and only skips single-backtick code, the same as on main.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 11, 2026
@obviyus

obviyus commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Landed in f19f6c0. Thanks @wangmiao0668000666.

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

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants