Repository navigation
fix: make generated chat replies open the correct source - #154882
roboclaw-bot wants to merge 4 commits into
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. |
|
@vyctorbrzezowski — scope coordination with #150549: this repair translates malformed run aliases at the Gateway delivery/transcript owner; it does not replace the reply-attribution or participant-control work. The UI portion is limited to connection-scoped source-lookup outcomes and two English error strings, preserving symbolic replies and lazy history. No changes are being made to your branch. |
|
Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 3:16 AM ET / 07:16 UTC (Revision 15). ClawSweeper reviewWhat this changesThe branch binds generated chat replies to saved source-message IDs in Gateway delivery and transcripts, updates Control UI source lookup and retry behavior, and adds documentation and regression tests. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main still passes run IDs through the Gateway reply path, so the branch has a distinct repair. The prior review’s screenshot-delivery and dispatcher-conflict items appear addressed; current-head CI was still running in the supplied check snapshot. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway accepts a chat turn, saves its user message, and delivers the agent’s reply. The Control UI reads that reply and fetches its referenced original message to render and navigate the Replying to line. flowchart LR
A[Chat turn] --> B[Gateway admission]
B --> C[Saved user message]
C --> D[Session and visibility checks]
D --> E[Reply source binding]
E --> F[Live and saved reply]
F --> G[Control UI source lookup]
G --> H[Reply line or notice]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +357, Tests +356, Docs +6. Total +719 across 23 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep committed user-turn identity as the Gateway’s reply-source owner, and preserve the current session and sharing checks when the UI fetches an original. Do we have a high-confidence way to reproduce the issue? Yes, from source and the supplied browser comparison: current main forwards run IDs without this binding, and the older UI treats structured source errors incorrectly. I did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. The repair uses the committed user-turn receipt at the Gateway producer and keeps source reads behind the existing authorized lookup, while the UI retries only after an explicit action. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 98f2e33432fd. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
|
Synchronization recovered and exact-head CI passed on September 22. CI recovery — September 22GitHub retained stale PR-head projections after the patch-identical rebase. Its reopen API then explicitly rejected the rebased branch. The existing branch was restored, with an exact lease, to the already-reviewed head Fresh PR-event CI run 35784585329 completed successfully on the restored head against a newly generated current-main test merge. This is not a rerun of the September 21 failed workflow. Main already contains the fixture repairs noted in the recovery discussion. Exact-head CI run 35784585329 and the required No PR merge, auto-merge, main push, release or deployment was performed. |
718f00a to
1565de1
Compare
1565de1 to
b37c672
Compare
|
@clawsweeper re-review Current head:
|
|
🦞👀 Re-review progress:
|
0a14466 to
fe05885
Compare
|
@clawsweeper re-review Current head: This incorporates upstream fixture repair The original exit-127 failure reproduced locally. Clean Blacksmith Testbox proof passes all 17 fixture tests (36.70 s wall), with candidate source and fixture hashes verified, wrapper exit 0 and the lease stopped. On this head, all 80 focused reply-dispatch, session-binding and UI navigation tests pass; normal core/UI types and UI i18n pass. Details and the local managed-host fixture limitation are in the current PR body. Fresh CI: https://github.com/openclaw/openclaw/actions/runs/36484321693 (still pending; not claimed green). Existing inspected screenshots and Work sessions links are preserved. Review only—no merge or autofix requested. |
|
🦞👀 Re-review progress:
|
fe05885 to
b5aff8c
Compare
|
@clawsweeper re-review Current head: Final validation: all 80 focused reply tests passed (130.63 s wall), all 11 selected gates passed, and the actual fresh main+candidate merge fixture parses. The restored fixture and its shell/daemon/helper inputs match the earlier clean Testbox 17-test pass. All three commits are range-diff-identical; both human coauthor trailers, credit, Work sessions and existing screenshots remain intact. Fresh CI: https://github.com/openclaw/openclaw/actions/runs/36486712300 (pending, not claimed green). Review only; no merge, auto-merge or autofix requested. |
|
🦞👀 Re-review progress:
|
b5aff8c to
8e3f593
Compare
|
@clawsweeper re-review Current head: Preserves main #150549 Replying-to/participant design and current Gateway authorization/media owners. Canonical committed-source custody remains across all paths. A denied-read composition regression was reproduced and fixed through the current status/invalidation owner.159 cases/8 files pass, then21 UI cases pass including stale denial;14 selected gates and independent final P0–P2 review pass. Both human coauthor trailers and existing Work sessions/credit remain intact. Current-head CI: https://github.com/openclaw/openclaw/actions/runs/36676208724 (pending, not claimed green). Full scoped evidence is in the PR body. Review only; no merge, auto-merge or autofix requested. |
|
🦞👀 Re-review progress:
|
Current Replying-to visual proof — September 30Head Captured the actual Control UI app and production reply-navigation/renderer through the repository’s mocked-Gateway WebSocket harness: Chromium, 1280×900, dark theme, identical synthetic conversation and fixed display time. Every image was visually inspected for legibility, clipping and sensitive content. The composer remains usable. This is deterministic browser boundary proof, not a live Gateway or provider run. Denied source lookupThe Gateway fixture returns structured Before After Retryable source lookupThe fixture returns temporary Before After Delivery status
Both visual destinations are now complete. Subsequent head |
Refresh the existing repair through the current shared media-preparation owner without restoring retired preparation logic. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
Resolve run aliases from the committed source and retained work owner. Retire source references from committed physical-store publications and resource closure, keeping collected completion valid until its work settles. Classify structured missing/denied source reads as unavailable instead of retrying them; transient transport failures remain explicitly retryable. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
Separate the dispatch binding reader from the recorder-owned source lease so the source lifetime no longer depends on the dispatch parameter graph. The reader body and runtime behavior are unchanged; callers use the new sibling. Reproduces and fixes the type-inclusive Madge architecture check without weakening the scanner, adding suppressions, or changing a baseline. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
Publish structured lookup denials through the same current-connection status and render-invalidation path as a normal missing-source response. Preserve the newly landed Replying-to design and explicit retry ownership. Existing denial cases reproduce the missing invalidation; extend the stale-result table to cover a prior connection denial. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
8e3f593 to
4056113
Compare




