fix: restrict trajectory export to owners [AI]#97840
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 30, 2026, 6:37 AM ET / 10:37 UTC. Summary PR surface: Source +4, Tests +12. Total +16 across 2 files. Reproducibility: yes. Current-main source shows an authorized non-owner reaches Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared handler owner gate after maintainers accept the compatibility change and add redacted live proof showing non-owner denial plus owner export approval still working. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source shows an authorized non-owner reaches Is this the best way to solve the issue? Yes for the code shape. Reusing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 738b2be4b49b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +12. Total +16 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Verification before merge: Behavior addressed:
Regression Risk: Best fix verdict: best. The command handler owns this gate, and adding the existing owner check there covers both User behavior change: |
|
@openclaw-mantis telegram live proof: verify an authorized non-owner cannot run /export-trajectory and that an owner can still request the export. |
|
Behavior proof for current head Behavior addressed: Real environment tested: local OpenClaw source checkout at the PR head, GitHub Actions PR CI for the same head, plus review-pr and autoreview gates. Exact steps or commands run after this patch:
Evidence after fix:
Observed result after fix: the regression test sets What was not tested: no live chat transport was driven in this pass; the changed behavior is in the shared command handler before channel-specific approval/export routing. Regression risk: low. The change uses the existing owner-gate helper in the command handler and does not change config, storage, provider, plugin, channel transport, schema, migration, or dependency behavior. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@openclaw-mantis telegram desktop proof Please verify this PR head against the baseline for
Use redacted evidence only. Candidate head: |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs for /export-trajectory from an authorized non-owner chat sender.
Motion-trimmed clips: |
|
@clawsweeper re-review |
|
@openclaw-mantis telegram desktop proof: verify an authorized non-owner sees the owner-gate denial for /export-trajectory and an owner still reaches the normal trajectory export approval flow.
Please capture redacted Telegram Desktop before/after evidence for both paths on the current PR head. The previous Mantis proof did not show the owner-gate denial or owner success, so this request needs those exact behaviors. |
|
@openclaw-mantis telegram desktop proof Please verify this PR head against the baseline for
This is a corrected request after ClawSweeper rejected the prior Mantis proof because it showed the private-route-unavailable reply and did not show owner success. |
(cherry picked from commit 6cb82ea)
(cherry picked from commit 6cb82ea)




What Problem This Solves
Fixes an issue where authorized channel users who were not owners could start a trajectory export from chat and receive sensitive session artifacts.
Why This Change Was Made
Trajectory export now uses the same owner-only command gate as other sensitive chat commands before building the export reply. The change keeps the existing authorized-sender check and adds the owner check at the command handler boundary, so the export builder is not reached for non-owner senders.
User Impact
Owners can still export trajectory bundles from the active session. Authorized non-owner users can no longer initiate that export path from chat.
Evidence
node scripts/run-vitest.mjs src/auto-reply/reply/commands-info.test.tspassed: 1 file, 17 tests.AI-assisted: yes.