Skip to content

fix(line): preserve provider delivery receipts and completed sends - #116879

Merged
steipete merged 2 commits into
mainfrom
codex/auto-qa-line-provider-receipts
Jul 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/auto-qa-line-provider-receipts

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Branch: codex/auto-qa-line-provider-receipts
Commit: 247ec36f48fc629e979a5bcfaf0ac9e07817fad7
Base: e051a7bb4a6ba69b87391e990b00813114b1d482

Summary

  • Use actual LINE provider-assigned IDs for both push and reply sends, returning the first physical ID as the primary result and every ordered ID in the existing receipt.
  • Preserve conversation/thread metadata and completed physical-send callbacks for batched and partial deliveries.
  • Route the legacy text adapter through the existing canonical payload owner, deleting its duplicated sender, fabricated processed Flex-only receipt, and missing partial-delivery reporting.
  • Reject empty or partially invalid provider identity responses before recording successful outbound activity.

Root cause and dependency proof

  1. Discarded LINE provider send identities: the canonical push/reply owner ignored required SDK responses and manufactured literal push/reply message IDs, losing every actual physical delivery identity.
  2. Duplicated legacy LINE text delivery owner: the separate legacy text implementation fabricated processed for Flex-only Markdown and bypassed the canonical physical-send progress callback, so completed delivery evidence disappeared when a later Flex send failed.

The installed LINE SDK requires sentMessages: Array<SentMessage> with 1–5 entries for pushes at node_modules/@line/bot-sdk/lib/messaging-api/model/pushMessageResponse.ts:18 and replies at node_modules/@line/bot-sdk/lib/messaging-api/model/replyMessageResponse.ts:18; node_modules/@line/bot-sdk/lib/messaging-api/model/sentMessage.ts:13 requires each provider id: string.

extensions/line/src/send.ts:78 validates that contract for both operations, extensions/line/src/send-receipt.ts:8 keeps ordered physical receipt parts, and extensions/line/src/outbound.ts:278 delegates the legacy sender to the canonical payload owner without changing public SDK, configuration, protocol, or authentication contracts.

Verification

  • Independently reproduced the existing provider-ID failures and two additional red-before legacy-owner regressions: processed instead of m-flex, and zero completed-send callbacks before a second Flex send failed.
  • node scripts/run-vitest.mjs extensions/line/src/send.test.ts extensions/line/src/channel.sendPayload.test.ts extensions/line/src/auto-reply-delivery.test.ts extensions/line/src/auto-reply-delivery-recovery.test.ts extensions/line/src/markdown-to-line.test.ts: 107 tests passed on final commit 247ec36f48fc629e979a5bcfaf0ac9e07817fad7 using supported Node 24.18.
  • Coverage includes push/reply IDs, ordered multi-message receipt parts, conversation/thread preservation, malformed partial responses, Flex-only legacy delivery, exactly-once successful callbacks, completed-send evidence before later failure, auto-reply recovery, and Markdown conversion.
  • git merge-base e051a7bb4a6ba69b87391e990b00813114b1d482 HEAD returns e051a7bb4a6ba69b87391e990b00813114b1d482; the branch diff contains only five extensions/line files.
  • Targeted oxfmt --check and git diff --check pass; the branch worktree is clean.
  • Genuine structured commit-mode Codex autoreview on the exact final head: TruffleHog clean; no accepted/actionable findings; patch correct at 0.94 confidence. An earlier speculative duplicate-callback concern was disproven by src/plugin-sdk/channel-send-result.ts:68 and an explicit passing exactly-once delivery-callback regression.

Root causes fixed

2 distinct canonical LINE provider-identity and legacy-delivery-owner defects.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line size: M maintainer Maintainer-authored PR labels Jul 31, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 10:46 AM ET / 14:46 UTC.

ClawSweeper review

What this changes

This PR routes legacy LINE text sends through the canonical payload sender and returns LINE provider-assigned message IDs and ordered physical-send receipts for push and reply deliveries.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 5 items remain

Keep this PR open for explicit maintainer handling. The maintainer label protects it from automated cleanup, and the review checkout could not initialize its read-only sandbox, so current-main, branch, dependency, history, scoped-policy, and supplied proof artifacts could not be independently inspected.

Priority: P2
Reviewed head: 247ec36f48fc629e979a5bcfaf0ac9e07817fad7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The stated patch and focused regressions are promising, but independent source review and real-provider behavior proof are unavailable in this review environment.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports focused Vitest coverage, but the available context does not demonstrate an after-fix real LINE provider delivery; add redacted live output, logs, or a reproducible provider transcript before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports focused Vitest coverage, but the available context does not demonstrate an after-fix real LINE provider delivery; add redacted live output, logs, or a reproducible provider transcript before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 3 items Review environment failure: The required read-only repository inspection could not start: the sandbox failed before executing the command, so no local source, Git history, AGENTS.md, SDK types, test files, or proof manifest were inspected.
Protected maintainer handling: Provided GitHub context labels this PR maintainer; repository policy requires protected-label items to remain open for explicit maintainer handling.
Submitted validation is test-only: The PR body reports a focused Vitest command with 107 passing tests, but the available context does not show an after-fix real LINE provider run, redacted runtime log, or equivalent live delivery proof.
Findings None None.
Security None None.

How this fits together

