Repository navigation
fix(memory): persist trusted owner provenance at the canonical transcript boundary - #118987
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 6:02 PM ET / 22:02 UTC. ClawSweeper reviewWhat this changesThe PR records owner and provenance facts on persisted user turns so only external owner input remains trusted by transcript-backed memory, while synthetic handoffs retain their separate execution permissions. Merge readinessKeep this PR open for normal maintainer review. The patch repairs a source-proven trust-boundary gap: current main persisted the caller’s owner flag unchanged and several transcript producers omitted the authoritative owner/provenance facts; this branch normalizes that fact at the canonical persistence boundary and forwards it through the affected gateway, CLI, and overflow paths. The protected Priority: P1 Review scores
Verification
How this fits togetherUser turns arrive through gateway RPC, local agent commands, channel reply queues, and overflow summaries before OpenClaw persists a canonical transcript message to SQLite. Memory and dreaming consumers read that transcript metadata, so the persisted owner flag must distinguish genuine owner input from privileged synthetic work. flowchart LR
A[Gateway, CLI, and channel input] --> B[Owner and provenance facts]
B --> C[Canonical transcript builder]
C --> D{External owner input?}
D -->|Yes| E[Trusted owner metadata]
D -->|No| F[Untrusted transcript metadata]
E --> G[SQLite transcript and memory]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +28, Tests +133. Total +161 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the canonical persistence-boundary normalization once the final head checks pass and a maintainer confirms that synthetic owner execution must remain distinct from trusted durable-memory authorship. Do we have a high-confidence way to reproduce the issue? Yes—current-main source shows the canonical builder persisting a supplied owner flag unchanged, while the affected recorder paths omit or fail to forward the authoritative fact. The PR’s focused regression matrix exercises the resulting provenance combinations, though this read-only review did not execute it. Is this the best way to solve the issue? Yes—the best fix is to normalize trust once at AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 65fa1f9a7bd1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…r-admin-20260803 * origin/main: (89 commits) fix(googlechat): align doctor policy ownership with canonical account configuration (#118972) test(tui): prove editor input through PTY (#118982) fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987) test(qa): cover health monitor and cache boundaries (#118961) fix(macos): restore dashboard frame double-click zoom (#118976) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) test(gateway): cover node exec approval relay (#118825) test(qa): add Active Memory recall coverage (#118963) test(qa): promote package-backed Docker artifact proof (#118826) test(qa): cover diagnostic event boundary (#118844) test(gateway): cover WebSocket runtime contracts (#118797) fix(signal): drain accepted websocket messages before shutdown (#118975) fix(plugins): remove stale load paths during uninstall (#118930) test(qa): cover bundled runtime discovery (#118922) chore(clawhub): cover plugin release policy contracts (#118971) test(qa): cover support export and stability (#118956) fix(feishu): enforce exact signed webhook request boundaries (#118758) ...
…ansports-20260803 * origin/main: (120 commits) test(ui): add service-worker update primary QA proof (#118805) test(qa): cover CLI onboarding and plugin install sources (#118882) test(qa): cover remote logging boundaries (#118951) fix(sms): retry transient MMS failures before durable adoption (#118994) test(qa): cover video generation invocation (#118864) test(qa): cover media reference intake (#118858) test(qa): cover image generation task lifecycle (#118915) feat(sms): track Twilio delivery status (#118665) test(tasks): cover TaskFlow registry lifecycle (#118983) test(gateway): verify SSH tunnel fallback (#118818) fix(security): harden network tool output at canonical owner boundaries (#118984) fix(googlechat): align doctor policy ownership with canonical account configuration (#118972) test(tui): prove editor input through PTY (#118982) fix(memory): persist trusted owner provenance at canonical transcript boundary (#118987) test(qa): cover health monitor and cache boundaries (#118961) fix(macos): restore dashboard frame double-click zoom (#118976) fix(googlechat): recover durable lanes after oversized attachments (#118986) test(qa): cover runtime telemetry evidence (#118950) fix(gateway): resolve SQLite usage details (#118918) test(cron): cover durable scheduler state (#118981) ...
Root cause and architectural owner
Trusted transcript ownership was inferred or lost separately across gateway agent runs, local CLI recording, direct replies, collected followups, and durable overflow summaries. Synthetic inter-session/internal input could therefore become owner-authored durable memory, while real operator-originated owner turns could lose their authoritative ownership.
Canonical repair
buildPersistedUserTurnMessagepersistence owner: only genuine external-user owner input is eligible for trusted memory; inter-session and internal-system turns remain explicitly untrusted without reducing their separate execution permissions.Real behavior proof
{ "physicalStore": "agents/main/agent/openclaw-agent.sqlite", "consumer": "actual session-backed memory corpus and dreaming projection", "matrix": { "entrypoints": [ "gateway agent", "local CLI", "admin chat.send", "direct auto reply", "collect", "durable overflow" ], "provenance": [ "external_user", "inter_session", "internal_system" ], "sender": [ "owner", "nonowner" ], "scenarios": 16, "passed": 16 }, "mixedOverflow": { "queueCap": 1, "sameTransportSenderId": true, "inputOrder": [ "guest:false", "owner:true" ], "actual": [ { "text": "GUEST_ALPHA", "executionOwner": false, "transcriptOwner": false }, { "text": "OWNER_BRAVO", "executionOwner": true, "transcriptOwner": true } ], "modes": [ "collect", "followup" ], "guestLeak": false } }