fix: stop returning redaction mapping in model-visible tool output#7
Merged
sidmohan0 merged 1 commit intoJul 2, 2026
Merged
Conversation
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.
2 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #6 (touches the same tool registrations).
fogclaw_redactreturned the full placeholder→originalmappingin its content JSON, andfogclaw_previewdid the same. That output persists in the session transcript, so the redaction could be trivially reversed by anything reading the transcript — partially defeating the tool's purpose.fogclaw_redactnow feeds the mapping intoRedactionMapStoreand returnsredacted_text,entities_found, and theplaceholderslist only, with the tool description and output pointing agents atfogclaw_request_accessfor user-approved reveals.fogclaw_previewdrops themappingfield (dry-run stays side-effect free — it does not feed the store).Left as-is, noted in CHANGELOG follow-ups:
fogclaw_scan/fogclaw_previewstill return entity spans with matched text — unlike the mapping, that reveals nothing the caller didn't already supply.Test plan
tsc --noEmitclean