Skip to content

fix: stop returning redaction mapping in model-visible tool output (re-land on main)#8

Merged
sidmohan0 merged 1 commit into
mainfrom
fix/redact-mapping-exposure-main
Jul 2, 2026
Merged

fix: stop returning redaction mapping in model-visible tool output (re-land on main)#8
sidmohan0 merged 1 commit into
mainfrom
fix/redact-mapping-exposure-main

Conversation

@sidmohan0

Copy link
Copy Markdown
Contributor

Summary

Re-lands #7 onto main. #7 was merged into feat/openclaw-2026.6-compat about a minute after #6 had merged that branch into main, so the fix never reached main — this is a clean cherry-pick of the same commit (verified: 233 tests pass on top of current main).

Original summary from #7:

fogclaw_redact returned the full placeholder→original mapping in its content JSON, and fogclaw_preview did the same. That output persists in the session transcript, so the redaction could be trivially reversed by anything reading the transcript.

  • fogclaw_redact now feeds the mapping into RedactionMapStore and returns redacted_text, entities_found, and placeholders only, pointing agents at fogclaw_request_access for user-approved reveals.
  • fogclaw_preview drops the mapping field (dry-run stays side-effect free).
  • Round-trip regression test: redact → request_access → resolve approve reveals the original through the backlog; tool output never contains it.

After merging, the stale feat/openclaw-2026.6-compat and fix/redact-mapping-exposure remote branches can be deleted.

Test plan

  • Cherry-pick applies cleanly on main
  • 233 tests pass, tsc --noEmit clean

fogclaw_redact returned the full placeholder-to-original mapping in its
content JSON, and fogclaw_preview did the same. The mapping persists in
the session transcript, partially defeating redaction for those paths.
fogclaw_redact now feeds the mapping into RedactionMapStore and returns
only the placeholder list; originals are recoverable solely through the
access-request backlog (fogclaw_request_access -> user approval).
Adds a round-trip regression test: redact -> request_access -> approve
reveals the original, while the tool output never contains it.
@sidmohan0 sidmohan0 merged commit d31ea3e into main Jul 2, 2026
2 checks passed
@sidmohan0 sidmohan0 deleted the fix/redact-mapping-exposure-main branch July 2, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant