Skip to content

fix(outbound): preserve location-only replies in conversation history - #129197

Merged
steipete merged 2 commits into
mainfrom
codex/location-only-mirror-content-20260825
Aug 25, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/location-only-mirror-content-20260825

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users sending location-only replies would see the location delivered to the channel but find no corresponding assistant message in conversation history. The same omission also affected location-only replies sent back to the current conversation through the message tool.

Why This Change Was Made

Outbound planning, successful-delivery transcript mirroring, and current-source reply mirroring now share the existing channel-neutral location renderer. Only safe coordinates and accuracy enter transcript text; untrusted place names and addresses remain excluded, and structured channel payloads plus JSON envelopes retain their original shapes. Consolidating the existing rich-content mirror path removes one net line of production code.

User Impact

Location-only messages remain visible in conversation history after a successful send, so users and agents can understand what was delivered without leaking untrusted place labels into model-visible text.

Evidence

Four new regressions were observed failing on clean main before the repair: location-only plan projection returned empty text, ordinary send prepared an empty mirror, a real successful synthetic channel-adapter delivery made zero transcript-appender calls, and a current-source location reply returned false without mirroring.

After the owner-boundary repair, all six focused owner and sibling suites passed (310 tests):

OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs \
  src/infra/outbound/payloads.test.ts \
  src/infra/outbound/deliver.test.ts \
  src/infra/outbound/message.test.ts \
  src/infra/outbound/source-reply-mirror.test.ts \
  src/infra/outbound/message-action-send.validation.test.ts \
  src/channels/location.test.ts

Focused oxlint, oxfmt, git diff --check, and the repository assertion-safety ratchet passed. Independent owner/sibling review and structured Codex autoreview reported no actionable findings. Production delta: +14/-15 (net -1); tests: +118/-0.

No isolated authenticated location-capable external channel was configured for this task; the regression instead drives the real outbound-delivery orchestrator through a registered synthetic channel adapter and asserts the actual session-transcript append boundary after a successful platform send. Delivery and JSON regressions additionally prove the wire payload remains a structured location with empty text.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 09:27
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:57 AM ET / 09:57 UTC.

ClawSweeper review

What this changes

The PR renders safe coordinate text for location-only outbound replies when recording conversation history, while leaving channel and JSON location payloads structured.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open for normal maintainer handling: no actionable defect was found in the inspected PR head, but current-main comparison, history, and live GitHub details could not be completed because this checkout lacks those objects and network resolution failed.

Priority: P2
Reviewed head: a074cf0c4baa9a588a2e93cbef3df68e41dceba2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The inspected patch is a focused owner-boundary repair with meaningful regression coverage; exact-base and current-main verification remain unavailable in this environment.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to this maintainer-authored PR; its body documents a focused synthetic adapter exercise of the real outbound-to-transcript boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to this maintainer-authored PR; its body documents a focused synthetic adapter exercise of the real outbound-to-transcript boundary.
Evidence reviewed 7 items Canonical mirror rendering: The new shared renderer uses the existing location formatter only when normal payload text is empty, then preserves presentation and interactive fallback behavior.
Successful-delivery boundary: The delivery orchestrator mirrors only successfully delivered payloads and now obtains location-only text from the shared renderer while retaining hook-content precedence.
Current-source reply boundary: Current-conversation source replies build the same payload plan and normalize the location before projecting the transcript text.
Findings None None.
Security None None.

Live Verification

Command: OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs src/infra/outbound/payloads.test.ts src/infra/outbound/deliver.test.ts src/infra/outbound/message.test.ts src/infra/outbound/source-reply-mirror.test.ts src/infra/outbound/message-action-send.validation.test.ts src/channels/location.test.ts

Result: PASS (completed)

OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs src/infra/outbound/payloads.test.ts src/infra/outbound/deliver.test.ts src/infra/outbound/message.test
.ts src/infra/outbound/source-reply-mirror.test.ts src/infra/outbound/message-action-send.validation.test.ts src/channels/location.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129197-PgiEEB/target$ OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs src/infra/outbound/payloads.tes
t.ts src/infra/outbound/deliver.test.ts src/infra/outbound/message.test.ts src/infra/outbound/source-reply-mirror.test.ts src/infra/outbound/message-action-send
.validation.test.ts src/channels/location.test.ts
OPENCLAW_VITEST_MAX_WORKERS=2 node scripts/run-vitest.mjs src/infra/outbound/payloads.test.ts src/infra/outbound/deliver.test.ts src/infra/outbound/message.test
.ts src/infra/outbound/source-reply-mirror.test.ts src/infra/outbound/message-action-send.validation.test.ts src/channels/location.test.ts
[test] starting test/vitest/vitest.unit-fast.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129197-PgiEEB/target

 ✓  unit-fast  src/channels/location.test.ts (17 tests) 9ms
 ✓  unit-fast  src/infra/outbound/payloads.test.ts (58 tests) 69ms

 Test Files  2 passed (2)
      Tests  75 passed (75)
   Start at  09:58:18
   Duration  4.75s (transform 3.46s, setup 201ms, import 4.46s, tests 78ms, environment 0ms)

[test] starting test/vitest/vitest.infra.config.ts































Assertions:

  • PASS expect_output: Test Files

How this fits together

Outbound planning creates channel-neutral reply payloads for delivery and a text projection for session history. Successful channel sends and current-conversation message-tool replies both feed that transcript path.

flowchart LR
  A[Message tool reply] --> B[Outbound payload plan]
  B --> C[Channel location payload]
  B --> D[Safe coordinate text]
  C --> E[Successful delivery]
  E --> F[Session transcript]
  D --> F
Loading

Before merge

  • Complete next step (P2) - This is an active maintainer-owned implementation PR with no discrete automated repair identified.
Agent review details

Security

None.

PR surface

Source -1, Tests +118. Total +117 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 14 15 -1
Tests 4 118 0 +118
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 132 15 +117

Review metrics

Metric Value Why it matters
Production versus regression coverage production +14/-15 (net -1); tests +118/-0 The supplied PR evidence reports a net-negative production repair with focused coverage across planning, delivery, and source-reply mirrors.

Merge-risk options

  • Current-main, base-diff, release, and live PR-comment verification remain unavailable locally because the required Git objects were not present and GitHub DNS resolution failed; exact-head CI and normal maintainer review should remain the merge gate.

Maintainer options:

  1. Decide the mitigation before merge
    Land the canonical shared mirror renderer after exact-head CI confirms the focused outbound and transcript paths.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the canonical shared mirror renderer after exact-head CI confirms the focused outbound and transcript paths.

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

No. The PR describes focused pre-fix regressions, but this read-only checkout could not retrieve the base or current-main objects and no test execution was performed.

Is this the best way to solve the issue?

Yes on the inspected head: one existing safe renderer is reused by planning, successful-delivery mirroring, and current-source replies instead of adding a second location formatting path.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs a bounded but user-visible conversation-history omission for successful location-only replies.
  • 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: Not applicable to this maintainer-authored PR; its body documents a focused synthetic adapter exercise of the real outbound-to-transcript boundary.

Evidence

What I checked:

Likely related people:

  • steipete: The available head and blame assign the inspected shared mirror-rendering implementation to this author; deeper feature history was unavailable in the local review object. (role: current outbound implementation contributor; confidence: low; commits: a074cf0c4baa; files: src/infra/outbound/payloads.ts, src/infra/outbound/deliver-transcript.ts, src/infra/outbound/source-reply-mirror.ts)

Rank-up moves

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

  • Let exact-head CI finish before merge.

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-25T09:35:15.937Z sha e518be9 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit c29d4f9 into main Aug 25, 2026
408 of 411 checks passed
@steipete
steipete deleted the codex/location-only-mirror-content-20260825 branch August 25, 2026 10:12
@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 26, 2026
…openclaw#129197)

* fix(outbound): preserve location-only replies in conversation history

* fix(outbound): normalize mirrored locations without type assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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.

1 participant