Repository navigation
Conversation
Browser Talk agent consults submitted their flattened orchestration input through the ordinary chat.send path, persisting a synthetic user-authored turn alongside the real spoken transcript. Dispatch consults through the trusted internal channel instead: system-turn formatted message, deliver: false, suppressed command interpretation, and internal_system provenance, plus a new hideFromDisplay internal option that persists the turn with display: false so the history projection, exports, and compaction all exclude it while the delegated agent still receives the full structured consult input. Fixes openclaw#133855
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 31, 2026, 8:32 AM ET / 12:32 UTC. ClawSweeper reviewWhat this changesThe PR routes Browser Talk consultations through trusted internal Gateway dispatch and adds a hidden-display option intended to keep generated consultation prompts out of user chat history. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 8 items remain The PR addresses the right Gateway boundary but still leaves the central leak on privileged Talk sessions and does not exclude the synthetic turn from later model context or session exports. Priority: P1 Review scores
Verification
How this fits togetherBrowser Talk forwards a realtime consultation to the Gateway, which admits a chat run and persists its input as a session turn. The persisted transcript feeds the Control UI, session export, compaction, and later model context. flowchart LR
A[Browser Talk consult] --> B[Scope-based authority]
B --> C[Trusted Gateway dispatch]
C --> D[Turn recorder]
D --> E[Chat history and exports]
D --> F[Future model context]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +39, Tests +126. Total +165 across 7 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Use one Talk-specific internal-turn contract for both authority modes that preserves the prompt for the active consult but prevents its durable record from being displayed, exported, compacted, or replayed as a user turn. Do we have a high-confidence way to reproduce the issue? Yes, by source: an operator.admin or operator.write Browser Talk consult takes the no-tools branch and records the synthetic prompt without display suppression. This read-only review did not execute the browser flow. Is this the best way to solve the issue? No. The patch fixes only the safe-read-only dispatch's display projection; it does not cover privileged callers or durable export/context semantics required by the reported behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a7be8e5ec6ff. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
## Summary - Preserve the lexical package entry through the packaged compile-cache respawn. - Refuse package updates when no package manager owns the active package root. - Keep pnpm ownership tied to one active global project, never its shared-store realpath. ## Problem `openclaw update --dry-run` could classify a pnpm 11 global install as npm after the launcher respawned through the shared-store package path. A real update could then create a second npm install while the pnpm-owned Gateway stayed on the old package. ## Root cause The packaged compile-cache respawn replaced the pnpm-generated hash-link entry in `process.argv[1]` with `import.meta.url`. The latter resolves to shared package content and has no global-project ownership identity. Manager detection then fell through to npm. ## Fix The launcher passes the lexical entry to its child. Existing pnpm owner discovery then resolves the exact active project, carries its prepared install target through dry-run and mutation, and rejects grouped, multiple, orphaned, or mismatched owners. Package roots with no proven owner now stop before stale-handoff cleanup, with recovery guidance, instead of falling back to npm. ## Proof - Red: a real isolated pnpm 11.25.0 global install of `[email protected]` reported `mode: npm` when compile-cache respawn was active. - Green: the same non-mutating dry-run on the repaired launcher reported `mode: pnpm` and the active hash-linked project root. - The green trace contains only pnpm probes and no npm command. - The complete pnpm global-project tree was unchanged after dry-run. - Focused launcher, owner-discovery, target-carry, ambiguity-refusal, and no-cleanup tests pass: 87 passed, one platform skip. ## Size - Production: +10/-6, net +4 lines for lexical ownership preservation, fail-closed package detection, and pre-mutation cleanup ordering. - Tests: +69 lines at the launcher, command, and package-owner boundaries. Fixes openclaw#134037 Co-authored-by: Ayaan Zaidi <[email protected]>
…4033) * fix(matrix): drain monitor tasks before retiring clients * test(matrix): split monitor task lifecycle coverage * refactor(qa): pass prepared factories into suite children * test(agents): preserve prepared model identity in prompt fixture * test(node-host): serialize fake container state transitions
…penclaw#134044) * fix(channels): isolate unavailable accounts from gateway diagnostics * refactor(channels): consolidate status lookup and health fixtures * refactor(channels): remove obsolete account context resolver * test(agents): complete the prepared provider handle fixture
…hanges (openclaw#133920) * fix(config): preserve owners when importing legacy rosters and changing stores * test(buzz): await account readiness before testing recovery * docs(config): clarify root-file ownership transitions * test: bind sandbox prompt fixture to its prepared model
…tory (openclaw#133947) * fix(talk): keep Browser Talk agent-consult turns out of user chat history Browser Talk's realtime agent-consult bridge (startTalkRealtimeAgentConsult) submitted the provider's flattened consult question/context/style through an ordinary chat.send, so it persisted, broadcast, and rendered as a normal user-authored turn (visible after reload/export) alongside the real spoken transcript. Mark that synthetic turn with systemInputProvenance { kind: "internal_system", sourceTool: "talk_agent_consult" } so it is never attributed to the participant and route both the toolsAllow and unrestricted chat.send branches through the existing trusted-internal-input contract that already backs it. Hide user-role turns carrying that provenance from the shared display-history projection (the same seam that already hides subagent_announce/completion-report turns), which covers live rendering, reload, and export uniformly. The forced-consult fallback re-enters the same browser toolCall path, so it is covered without separate changes. Closes openclaw#133855. * fix(talk): stop the hidden Talk consult turn from persisting into raw transcript exports The display-projection filter added in the prior commit only hides the synthetic consult turn from rendered/reloaded history; the raw transcript entry still persists as a full-content role:user message, and /export-session reads raw transcript rows directly (it never runs the display projection), so the consult text still leaked into HTML session exports. Mark the persisted consult turn display:false, reusing the existing goal-resume mechanism, and redact display:false user-turn content during export instead of dropping the row (dropping would orphan a child entry's parentId in the exported tree). * fix(talk): keep internal consult prompts out of chat history Co-authored-by: chelsealong <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: chelsealong <[email protected]>
…33912) * fix: preserve policy owners across reviews and compaction * fix: retain policy owners through native tool construction * fix(agents): preserve policy keys for plugin delivery * test(codex): use prepared runtime plan in hook fixture
…penclaw#133991) * fix(doctor): prune stale path install records shadowed by load paths * fix(doctor): persist stale path record cleanup --------- Co-authored-by: Ayaan Zaidi <[email protected]>
…#89636) * fix(secrets): collect persona-level TTS provider SecretRefs Replay of openclaw#89636 onto current main. Persona TTS apiKey SecretRefs collected; Discord registry entries included. Signed-off-by: Sebastien Tardif <[email protected]> * fix(secrets): resolve persona credentials through shared TTS owners Preserve persona credential ownership across global, agent, and Discord voice surfaces while consolidating collection and registry discovery. Co-authored-by: Sebastien Tardif <[email protected]> --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]>
Generated consult input must not enter chat command interpretation. Keep human Stop and dedicated voice controls unchanged. Co-authored-by: lsr911 <[email protected]>
|
@clawsweeper re-review The display/provenance owner repair has landed in #133947. This PR now preserves the contributor's independent literal-input fix with three failure-first Gateway reproductions, human Stop and custody controls, 61 passing tests, full changed checks and an inspectable before/after trace in the body. The original contributor head remains an ancestor; no raw archive or later-context exclusion is claimed. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Merged via squash.
|
* fix(gateway): keep Talk agent consult input out of user chat history Browser Talk agent consults submitted their flattened orchestration input through the ordinary chat.send path, persisting a synthetic user-authored turn alongside the real spoken transcript. Dispatch consults through the trusted internal channel instead: system-turn formatted message, deliver: false, suppressed command interpretation, and internal_system provenance, plus a new hideFromDisplay internal option that persists the turn with display: false so the history projection, exports, and compaction all exclude it while the delegated agent still receives the full structured consult input. Fixes openclaw#133855 * ci: resolve OpenGrep base before fetching history (openclaw#134054) * test(scripts): batch distribution import fixtures (openclaw#134039) * fix(update): retain pnpm owner across launcher respawn ## Summary - Preserve the lexical package entry through the packaged compile-cache respawn. - Refuse package updates when no package manager owns the active package root. - Keep pnpm ownership tied to one active global project, never its shared-store realpath. ## Problem `openclaw update --dry-run` could classify a pnpm 11 global install as npm after the launcher respawned through the shared-store package path. A real update could then create a second npm install while the pnpm-owned Gateway stayed on the old package. ## Root cause The packaged compile-cache respawn replaced the pnpm-generated hash-link entry in `process.argv[1]` with `import.meta.url`. The latter resolves to shared package content and has no global-project ownership identity. Manager detection then fell through to npm. ## Fix The launcher passes the lexical entry to its child. Existing pnpm owner discovery then resolves the exact active project, carries its prepared install target through dry-run and mutation, and rejects grouped, multiple, orphaned, or mismatched owners. Package roots with no proven owner now stop before stale-handoff cleanup, with recovery guidance, instead of falling back to npm. ## Proof - Red: a real isolated pnpm 11.25.0 global install of `[email protected]` reported `mode: npm` when compile-cache respawn was active. - Green: the same non-mutating dry-run on the repaired launcher reported `mode: pnpm` and the active hash-linked project root. - The green trace contains only pnpm probes and no npm command. - The complete pnpm global-project tree was unchanged after dry-run. - Focused launcher, owner-discovery, target-carry, ambiguity-refusal, and no-cleanup tests pass: 87 passed, one platform skip. ## Size - Production: +10/-6, net +4 lines for lexical ownership preservation, fail-closed package detection, and pre-mutation cleanup ordering. - Tests: +69 lines at the launcher, command, and package-owner boundaries. Fixes openclaw#134037 Co-authored-by: Ayaan Zaidi <[email protected]> * test(parallel): check version header at request boundary (openclaw#133891) * fix(matrix): drain monitor tasks before retiring clients (openclaw#134033) * fix(matrix): drain monitor tasks before retiring clients * test(matrix): split monitor task lifecycle coverage * refactor(qa): pass prepared factories into suite children * test(agents): preserve prepared model identity in prompt fixture * test(node-host): serialize fake container state transitions * fix(channels): isolate unavailable accounts from gateway diagnostics (openclaw#134044) * fix(channels): isolate unavailable accounts from gateway diagnostics * refactor(channels): consolidate status lookup and health fixtures * refactor(channels): remove obsolete account context resolver * test(agents): complete the prepared provider handle fixture * fix(config): preserve owners across legacy roster imports and store changes (openclaw#133920) * fix(config): preserve owners when importing legacy rosters and changing stores * test(buzz): await account readiness before testing recovery * docs(config): clarify root-file ownership transitions * test: bind sandbox prompt fixture to its prepared model * fix(talk): keep Browser Talk agent-consult turns out of user chat history (openclaw#133947) * fix(talk): keep Browser Talk agent-consult turns out of user chat history Browser Talk's realtime agent-consult bridge (startTalkRealtimeAgentConsult) submitted the provider's flattened consult question/context/style through an ordinary chat.send, so it persisted, broadcast, and rendered as a normal user-authored turn (visible after reload/export) alongside the real spoken transcript. Mark that synthetic turn with systemInputProvenance { kind: "internal_system", sourceTool: "talk_agent_consult" } so it is never attributed to the participant and route both the toolsAllow and unrestricted chat.send branches through the existing trusted-internal-input contract that already backs it. Hide user-role turns carrying that provenance from the shared display-history projection (the same seam that already hides subagent_announce/completion-report turns), which covers live rendering, reload, and export uniformly. The forced-consult fallback re-enters the same browser toolCall path, so it is covered without separate changes. Closes openclaw#133855. * fix(talk): stop the hidden Talk consult turn from persisting into raw transcript exports The display-projection filter added in the prior commit only hides the synthetic consult turn from rendered/reloaded history; the raw transcript entry still persists as a full-content role:user message, and /export-session reads raw transcript rows directly (it never runs the display projection), so the consult text still leaked into HTML session exports. Mark the persisted consult turn display:false, reusing the existing goal-resume mechanism, and redact display:false user-turn content during export instead of dropping the row (dropping would orphan a child entry's parentId in the exported tree). * fix(talk): keep internal consult prompts out of chat history Co-authored-by: chelsealong <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: chelsealong <[email protected]> * fix: preserve policy owners across reviews and compaction (openclaw#133912) * fix: preserve policy owners across reviews and compaction * fix: retain policy owners through native tool construction * fix(agents): preserve policy keys for plugin delivery * test(codex): use prepared runtime plan in hook fixture * fix(doctor): prune stale path install records shadowed by load paths (openclaw#133991) * fix(doctor): prune stale path install records shadowed by load paths * fix(doctor): persist stale path record cleanup --------- Co-authored-by: Ayaan Zaidi <[email protected]> * fix(secrets): collect persona-level TTS provider SecretRefs (openclaw#89636) * fix(secrets): collect persona-level TTS provider SecretRefs Replay of openclaw#89636 onto current main. Persona TTS apiKey SecretRefs collected; Discord registry entries included. Signed-off-by: Sebastien Tardif <[email protected]> * fix(secrets): resolve persona credentials through shared TTS owners Preserve persona credential ownership across global, agent, and Discord voice surfaces while consolidating collection and registry discovery. Co-authored-by: Sebastien Tardif <[email protected]> --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]> * fix(gateway): preserve literal Talk consult questions Generated consult input must not enter chat command interpretation. Keep human Stop and dedicated voice controls unchanged. Co-authored-by: lsr911 <[email protected]> --------- Signed-off-by: Sebastien Tardif <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: chelsealong <[email protected]> Co-authored-by: Wynne668 <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]> Co-authored-by: lsr911 <[email protected]>
Related: #133855. Browser Talk display/provenance is already handled by #133947; this PR addresses the separate interpretation of generated consult input.
What Problem This Solves
Fixes an issue where a Browser Talk consult could silently do no work—or cancel an existing task—when the voice provider generated a question consisting of
/stoporstop. The tool call returned a consult run ID even though its question never reached the model.Why This Change Was Made
The Talk bridge forwarded generated question text into normal chat command processing. It now sets the existing
suppressCommandInterpretationfield on that generated request, preserving the canonical trusted dispatcher, hidden transcript metadata and caller tool restrictions. This is one production line; it adds no helper, prompt prefix, configuration or protocol field.Thanks to @lsr911 for identifying and proposing suppression of command interpretation for generated Talk input.
User Impact
Generated consult questions reach the agent as literal text and do not cancel a running task merely because they resemble a command. Actual human
/stopcommands retain their cancellation behavior, and the dedicated Talk cancellation owner is unchanged. Existing Browser Talk history visibility and provenance remain unchanged.Evidence
The existing Gateway fixture exercises the actual Talk RPC handler, trusted chat dispatch, command processing, admission and SQLite recorder; only model execution is synthetic and held/released. The regression failed before the repair:
After the repair, all six Gateway cases passed: both literal stop spellings reached model input; the existing consult remained active and the generated question was dispatched after release; human Stop still aborted the active model; both owner and read-only Talk history-custody cases stayed green. The parser/user-turn and existing shared-control suites passed another 55 tests, including explicit Talk cancellation.
Commands used with Node 24.20.0 and an isolated HOME/cache:
Full changed-file checks passed, including production/test types, scoped lint, formatting, dead exports and architecture guards. Fresh independent P0–P2 review was clean. All test/check/review processes drained; no dependency, schema, config or operator-state changes were made.
This is command-routing proof with a synthetic model, not microphone, audio or live-provider proof. There is no visual UI change, so before/after images are inapplicable; #133947 owns the separate real-Chrome display proof.
Release note: treat generated Browser Talk agent questions as literal input, preserving active tasks and human Stop controls. Thanks @lsr911.
Production +1/-0; tests +63/-0. The single line opts the generated-input producer into the existing literal-input contract; no alternative helper or parser policy is added. The behavior predates the display repair and is present in stable v2026.8.1; exact original introduction is unknown.
Actual Gateway before/after console output
The baseline includes three intended failures and one excluded dedicated-cancel fixture failure. That extra case could not exercise registry cancellation through the shared model mock and was removed; explicit cancellation is covered by its unchanged owner suite. No product check was weakened.
Review disposition for the original head: the privileged/read-only display split and duplicate helper were superseded by the canonical #133947 repair, now included in this branch's base. This PR retains the contributor's independently useful literal-input fix and real admission regressions. Raw archive retention and future model-context semantics are explicitly not changed; that broader #133855 follow-up is not closed here. Browser Markdown export uses the display projection already verified by #133947; raw HTML export is a separate contract. Original mocked-dispatch proof is replaced by real Gateway dispatch/admission/recorder coverage above.
Proof source binding: repaired tree committed as
98ea1ad7f2e8107194331b88808ed3b855f65a5b; original contributor ancestry retained at published head712b002c60343fc323e7e508ecd6d6ca6481b10dwithout changing tested source bytes. Production SHA-256d4dfae4bd36f34a0c6a432c29140ac25035f76549757f214e72a9b723c29f48d; Gateway test SHA-256e95bdaec7b119430edce97ca38aa26a0a6792d909780e60aa21b2a0e9d19e88c.