Skip to content

fix(line): skip invalid location messages before delivery - #118064

Merged
Takhoffman merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-openclaw-118029
Aug 2, 2026
Merged

Takhoffman merged 1 commit into
mainfrom
clawsweeper/issue-openclaw-openclaw-118029

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #118029

Summary

Prevent LINE location messages with blank required title or address values from reaching the LINE API. The repair validates the shared location-message construction boundary for direct channelData.line.location inputs and rejects malformed blank-address directives before they create invalid channel state.

Behavior

  • Keeps the existing Location fallback for an omitted directive title.
  • Skips a location directive with a blank address while preserving surrounding assistant text.
  • Skips direct blank title/address locations across ordinary outbound, quick-reply inline batches, and auto-reply delivery without blocking valid text or other message parts.

Attribution

Reported by @edenfunf in #118029.

Validation

  • node scripts/run-vitest.mjs extensions/line/src/reply-payload-transform.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
  • pnpm format extensions/line/src/reply-payload-transform.ts extensions/line/src/send.ts extensions/line/src/outbound.ts extensions/line/src/auto-reply-delivery.ts extensions/line/src/reply-payload-transform.test.ts extensions/line/src/channel.sendPayload.test.ts extensions/line/src/auto-reply-delivery.test.ts
  • git diff --check
  • pnpm check:changed

Apply clawsweeper:autogenerated and clawsweeper:autofix.

@clawsweeper clawsweeper Bot added clawsweeper Tracked by ClawSweeper automation clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge labels Aug 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added the channel: line Channel integration: line label Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed August 2, 2026, 12:45 PM ET / 16:45 UTC.

ClawSweeper review

What this changes

This PR prevents LINE locations with blank required title or address values from being sent, while retaining valid assistant text and the existing fallback title for directives that omit only the title.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This is a coherent, narrowly scoped repair for the linked LINE delivery defect. The patch rejects invalid location payloads at parsing and construction boundaries, covers ordinary outbound, inline quick-reply, and inbound auto-reply paths, and leaves valid text deliverable; it should remain open for exact-head CI completion and normal merge gating. Likely related people: clawsweeper[bot] introduced the current location-send surface and authored this repair; Peter Steinberger is a recent substantial contributor across these LINE delivery files.

Priority: P1
Reviewed head: faffa66caa8d619a793c5d4126bf7bda95c2e99b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused, well-covered repair that follows the shared LINE construction boundary; required exact-head checks remain the normal merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a ClawSweeper bot repair PR, so the external-contributor real-behavior-proof gate does not apply; the linked source issue nevertheless includes redacted live LINE API validation of the failing payload.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a ClawSweeper bot repair PR, so the external-contributor real-behavior-proof gate does not apply; the linked source issue nevertheless includes redacted live LINE API validation of the failing payload.
Evidence reviewed 5 items Current defect boundary: On current main, the directive parser accepts a blank address and stores it as an empty string, while the location-message builder only truncates the fields before the API request. The linked report supplies a redacted live LINE validation response showing that this payload is rejected.
Shared delivery coverage: The proposed branch builds a nullable canonical location message before direct outbound delivery, uses that validated message for quick-reply batches, and lets auto-reply delivery omit a null location instead of adding it to the reply request.
Focused regression coverage: The branch adds parser coverage for blank addresses and direct-location tests for blank title and address across outbound, inline quick-reply, and auto-reply paths; this matches the two concrete routes described by the linked report.
Findings None None.
Security None None.

How this fits together

The LINE plugin converts assistant directives and direct channelData.line.location payloads into LINE Messaging API messages. Parsed locations feed both direct outbound sends and reply-token auto-replies, so validation must prevent an invalid location from poisoning either delivery request.

flowchart LR
  A[Assistant reply or direct channel payload] --> B[LINE directive and payload handling]
  B --> C[Location message validation]
  C --> D[Outbound delivery]
  C --> E[Inbound auto-reply delivery]
  D --> F[LINE Messaging API]
  E --> F
  F --> G[Valid reply content reaches user]
Loading

Before merge

  • Complete next step (P2) - No actionable defect remains in the reviewed patch; allow the existing exact-head CI and autofix workflow to complete before merge.
Agent review details

Security

None.

PR surface

Source +2, Tests +112. Total +114 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 40 38 +2
Tests 3 112 0 +112
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 152 38 +114

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118029
Summary: This PR is a focused candidate fix for the canonical LINE blank-location delivery issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep one canonical location constructor that rejects blank LINE-required fields, ensure every location-bearing delivery path consumes its result, and merge after the exact-head required checks finish successfully.

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

