Skip to content

fix(line): preserve ordered oversized table delivery - #117335

Merged
steipete merged 3 commits into
mainfrom
codex/qa400-line-ordered-oversized-tables
Aug 1, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/qa400-line-ordered-oversized-tables

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

LINE rejects a complete push or reply when one Markdown table produces a Flex
bubble above its official 30 KB UTF-8 JSON limit. Merely moving that table into
plain text also breaks source order whenever valid table or code cards remain.

Why This Change Was Made

Keep the existing exported { text, flexMessages } contract and all ordinary
message behavior intact. Add optional ordered segments only for oversized-table
fallback, reuse the canonical Markdown bullet renderer, and have both existing
LINE delivery owners consume that same source order. Existing 5,000-character
chunking, five-message reply/push batching, quick-reply ownership, media policy,
receipts, and partial-delivery handling stay with their current owners.

Official provider contract: https://developers.line.biz/en/reference/messaging-api/nojs/#bubble

User Impact

Oversized ASCII and multibyte Unicode tables arrive completely as readable
bullet text in the correct position between valid cards. Authored links and
code cards survive; quick replies remain attached only to the final visible
message, even when that message is a Flex card and delivery spans reply-token
and push-continuation batches.

Evidence

  • Test-first baseline: 5 failing regressions and 72 passing controls.
  • Frozen immutable commit: 79/79 focused tests across the Markdown owner,
    outbound adapter, and inbound auto-reply owner.
  • Actual installed @line/[email protected]: 41 authenticated localhost HTTP
    requests
    through both real production callers, covering ASCII, multibyte
    Unicode, ordered cards, reply-token overflow, push continuation, and final-only
    quick replies. This is an authenticated local provider-contract fixture, not a
    claim of external live LINE access.
  • The final quick-reply Flex produces 12 observer callbacks for 12 physical
    outbound sends
    ; its returned receipt and final observer both identify
    line-27. Every provider request contains at most five messages.
  • Scoped lint is clean; the two type-aware diagnostics reproduce unchanged on
    clean main. Four independent hostile whole-owner reviews are clean.
  • Final genuine Codex Sol/high P0–P3 autoreview: zero accepted/actionable
    findings
    , confidence 0.99; exact added content passes TruffleHog.
  • Exact reviewed canonical main: 3edbe19; conflict-free synthetic composition tree 88972983d816c4a95410f93d6afb084c62d8e7a0; plugin owner, scoped guides, and pinned dependencies unchanged.
  • Hosted exact-head CI remains pending until its actual gate completes.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line size: M maintainer Maintainer-authored PR labels Aug 1, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 6:43 AM ET / 10:43 UTC.

ClawSweeper review

What this changes

The branch converts oversized Markdown tables to readable LINE text while retaining their authored position among valid table and code Flex cards in normal sends and auto-replies.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

This PR repairs a current LINE message-delivery defect with a focused shared representation for authored order; no concrete patch defect was found. It remains open for protected maintainer review and completion of the exact-head LINE/runtime checks. Likely related people: steipete (high confidence) and zilokki-bot (medium confidence).

Priority: P2
Reviewed head: 1e930b0690c213e04954c12b3de7adabf8d4b7a9
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused cross-owner repair with strong stated behavior proof; the remaining blocker is protected human merge review plus exact-head checks.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR records after-fix authenticated localhost provider-fixture output through both production callers, and the dedicated real-behavior proof check is successful; redact private endpoints or tokens if the transcript is refreshed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR records after-fix authenticated localhost provider-fixture output through both production callers, and the dedicated real-behavior proof check is successful; redact private endpoints or tokens if the transcript is refreshed.
Evidence reviewed 6 items Current-main defect: Current main converts every parsed table to a Flex bubble, omits converted blocks from text, and returns Flex cards separately. The delivery owners therefore cannot preserve the source position of a table that must be rendered as text.
PR repairs at the conversion owner: The branch measures the serialized bubble in UTF-8 bytes, substitutes canonical bullet text for an oversized table, and emits ordered text/Flex segments only for that fallback.
Both delivery owners consume the same fact: The branch converts ordered segments into provider text/Flex messages in both the normal outbound path and the auto-reply path, while retaining their existing unsegmented behavior.
Findings None None.
Security None None.

How this fits together

The LINE plugin converts Markdown into plain text and Flex cards, then separate outbound and inbound-auto-reply owners batch those provider messages. The change gives those owners an ordered stream only when an oversized table cannot safely become a Flex bubble.

flowchart LR
  A[Markdown response] --> B[LINE Markdown conversion]
  B --> C{Flex bubble fits limit?}
  C -->|yes| D[Flex card segment]
  C -->|no| E[Plain-text table segment]
  D --> F[Ordered LINE messages]
  E --> F
  F --> G[Outbound or auto-reply batching]
  G --> H[LINE recipient]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled LINE delivery repair merge after the pending exact-head checks pass, accepting the documented authenticated provider-fixture proof for Flex-size fallback and quick-reply ordering? Merge after checks: Accept the bounded ordered-segment implementation once the current head's channel-runtime and lint checks pass.

