Repository navigation
Conversation
A user can configure `redaction.custom_redactions` or `.entire/redactors/` packs and end up with zero rules in the detection pipeline: every inline pattern fails to compile or can match the empty string, every pack rule is rejected, or every pack file fails to load. The setting still says the protection is on, so the user believes their own rules are filtering content that nothing filters. Built-in detection keeps running, so the gap is easy to miss. Report the gap and fail closed at the push boundary: - `redact.CustomRulesStatus` reports the configured count beside the active count, and `redact.Counts.CustomRulesConfigured` persists the configured count so a checkpoint written while the rules were inert stays identifiable after they are fixed. - `strategy.EnsureRedactionConfigured` records the inert state as an `*InactiveCustomRulesError` and warns (log `component=redaction`, plus a stderr breadcrumb on an interactive run). A configuration with at least one active rule is not inert and never gates a push. - Every checkpoint-push path (`strategy.PushCheckpoints`, `strategy.PushQueuedCheckpointRefs`, and the git-refs and git-branch pre-push flushes) withholds delivery and leaves the refs queued. The user's own `git push` is never blocked. - `entire checkpoint explain` shows `custom 0 (N rules configured, none active)` for checkpoints written while the rules were inert. The write path stays fail-open: the transcript is still written, because the built-in detectors keep protecting the content and a broken rule must not cost a user their session. Only delivery of what the user's own rules were meant to filter fails closed. Co-Authored-By: Claude <noreply@anthropic.com> Entire-Checkpoint: 01M8KXY400GA0HZZ8SF697VNVF
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.
A user can configure
redaction.custom_redactionsor.entire/redactors/packs and end up with zero rules in the detection pipeline: every inline pattern fails to compile or can match the empty string, every pack rule is rejected, or every pack file fails to load. The setting still says the protection is on, so the user believes their own rules are filtering content that nothing filters. Built-in detection keeps running, so the gap is easy to miss.Report the gap and fail closed at the push boundary:
redact.CustomRulesStatusreports the configured count beside the active count, andredact.Counts.CustomRulesConfiguredpersists the configured count so a checkpoint written while the rules were inert stays identifiable after they are fixed.strategy.EnsureRedactionConfiguredrecords the inert state as an*InactiveCustomRulesErrorand warns (logcomponent=redaction, plus a stderr breadcrumb on an interactive run). A configuration with at least one active rule is not inert and never gates a push.strategy.PushCheckpoints,strategy.PushQueuedCheckpointRefs, and the git-refs and git-branch pre-push flushes) withholds delivery and leaves the refs queued. The user's owngit pushis never blocked.entire checkpoint explainshowscustom 0 (N rules configured, none active)for checkpoints written while the rules were inert.The write path stays fail-open: the transcript is still written, because the built-in detectors keep protecting the content and a broken rule must not cost a user their session. Only delivery of what the user's own rules were meant to filter fails closed.
Entire-Checkpoint: 01M8KXY400GA0HZZ8SF697VNVF