Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 3:16 PM ET / 19:16 UTC. ClawSweeper reviewWhat this changesThe PR stops native chat-history replay from applying cached tool metadata or synthetic IDs to the wrong structured or flattened tool row. Merge readinessKeep open for maintainer review. The focused cache-correlation fix has credible current-head UI proof and regression coverage, but GitHub reports the branch is currently dirty against main, so it needs conflict resolution and merge-result validation before landing. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherGateway history and locally persisted tool metadata flow through the Tray chat-history provider before the native timeline renders tool activity. The provider allocates row identities and consumes cached metadata so the final activity cards retain correct labels, state, and output. flowchart LR
A[Gateway chat history] --> B[History replay projection]
C[Persisted tool metadata] --> D[Cache matching]
B --> D
D --> E[Timeline identity allocation]
E --> F[Native tool activity cards]
Decision needed
Why: The patch is session-state sensitive, current main has moved in the same chat-provider area, and GitHub currently reports a dirty merge state. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase this narrow history-correlation repair onto current main, retain the exact cache-consumption and synthetic-ID invariants, then land only after the merge-result Tray tests and isolated visual proof pass. Do we have a high-confidence way to reproduce the issue? Unclear for current main: the PR head has a deterministic provider and UI fixture, but current-main source materialization was blocked locally. The refreshed merge result should reproduce the structured-call then flattened-output sequence. Is this the best way to solve the issue? Yes, conditionally: reserving verified IDs and exact keyed cache consumption is a narrow way to prevent cross-row correlation, provided it survives the current-main rebase unchanged in behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (18 earlier review cycles; latest 8 shown)
|
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
e1be9df to
128bc29
Compare
Co-authored-by: Copilot App <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Superseded by #1298, which is rebased onto current Retained: stable cross-key metadata merging, collision-free synthetic history IDs, exact keyed structured correlation with reused-ID timestamp disambiguation, safe flattened display metadata, deterministic structured/flattened collision tests, and current-head native UIA/screenshot proof. Discarded: obsolete provider-owned history/cache state, the old monolithic provider architecture, proof-only provenance plumbing, and unrelated Closing this PR without merge now that the focused replacement exists. |
Related to #894
Scope
This PR contains five focused layers across 11 files:
History/cache correlation
(RunId, ToolCallId, LegacyTurn)identities while preserving reused IDs across distinct runs and legacy turns.Collision-safe history identity allocation
history-tool-*IDs for flattened history and unkeyed structured fallbacks.RunIdandToolCallIdvalues from correlating flattened output to an active structured row.Exact keyed structured-cache matching
ToolCallIdexactly matches using ordinal comparison.Provider-backed production UI proof
OpenClawChatDataProvider.LoadHistoryAsync.IChatGatewayBridgehistory response and the real tool metadata cache path.OPENCLAW_ACCESSIBILITY_TEST_CHAT=1, fixturehistory-collision, and an exact isolatedOPENCLAW_TRAY_DATA_DIRmatch.Regression and provenance coverage
history-tool-0remains interrupted with no output.history-tool-1.clean:tree=<tree>proof provenance while retaining validated dirty descriptors with arbitrary positive file counts.hideFromChannelProgressremains intentionally out of scope.Exact head and base
72f81b76211828cba447148e69b35b98e83afd203a03dfddbed6323fa5cd970f41b7bb0a0ab2ea0cfix(chat): preserve history cache correlation683517894bd13dfeeb9996d3934bdac5b4b4863bfix(chat): avoid synthetic history ID collisions128bc29b3adc7263d0ad60d3ef9af285c49078d9test(chat): prove history ID collision rendering338f67575e259d132f0f1d44d8640e695f245bf2test(chat): route collision proof through history provider72f81b76211828cba447148e69b35b98e83afd20fix(chat): match structured history cache by call ID4712e227d110746400e93107c60616544d68f7b4maintarget:582a44713860409bc34c5acbf6da54a09cf2b10a+1740/-52mainadvanced after the completed rebase. GitHub reports the current PR mergeable; exact-head CI is the source of truth for the target merge result.Validation
git diff --check: passed.\build.ps1: passed, 5 of 5 projectsdotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,631 passed, 0 failed, 32 skippeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,268 passed, 0 failedNativeToolIdentityScreenshotProofTests,HistoryCollisionScreenshotProofTests, andReactorToolActivityProofTests: 3 passed, 0 failed withwin-x64Real behavior proof
The isolated fixture makes one real
RequestChatHistoryAsynccall throughOpenClawChatDataProvider.LoadHistoryAsync. The returned history contains an unfinished structured call with verified IDhistory-tool-0, followed by flattened tool output. The real metadata cache supplies the visible tool identities and safe arguments. The provider's allocator produces exactly two rows:history-tool-0:Interrupted, no output.history-tool-1:Done, ownsflattened output owned by history-tool-1.The screenshot and matching UIA diagnostics were generated from a clean detached checkout of exact product head
72f81b76211828cba447148e69b35b98e83afd20, tree60079b82a853ab063407189c2d062372ac5f06c4. No harness patch was required.8D01DC46D02B2DFD3521FA442AB338C4DCDD90012E9B47B057138144B16F84C6D530A81D33C768672820BE5505A0B612A9E26941BDF93BE4C27AD02B92DAEE3D7343CFE624D263E5A51EC3020AA6319A83F37E8EC2D912D45C3E6BBB4A66551DA9041AACFA915B16A0E0CA30C8D6806C633B59F06EA9E178163D19AB1884C45BD98CB1DA8CC157931AEC424915E86DB180135F0CB86A0C2E2459380DCAF91440All immutable raw URLs returned HTTP 200 with matching hosted bytes. The artifacts contain no blank media, credentials, user paths, real settings, or real Gateway data. No PR was opened from the proof-only branch.
Review
72f81b76211828cba447148e69b35b98e83afd20.PR #1111 interaction
PR #1111 remains complementary and was not modified by this work. Its current head is
919ec7c0c74d2fff572c0405a99a93cf7720a703.Its semantic patch owns persisted call ID aliases, message-level errors, string-encoded safe arguments, and failed-tool grouping. This PR owns positional cache correlation, flattened row identity, synthetic/structured ID collision handling, and exact keyed cache consumption. There is no direct changed-line overlap in the source or tests.
Release boundary
#894 is OPEN and remains open until the follow-up lands and a release includes #1078, #1114, and #1130. This PR does not close the issue and intentionally uses
Related to #894rather than a closing keyword.