Why: The implementation changes user-visible ordering across two LINE delivery owners, and the protected maintainer label requires an explicit human merge decision despite the absence of a concrete patch defect.

Before merge

  • Resolve merge risk (P1) - This changes physical LINE message order and final quick-reply placement across reply-token overflow and push continuation; merge after the pending exact-head lint and channel-runtime checks succeed.
Agent review details

Security

None.

PR surface

Source +136, Tests +190. Total +326 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 4 171 35 +136
Tests 3 190 0 +190
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 361 35 +326

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: extensions/line/src/markdown-to-line.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Finish exact-head delivery gates (recommended)
    Merge after the pending channel-runtime and lint checks pass on the current head, preserving the ordering, batching, and final-only quick-reply coverage.
  2. Pause for provider-trace review
    Keep the PR open if maintainers require a fresh redacted LINE request trace before accepting the provider-size boundary.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Wait for the exact-head required checks, then merge only if they are green and GitHub remains cleanly mergeable.

Technical review

Best possible solution:

Retain the optional ordered-segment path only for oversized-table fallback, preserve the legacy text-plus-Flex behavior for ordinary messages, and merge once protected maintainer review and the exact-head checks are complete.

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

Yes. Current main separates all table Flex cards from text, and the branch’s focused regression cases exercise an oversized table positioned between valid cards in both delivery owners.

Is this the best way to solve the issue?

Yes. The converter is the only owner that knows the authored block order, and optional ordered segments let both existing delivery owners consume that fact without altering ordinary-message behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 992aa458aba5.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: The defect can reject or reorder a bounded class of LINE messages, but the evidence does not show a broad channel outage or core-runtime failure.
  • merge-risk: 🚨 message-delivery: The patch changes ordering, batching, and final-only quick-reply attachment for physical LINE messages.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR records after-fix authenticated localhost provider-fixture output through both production callers, and the dedicated real-behavior proof check is successful; redact private endpoints or tokens if the transcript is refreshed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR records after-fix authenticated localhost provider-fixture output through both production callers, and the dedicated real-behavior proof check is successful; redact private endpoints or tokens if the transcript is refreshed.

Evidence

What I checked:

  • Current-main defect: Current main converts every parsed table to a Flex bubble, omits converted blocks from text, and returns Flex cards separately. The delivery owners therefore cannot preserve the source position of a table that must be rendered as text. (extensions/line/src/markdown-to-line.ts:386, 4982b399e652)
  • PR repairs at the conversion owner: The branch measures the serialized bubble in UTF-8 bytes, substitutes canonical bullet text for an oversized table, and emits ordered text/Flex segments only for that fallback. (extensions/line/src/markdown-to-line.ts:430, 1e930b0690c2)
  • Both delivery owners consume the same fact: The branch converts ordered segments into provider text/Flex messages in both the normal outbound path and the auto-reply path, while retaining their existing unsegmented behavior. (extensions/line/src/outbound.ts:103, 1e930b0690c2)
  • Quick-reply and batching coverage: Added tests assert valid-table, oversized-text, and code-card ordering; they also cover five-message batching and attach quick replies only to the final message in both delivery owners. (extensions/line/src/auto-reply-delivery.test.ts:18, 1e930b0690c2)
  • Current-main and provenance check: The PR base is an ancestor of the checked-out main and no commits changed the affected LINE owner files since that base. Blame attributes the present converter and delivery ordering to the current-path commit below; the branch is not superseded by a main rewrite. (extensions/line/src/markdown-to-line.ts:386, 0991fad3a34b)
  • After-fix behavior proof: The PR body records authenticated localhost provider-fixture requests through both production callers, and the supplied check context reports the dedicated Real behavior proof check successful. The proof does not claim an external live LINE send. (extensions/line/src/channel.sendPayload.test.ts:146, 1e930b0690c2)

Likely related people:

  • steipete: Current history contains repeated work on the affected LINE Markdown and delivery surfaces, and this branch supplies the cross-owner repair and proof. (role: recent area contributor; confidence: high; commits: 2d2ddc43d0dc, 218dcd815a2e, 1e930b0690c2; files: extensions/line/src/markdown-to-line.ts, extensions/line/src/outbound.ts, extensions/line/src/auto-reply-delivery.ts)
  • zilokki-bot: Current-main blame assigns the relevant Markdown projection and normal/auto-reply ordering lines to the same commit. (role: current-path provenance contributor; confidence: medium; commits: 0991fad3a34b; files: extensions/line/src/markdown-to-line.ts, extensions/line/src/outbound.ts, extensions/line/src/auto-reply-delivery.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the pending exact-head channel-runtime and lint checks before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-01T09:58:31.907Z sha ece4e33 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 1, 2026
@steipete
steipete merged commit a88f3ff into main Aug 1, 2026
92 of 94 checks passed
@steipete
steipete deleted the codex/qa400-line-ordered-oversized-tables branch August 1, 2026 10:44
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* fix(line): preserve ordered delivery of oversized markdown tables

* fix(line): type ordered delivery at provider and test boundaries

* fix(line): narrow ordered provider messages to flex or text

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: line Channel integration: line maintainer Maintainer-authored PR merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant