Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed October 3, 2026, 11:37 PM ET / October 4, 2026, 03:37 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR repairs Tlon’s Markdown conversion so bare URLs become links and images become native image blocks when they follow text or appear inside headings, quotes, and styles. Merge readiness⛔ Blocked before merge - 2 items remain The PR remains useful: current main retains the reported parser defects, and the revised head resolves the earlier nested-image finding. The submitted transport trace is stronger evidence, but does not establish acceptance or rendering by Tlon. Priority: P2 Review scores
Verification
How this fits togetherThe Tlon plugin converts outbound OpenClaw message text into Urbit’s native story format. Its DM, group-message, and media-caption senders place those stories into HTTP requests to the configured ship. flowchart LR
A[Outbound message text] --> B[Tlon Markdown converter]
B --> C[Links and styled text]
B --> D[Hoisted image blocks]
C --> E[DM or group envelope]
D --> E
E --> F[HTTP ship request]
F --> G[Tlon conversation]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +31, Tests +48. Total +79 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one plugin-owned converter that emits valid native stories across all supported inline contexts, with verified Tlon delivery of the repaired output. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a focused reproduction: send text containing a mid-line URL or Markdown image through the current-main Tlon converter. The contributor’s before/after HTTP trace corroborates the malformed payload; this review did not execute target code. Is this the best way to solve the issue? Yes, repairing the existing converter and applying recursive image normalization at its output boundaries is a focused solution. No additional correctness defect was identified in the revised patch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d0c59630c5a6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
The inline story tokenizer's plain-text rule consumed the scheme letters of a bare URL and the bang of an image, so the URL and image rules only matched at the start of an inline run. Mid-line URLs were sent as plain text and mid-line images as a literal bang plus a link. Stop plain text before http(s):// and is sent as the literal textHere is the chart !followed by a link labelledchart, instead of the hoisted image block that a leadingproduces. The same happens inside headings, blockquotes, and bold/italic/strike text.Separately, on current main an image that starts a heading, a blockquote, or a styled span (for example
## ) is already sent with the internalimageBlockmarker insideheader.contentor the style body, which is not a valid story inline. Only direct paragraph children were ever hoisted.Root cause
extensions/tlon/src/urbit/story.ts, the plain-text fallback inINLINE_MARKDOWN_RULES:The rules are tried in order at the current cursor. Plain text excludes
:and/so that it stops beforehttps://, but the scheme lettershttpsare ordinary characters, so the plain run swallows them and stops at:. The cursor never lands onhttps://, so the URL rule can only match at the start of a run. In the same way the plain run swallows the!of, and the remaining[alt](src)then matches the link rule.parseInlinesWithBreaksconverted only top-levelimageBlockmarkers to image blocks. Headings and blockquotes callparseInlineMarkdowndirectly, and bold/italic/strike keep its output nested, so any image recognized in those contexts escaped into the outgoing story as a raw marker.Fix
http://,https://and![:hoistImageBlockswalks an inline list recursively (throughbold,italics,strike,blockquote), removes everyimageBlockmarker, emits it as a nativeimageblock after the verse, and re-merges adjacent strings. It is used by the paragraph path (replacing the top-level-only check), the heading path, and the blockquote path. A heading, quote, or style wrapper left empty after hoisting is dropped instead of being sent empty.Text that only resembles these, such as
Hello!,10:30,a/b, orwow![notewith no closing link syntax, still ends up as one merged plain string.Why this is the right boundary
markdownToStoryis the single converter behind every Tlon text send:sendDm,sendGroupMessage, the caption path inbuildMediaStory, andtlonRuntimeOutboundinchannel.runtime.ts. Every context that can contain an image marker (paragraph, list item, heading, blockquote, nested styles) now routes throughhoistImageBlocks, so no marker can reach a sender. List items already go throughparseInlinesWithBreaks, so a list item with an image (top-level or nested in a style) still falls back to the paragraph path as before.taskcontent is only built from list items, which are already hoisted.Verification
extensions/tlon/src/urbit/story.test.ts: a mid-line bare URL becomes alinkinline, a mid-line image is hoisted,Hello! time 10:30 a/bstays one plain string, and a newnested image hoistingtable covers an image after heading text, a heading that is only an image, a blockquote, bold mid-run text, and italic wrapping strike wrapping an image. Theimages inside list itemsfixture now expects the hoisted image block. All 55 cases pass; the five nested cases fail on the first commit alone.Real behavior proof
Behavior addressed: Tlon outbound messages lose bare URLs and images that follow other text on the same line (URL sent as plain text, image sent as literal
!plus a link), and images inside headings, blockquotes, or styled text are sent as rawimageBlockmarkers instead of native image blocks.Real environment tested: the real Tlon outbound adapter
tlonRuntimeOutbound.sendTextfromextensions/tlon/src/channel.runtime.ts, with the real account resolution, the real Urbit login (POST /~/login) and the realchat-dm-actionpoke sent over HTTP byputUrbitChannel. The ship side was a local HTTP listener on 127.0.0.1 that answers/~/loginwith anurbauthcookie and records eachPUT /~/channel/...body. Run with tsx on pristine main 32ec67e and on this branch head dae634c, identical inputs.Exact steps or command run after this patch:
tsx driver.mts, which configureschannels.tlonwithship: ~zod,url: http://127.0.0.1:<port>,network.dangerouslyAllowPrivateNetwork: true, callstlonRuntimeOutbound.sendText({ cfg, to: "~nec", text })for each input below, and prints thememo.contentof the poke body the listener received.Evidence after fix:
Observed result after fix: the mid-line URL arrives at the ship as a story link inline, and every image (paragraph, heading, quote, bold) arrives as a native image block with no stray
!and noimageBlockmarker inside the header or style content. Surrounding text is unchanged.What was not tested: no message was delivered to a live Urbit ship or rendered in a Tlon client; the listener records the exact HTTP poke body the adapter sends but does not run Eyre or the %chat agent.