ClawRouter icon indicating copy to clipboard operation
ClawRouter copied to clipboard

docs: improve Claw Compactor integration + security notes

Open aeromomo opened this issue 8 months ago • 1 comments

Summary

This PR improves documentation quality around two high-impact areas:

  1. ClawRouter × Claw Compactor integration

    • Adds a practical guide for combining compression + routing for better cost savings
    • Clarifies recommended pipeline order (Compactor -> ClawRouter -> Provider)
  2. Security policy for secrets and wallet material

    • Adds explicit guidance to avoid plaintext seed persistence
    • Documents token redaction and secret handling expectations
    • Adds a checklist for security-sensitive PR review

Changes

  • Update README.md quick navigation
  • Add README sections for integration and security
  • Add docs/claw-compactor-integration.md
  • Add docs/security-secrets.md

Why

  • Makes docs clearer for operators deploying in production
  • Reduces avoidable security mistakes in wallet/token handling
  • Helps users get better combined savings with Claw Compactor

Validation

  • Markdown/docs only change
  • Links and anchors verified locally

Summary by CodeRabbit

Documentation

  • Added comprehensive Compactor Integration guide, detailing token and cost reduction benefits, the recommended processing order for workflows, setup instructions, and validation checklists
  • Added Security Notes documentation covering best practices for operators and contributors, including secrets handling policies, log redaction requirements, secure credential storage, and incident response procedures
  • Updated README with navigation links to new documentation sections

aeromomo avatar Mar 08 '26 01:03 aeromomo

📝 Walkthrough

Walkthrough

The pull request adds documentation for Compactor integration and security practices. README.md is updated with new section links and content, while two new documentation files are created: one detailing integration workflow between ClawRouter and Claw Compactor, and another outlining secure defaults for handling secrets and credentials.

Changes

Cohort / File(s) Summary
README Updates
README.md
Added Quick Navigation links and body sections for Compactor Integration and Security Notes, with duplicated content in both locations (+29 lines).
Integration Documentation
docs/claw-compactor-integration.md
New documentation describing ClawRouter and Claw Compactor integration, including value proposition, recommended pipeline order (Compactor before Router), setup steps, validation checklist, and safety notes (+86 lines).
Security Documentation
docs/security-secrets.md
New documentation defining secure defaults for operators and contributors, covering seed handling, token management, file permissions, contributor checklist, and incident response workflow (+58 lines).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: documentation improvements for Claw Compactor integration and security notes, matching the PR objectives and file additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

[!TIP] Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Mar 08 '26 01:03 coderabbitai[bot]

Thanks @aeromomo — closing the PR, but please re-open the security half on its own; I want it.

On the Compactor part: ClawRouter doesn't integrate Claw Compactor — it reimplemented the idea. src/compression/index.ts says 'Implements 7 compression layers inspired by claw-compactor', and the layer files credit it the same way. So a Compactor -> ClawRouter -> Provider pipeline guide would point users at a third-party dependency for something already in the box. (Also CONFLICTING since March.)

But docs/security-secrets.md is good and I'd merge it today. 'Never persist seed material in plaintext… use OS-backed secure storage' is not hypothetical here — I closed #58 earlier tonight partly because its CDP wallet support called wallet.export() and wrote the seed in plaintext to ~/.openclaw/blockrun/cdp/wallet.json, while advertising itself as removing single-key risk. Your doc is exactly the standard that PR needed to be measured against.

Please open it as a standalone docs PR against current main — no Compactor content — and I'll review it promptly.

One more thing you surfaced indirectly: our compression isn't documented at all (grep -i compact README.md → nothing), despite being 7 layers of real work. That's our gap, not yours, and I've noted it.

VickyXAI avatar Jul 15 '26 04:07 VickyXAI