What Problem This Solves
Fixes: generated chat replies can point at a run ID instead of the saved source message, producing an unavailable source link; temporary source lookup failures can also be misreported as missing messages.
User Impact
New replies use the exact committed source identity and originals remain navigable through main’s Replying to line. Selecting a known author’s name retries a temporarily failed source lookup; missing and inaccessible sources share a privacy-preserving notice, while authorized oversized sources report the display limit. No configuration or migration is required.
Why This Change Was Made
The webchat adapter translates only exact current/originating run aliases through the committed user-turn receipt, with source visibility and session-binding checks. Live delivery, transcript persistence, commands, and adopted completions use the same identity owner. Legitimate explicit references, symbolic current replies, literal prepared text, and media remain unchanged. The UI retains lookup outcomes within its existing connection-scoped cache; rendering does not cause retry loops.
This does not guess historical mappings or rewrite old transcripts. Main now includes #150549’s Replying to line and participant design; this PR preserves it and does not restore the old quote card. #149416 owns diagnostic deduplication. Neither changes this canonical Gateway producer.
Credit: Dallin Romney for the report and requested repair.
Work sessions
Evidence
Current-layout visual proof
Inspected before/after screenshots for denied and retryable Replying-to source lookups are embedded in the linked proof comment. These compare captured head
8e3f5936f8cb2fb3c6ad84ae076e263b31cccb84with its main baseline; the subsequent import-only conflict refresh leaves these reply-navigation/rendered-state inputs unchanged using the real Control UI app and deterministic mocked Gateway responses (1280×900, dark theme). They replace the historical quote-card captures as proof of the current states. All four inspected images were also delivered as actual attachments in the originating discussion at 06:57–06:58 UTC on September 30 (retry Before/After, then denied Before/After); successful delivery receipts were independently verified. Both visual destinations are complete.September 30 current-main import conflict refresh
4056113b410a2d836645dfe49be08fdb47856741, based on pinned mainfcd48b68c959b61b43d9380ab0a3b93de53967d1. A new actual dispatcher import conflict followed #161352. The resolution retains main’suniqueStringsimport and ordered media de-duplication, while keeping the reviewed removal of the retired reply-payload helper. No behavior, public contract or test was added.src/media-understanding/runner.vision-skip.test.tsentry inconfig/max-lines-baseline.txt(exit 1). An isolated exact-main index control at68ef53a4a6050cbfa70fde200e1a96d68a2a191creproduced it with identical source/baseline blobs. This PR did not edit those files or weaken the check. That local result remains a recorded failure, not a passing check; it is not the current hosted status. Current-head CI and the required gates below subsequently completed successfully. No particular upstream repair or cause for the difference is asserted.4056113b410a2d836645dfe49be08fdb47856741. Its Actions openclaw/ci-gate and combined required gate are SUCCESS. ClawSweeper revision 15 reviews this exact head: Platinum Hermit 4/6 overall, proof and patch quality; no findings, security findings or before-merge items, with review state ready. Its earlier in-progress CI snapshot is superseded by these terminal live results. GitHub confirms OPEN, non-draft and mergeable/clean; auto-merge remains disabled.Earlier September 30 owner-aware conflict repair — prior head
8e3f5936f8cb2fb3c6ad84ae076e263b31cccb84, based on pinned main3ab80f87fe46c32c80d34c3ece86e98ee62649b7. This repairs actual conflicts; prior-head CI and scores below remain historical.Before
After
Prior September verification — historical heads and CI
September 28 conflict and CI repair
b5aff8c6d5c6b09ab96284333736284088fc9fddincorporates pinned maina46cde88785df6aa867e35f98aa5fabce6cd45e9. The first September 28 rebase repaired actual conflicts; the two subsequent refreshes incorporate upstream fixes for observed failing CI gates.0a144668855dpassed 110 tests across 7 files, 187.80 s wall: reply dispatch, exact admission binding/cleanup, main’s queued-input withdrawal/admission-read/upload policy, and UI quote navigation. The async-media/cancellation siblings passed 18 tests across 2 files, 58.83 s wall.fe0588523f33, the reply-dispatch, session-binding and UI navigation suites passed again: 80 tests across 3 files, 71.19 s wall; normal core/UI typechecks and UI i18n also passed. Unchanged scoped lint and topology proof is reused. After incorporating the second upstream fix and installing its frozen lockfile, final headb5aff8c6d5c6passed the same 80 tests across 3 files in 130.63 s wall, all 11 selected gates, and a direct fixture transform. The freshly fetched main+candidate merge also parses the fixture successfully. No new product patch was added; all three commits remain range-diff-identical.reset_lanebut omitted its newfirst_hop_timingdependency (exit 127). The checked-out mergef7f8684b04f5546515b649c35cdbdeccc453eaadcombines maindc62a32209588cbf1a639f5d9ca53ddb45e53ccewith0a144668855d; those fixture/daemon inputs are unchanged by this PR. The failure reproduced locally in 13.16 s wall. The cancelled sibling jobs were not passes.=). No unrelated repair, main push, test weakening, or unchanged-head CI rerun was made here. The local post-repair fixture reached later assertions but hit this Team host’s installed system-service discovery (3 failures, including an inaccessible host service environment file); that run is not a pass. Clean Blacksmith Testbox proof then passed all 17 fixture tests in 36.70 s wall (pnpm test test/scripts/upgrade-survivor-systemd.test.ts --maxWorkers=1), with the exact candidate source tree and both fixture/shell-source hashes verified. Delegated run 36484212206, leasetbx_01m3mxm6m8bmxce4tyys43fqay: wrapper exit 0, settled successfully, and lease stopped/completed. The linked Actions carrier can show cancelled during normal one-shot cleanup; that is not the test result.fe0588523f33was cancelled after compact-small-3 job 109138125884 failed before any upgrade-fixture tests loaded:Identifier firstHopTiming has already been declaredat lines 93/101. The requiredopenclaw/ci-gatefailed; 118 cancelled jobs are not passes. #160694, commitcb8e8c73243ccc2dfb57b90a39ff007ccb7c6df9, added a duplicate timing-helper declaration. Failed merge679fa4036e03a3b212d159454ab032f9f11d7b76, its main parent1f912070c73b66bb9e1a6f900acaac4cfffe8cd3, and inspected main6f60364a84e8ab8edf8dd32ba367a95ba726d218share the identical failing fixture blob001debe61b3c3a66297654c8a237956a4e450201. The same Vite/Oxc transform reproduced the parse error independently. Upstream a46cde88785d removes only that duplicate and is now incorporated; it restores the exact fixture bytes verified by the 17-test clean-host proof above. The fixture shell, daemon and helper inputs are also unchanged. No unrelated branch repair or main push was made here.b5aff8c6d5c6b09ab96284333736284088fc9fdd: 174 successful jobs, 18 not-applicable/skipped, zero failures or cancellations. The Actions openclaw/ci-gate and protected combined required gate are SUCCESS, including dependency and security-sensitive review. ClawSweeper revision 11 reviews this exact head: Platinum Hermit 4/6 for overall readiness, proof and patch quality; no findings, security findings, or before-merge items. GitHub readback confirms OPEN, non-draft, mergeable/clean, with auto-merge disabled. This is current-head evidence, not a prior-head substitution.1b77c7882085f33d01f707f00eb23f19db79818b, combining maina571987554be0c4121202535e51dbc3fce45c76fwith this exact PR head.September 26 verification on prior head e22c906 — historical, not current-head CI
e22c906f5a38f654c120b4b6ee171c72b3e1e146: Platinum Hermit 4/6, no actionable findings and no before-merge checklist items.3754e42cb25ab827c96f208b8e9627461b71eb40, whose parents are main76e32e92441321b2e564263bc385cc7f4cc8ecd7and this exact PR head. Actual decoded hosted selectors and passing-case output confirm the files below ran; the routing projection alone is not counted as execution proof.e22c906f5a38f654c120b4b6ee171c72b3e1e146, refreshed onto repaired main5be36d37cb73a4f9ddf23ed9ab4fe51a3797e25c. The source-finalization conflict preserves main’s sharedwithPreparedWebchatReplyMediaowner and canonicalized inputs, without restoring retired media preparation.INVALID_REQUEST/FORBIDDENsource denials are unavailable, not retryable transport failures.September 26 hosted test costs
These are sums of published, rounded case durations, not per-file wall-clock times. Per-file wall times were not published. All listed jobs completed successfully.
chat-send-reply-dispatch.test.tschat-send-session-binding.test.tschat-send-work-admission.test.tschat-pane-history-reply.test.tsExact-head architecture CI repair
CI 36210937399 on previous head
b37c672a0c4008f3265f12a904d2250d9362304fwas cancelled after its runtime-topology architecture job failed. This was PR-caused, not the earlier upstream SDK failure: the type-inclusive Madge check found a cycle from dispatch types through the reply-source module and user-turn recorder. The runtime-value-only scan had passed and did not cover that graph.The same Madge failure was reproduced locally, then repaired by separating the dispatch binding reader from the recorder-owned source lifetime. Reader logic is byte-identical, all callers moved, and no scanner, rule or baseline was weakened. The complete
pnpm check:architecturechain now passes, as do core types, targeted lint, and all 16 existing binding/cleanup tests. The cancelled run and its failed required gate are not passing evidence. The new exact-head run and required gate now pass, including the previously failing architecture job; the fresh exact-head review has no findings or checklist items.Earlier upstream SDK repair — historical context
Resolved upstream CI failure
The previous-head CI run hit two unrelated SDK TS2552 errors introduced on main by
d16cdc55154796e421a87e124f70cb329d004092. Its actual merge9925a688ed3772a990d8711c9a3479ff6e6c4266combined main0e926158bee25d12953777ab09c16c27beae7998with previous candidate1565de115ad2f86edc4ead6ddfb69327d0177d46.A clean main control at
d16cdc55154796e421a87e124f70cb329d004092reproduced the same missingprojectHarnessTaskContentForPersistencecalls; the SDK file had the same blob in that control and both PR merge inputs. This PR never modifies that unrelated SDK owner. Main’s repair #158520, commit5be36d37cb73a4f9ddf23ed9ab4fe51a3797e25c, is now incorporated. No main push, blind unchanged-head rerun, merge, or auto-merge was used.View the OpenClaw team session