The LINE channel converts outbound agent or legacy text requests into LINE Messaging API push or reply calls. It then returns provider delivery identities and callbacks to the shared channel runtime so completed sends and later partial failures can be represented accurately.

flowchart LR
  A[Agent or legacy text request] --> B[LINE outbound adapter]
  B --> C[Canonical payload sender]
  C --> D[LINE Messaging API]
  D --> E[Provider send identities]
  E --> F[Receipts and delivery callbacks]
Loading

Decision needed

Question Recommendation
Should this protected LINE delivery-receipt change proceed after an independent current-main review and real-provider proof are available? Request independent proof and review: Re-run source and dependency review, then require redacted live LINE evidence for provider IDs and a partial-delivery path before deciding on merge.

Why: The protected maintainer label requires explicit human handling, and the failed read-only sandbox prevents a reliable independent correctness or upgrade-safety verdict.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports focused Vitest coverage, but the available context does not demonstrate an after-fix real LINE provider delivery; add redacted live output, logs, or a reproducible provider transcript before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The branch changes outbound delivery receipts and completion callbacks, but its behavior against current main could not be reviewed because the local inspection sandbox failed.
  • Resolve merge risk (P1) - The available validation is focused mocked/unit testing; merge should wait for redacted after-fix evidence from a real LINE delivery path, especially for provider-issued receipt IDs and partial-send callbacks.
  • Complete next step (P2) - The protected maintainer label and failed read-only inspection prevent an automated repair or merge recommendation; the next action is an independent review plus real-provider proof.
Agent review details

Security

None.

PR surface

Source -7, Tests +218. Total +211 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 51 58 -7
Tests 2 220 2 +218
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 271 60 +211

Review metrics

None.

Stored data model

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

Merge-risk options

Maintainer options:

  1. Verify live receipt behavior before merge (recommended)
    Obtain redacted real LINE push/reply evidence showing provider IDs, ordered receipts, and callback behavior when a later physical send fails.
  2. Accept provider-proof uncertainty
    A maintainer may merge based on the focused unit coverage while accepting that live API response and callback behavior was not independently demonstrated here.

Technical review

Best possible solution:

Re-run the review in a working read-only checkout, inspect the LINE SDK response contract and the current send-result/callback path, then require a redacted real-provider delivery transcript or runtime log that demonstrates returned IDs and partial-delivery reporting before merge.

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

No. The PR describes focused mocked regressions, but the required local inspection could not run and no independently verifiable current-main or real LINE reproduction was established.

Is this the best way to solve the issue?

Unclear. Routing legacy text through the canonical payload sender is plausibly the right owner boundary, but the current implementation, SDK contract, callers, and sibling delivery paths could not be read after the sandbox initialization failure.

AGENTS.md: unclear because the file could not be read completely.

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

Labels

Label changes:

  • add P2: The PR addresses a bounded channel delivery-receipt defect whose impact is meaningful but not shown here to be a broad outage or emergency.
  • add merge-risk: 🚨 message-delivery: The patch changes how LINE physical sends report provider IDs and invoke delivery completion callbacks, so an error could affect delivery recovery or reporting.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused Vitest coverage, but the available context does not demonstrate an after-fix real LINE provider delivery; add redacted live output, logs, or a reproducible provider transcript before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: The PR addresses a bounded channel delivery-receipt defect whose impact is meaningful but not shown here to be a broad outage or emergency.
  • merge-risk: 🚨 message-delivery: The patch changes how LINE physical sends report provider IDs and invoke delivery completion callbacks, so an error could affect delivery recovery or reporting.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused Vitest coverage, but the available context does not demonstrate an after-fix real LINE provider delivery; add redacted live output, logs, or a reproducible provider transcript before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Review environment failure: The required read-only repository inspection could not start: the sandbox failed before executing the command, so no local source, Git history, AGENTS.md, SDK types, test files, or proof manifest were inspected.
  • Protected maintainer handling: Provided GitHub context labels this PR maintainer; repository policy requires protected-label items to remain open for explicit maintainer handling. (247ec36f48fc)
  • Submitted validation is test-only: The PR body reports a focused Vitest command with 107 passing tests, but the available context does not show an after-fix real LINE provider run, redacted runtime log, or equivalent live delivery proof. (extensions/line/src/send.test.ts:445, 247ec36f48fc)

Likely related people:

  • steipete: The provided PR context attributes both proposed LINE receipt commits to this contributor; local feature-history attribution could not be completed after the inspection sandbox failed. (role: recent LINE change author; confidence: low; commits: db7c3ee5cff5, 247ec36f48fc; files: extensions/line/src/send.ts, extensions/line/src/outbound.ts, extensions/line/src/send-receipt.ts)

Rank-up moves

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

  • Add redacted after-fix LINE provider evidence for push/reply receipt IDs and a partial-delivery callback path.
  • Re-run the review from a functioning read-only checkout so current main, SDK types, history, and scoped policy can be inspected.

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.

@steipete
steipete merged commit 50771ab into main Jul 31, 2026
98 of 106 checks passed
@steipete
steipete deleted the codex/auto-qa-line-provider-receipts branch July 31, 2026 14:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
…penclaw#116879)

* fix(line): preserve provider message ids in receipts

* fix(line): unify legacy text delivery receipts

---------

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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant