Repository navigation
Embedding privacy: measure the orphan-run width on the base64 tail only (#394) - #741
Closed
100yenadmin wants to merge 1 commit into
Closed
100yenadmin wants to merge 1 commit into
100yenadmin wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 17, 2026
Member
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.
Refs #394. Also carries the #389 mutation pins. The wider
api_keynames of #491 are not in this PR (see the note on #491).What was wrong. On the cloud-embedding privacy path, the marker-independent orphan-run check in
ingest_protection.py(_has_orphan_full_width_base64_run) applied its 40-character "full PEM width" test to a prefixed line's whole width (prefix words plus the final token). Two adjacent prose lines ending in a 16–17 character code, or a short numbered list, were refused as a private-key body. A refused document makes the embed backfill stop withprivacy_refusedon every run (#394).What changed. For lines classified as prefixed base64, the width test now measures the final base64 token only. Unprefixed lines and every other backstop are unchanged. A numbered list of 40+ character base64-charset tokens still blocks: this fail-closed boundary is documented in the docstring and pinned by a test. Also adds two mutation-pin tests for the pure-hex exclusion in the placeholder-proximity check (carried over from #389).
Consumers.
_embedding_privacy_residual_patternsis the only caller. Through it,protect_embedding_textandvalidate_embedding_privacy_dispatchare affected (warmup, summary/chunk backfill,lcm_grep/lcm_recallquery embedding). The only effect is fewer false refusals. The durable store is not touched.Tests.
tests/test_issue_394_orphan_run_tail_width.py: the prose and short-list shapes fail before and pass after. Prefixed and unprefixed key-body controls still block, the long-token list boundary still blocks, and there are hex-exclusion mutation pins. The existing #383/#391 regression tests intests/test_embedding_privacy.pyare unchanged and green.Risk. Low. The only coverage removed is a prefixed body line whose base64 token is 16–39 characters wide.
Changelog line (add at release):
Fix: cloud-embedding privacy no longer refuses ordinary prose or short numbered lists whose last word is a long code; the orphan base64-run check now measures the token, not the line prefix (#394).Review. Claude cross-model review of this codex-authored change: PASS 94, no merge-blocking findings. Follow-up: the width column of
bench/tools/v1m-rebank/refused_line_model.pypredates this fix (bench edits were out of scope).Prepared by the triage lane for the release lane; draft, not for merge until the release lane reviews it.