Yes. Current main source constructs a blank-address location from the documented directive and sends it through both direct outbound and reply-token paths; the linked issue also supplies a redacted real LINE API validation showing the platform rejects that payload.

Is this the best way to solve the issue?

Yes. Rejecting the invalid payload at the directive parser and the shared location-message construction boundary is the narrowest maintainable repair because direct channelData.line.location inputs bypass directive parsing but share the same message construction contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P1: The change repairs a deterministic LINE channel failure that can suppress an otherwise valid assistant reply for affected users.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a ClawSweeper bot repair PR, so the external-contributor real-behavior-proof gate does not apply; the linked source issue nevertheless includes redacted live LINE API validation of the failing payload.

Label justifications:

  • P1: The change repairs a deterministic LINE channel failure that can suppress an otherwise valid assistant reply for affected users.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a ClawSweeper bot repair PR, so the external-contributor real-behavior-proof gate does not apply; the linked source issue nevertheless includes redacted live LINE API validation of the failing payload.

Evidence

What I checked:

  • Current defect boundary: On current main, the directive parser accepts a blank address and stores it as an empty string, while the location-message builder only truncates the fields before the API request. The linked report supplies a redacted live LINE validation response showing that this payload is rejected. (extensions/line/src/reply-payload-transform.ts:87, b84e14f22255)
  • Shared delivery coverage: The proposed branch builds a nullable canonical location message before direct outbound delivery, uses that validated message for quick-reply batches, and lets auto-reply delivery omit a null location instead of adding it to the reply request. (extensions/line/src/outbound.ts:40, faffa66caa8d)
  • Focused regression coverage: The branch adds parser coverage for blank addresses and direct-location tests for blank title and address across outbound, inline quick-reply, and auto-reply paths; this matches the two concrete routes described by the linked report. (extensions/line/src/channel.sendPayload.test.ts:220, faffa66caa8d)
  • Feature provenance: The current location builder and direct location sender on main trace to the recent LINE send-file introduction; this PR is based on the current main SHA and changes that same owner boundary rather than adding a parallel path. (extensions/line/src/send.ts:244, c8688051ed67)
  • Patch hygiene and check state: The proposed patch is a clean descendant of the reviewed main base and has no whitespace errors. The supplied PR state shows the fast quality and security checks completed successfully; build, extension-boundary, channel-runtime, and real-behavior workflow checks were still running at review time. (extensions/line/src/send.ts:244, faffa66caa8d)

Likely related people:

  • clawsweeper[bot]: git blame attributes the current createLocationMessage implementation and its direct sender to this bot-authored main commit; the reviewed branch repairs that exact boundary. (role: current location-send surface introducer and repair author; confidence: high; commits: c8688051ed67, faffa66caa8d; files: extensions/line/src/send.ts, extensions/line/src/outbound.ts, extensions/line/src/auto-reply-delivery.ts)
  • Peter Steinberger: Feature-history sampling and shortlog data identify substantial recent contribution across the LINE send, outbound, auto-reply, and directive-transform surfaces. (role: recent area contributor; confidence: medium; commits: dc38411ca4de, 87be38ea735b; files: extensions/line/src/send.ts, extensions/line/src/outbound.ts, extensions/line/src/auto-reply-delivery.ts)

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.

@Takhoffman Takhoffman self-assigned this Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🦞🧹
ClawSweeper autofix is enabled.

  • Head: faffa66caa8d
  • Label: clawsweeper:autofix
  • Action: exact-head review queued (workflow sweep.yml, event repository_dispatch).
  • Flow: review this head, repair/rebase only if needed, then re-review the exact repaired head until no actionable findings remain.

This is fix-only; I will not merge this PR.

Re-review progress:

@Takhoffman
Takhoffman merged commit 492b884 into main Aug 2, 2026
95 of 104 checks passed
@Takhoffman

Copy link
Copy Markdown
Contributor

Merged via squash.

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

Labels

channel: line Channel integration: line clawsweeper:autofix Maintainer opted this PR into bounded ClawSweeper-reviewed autofix without merge clawsweeper:autogenerated PR created automatically by ClawSweeper clawsweeper Tracked by ClawSweeper automation P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

[Bug]: LINE location directive with a blank address produces a message LINE rejects (HTTP 400), dropping the reply

1 participant