fix(runtime): preserve reviewed routing and transcript behavior#79076
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. source inspection gives a high-confidence reproduction path: current main lacks Discord messaging.targetResolver.resolveTarget and preserves entry.sessionFile through session entry merge when sessionId changes. I did not execute tests because this review was required to keep the checkout read-only. Real behavior proof Next step before merge Security Review detailsBest possible solution: Undraft after maintainer review, run the appropriate changed gate for Discord/Gateway runtime surfaces, and land the narrow resolver/sessionFile fix if validation stays green. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence reproduction path: current main lacks Discord messaging.targetResolver.resolveTarget and preserves entry.sessionFile through session entry merge when sessionId changes. I did not execute tests because this review was required to keep the checkout read-only. Is this the best way to solve the issue? Yes, the proposed approach appears to be the narrow maintainable fix: it reuses the plugin-owned Discord resolver through a lazy boundary and clears sessionFile only when the stored sessionId differs from the active one. The remaining question is validation completeness, not a better design direction. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0fca66549794. |
da5d9ac to
5c6b197
Compare
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
…claw#79076) * fix(runtime): preserve reviewed routing and transcript behavior * docs(changelog): note runtime review fixes
Summary
/new/session reset should not append a fresh session into the previous generated transcript file.messaging.targetResolver.resolveTargetbridge toresolveDiscordTarget, and gateway session merge drops stalesessionFilewhensessionIdchanges so the generated transcript path can rotate.user:/channel:parsing, or custom transcript path migration policy changed beyond the stale-session reset case.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
pnpm test:serial src/agents/bash-tools.exec-host-node.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/infra/outbound/sanitize-text.test.ts src/infra/outbound/deliver.test.ts extensions/telegram/src/bot.helpers.test.ts extensions/telegram/src/bot.create-telegram-bot.test.ts extensions/whatsapp/src/inbound/send-api.test.ts extensions/discord/src/audit.test.ts extensions/discord/src/channel.test.ts src/gateway/server-methods/agent.test.tspnpm check:changeddid not execute because the Blacksmith Testbox job stayed queued.Root Cause (if applicable)
discordPlugin.messaging.targetResolver, and no gateway test covered stale stored session rows with generated transcript paths rotating to a new session id.origin/main; this PR locks the remaining two live gaps.Regression Test Plan (if applicable)
extensions/discord/src/channel.test.ts,src/gateway/server-methods/agent.test.ts.User-visible / Behavior Changes
Diagram (if applicable)
N/A
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
pnpm changed:lanes --json.pnpm check:changed.Expected
Actual
pnpm changed:lanes --jsonselectedcore,coreTests,extensions, andextensionTests.tbx_01kr4z72c5zfhb9c43pm106zavpassedpnpm check:changedin 3m12s command time, exit 0. Actions run:https://github.com/openclaw/openclaw/actions/runs/25584797503.Evidence
Human Verification (required)
git diff --check, changed-lane selection, Crabbox/Blacksmithpnpm check:changedpass.source: "directory"; gateway stale transcript path clears only when storedsessionIddiffers from the active session id.pnpm check:changedpassed on Crabbox/Blacksmith.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
sessionIddiffers from the new activesessionId; same-session paths are preserved.