Skip to content

refactor(ingest): annotate the content and PEM-model helpers (annotations only) - #1376

Merged
1 commit merged into
mainfrom
refactor/ingest-typing
Oct 17, 2026
Merged

1 commit merged into
mainfrom
refactor/ingest-typing

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

Structure only: no behaviour change, and no pattern, rule, table, order or message change. This is step T (annotations only) of splitting ingest_protection.py (3,548 lines) into focused modules behind a facade that keeps every current import and monkeypatch target working. The plan is 6 moves; moves 3–6 wait on open PRs #732, #739, #741 and #770, which touch those clusters.

Proof for this step (local, Python 3.14): full suite 13,093 passed, 0 failed, including tests/test_ingest_protection.py and tests/test_embedding_privacy.py (229 passed); ruff clean. An AST comparison with annotations stripped shows every function body and signature unchanged against 9f74d1d. The annotations are the ones moves 1 and 2 need so the new modules pass mypy --strict without relaxing config.

Refs #1271

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 345794a5-f135-4cb7-ad9e-99a6a1cbec32
📥 Commits

Reviewing files that changed from the base of the PR and between cc11de5 and 9d66495.

📒 Files selected for processing: 1
  • ingest_protection.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

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

@100yenadmin
100yenadmin marked this pull request as ready for review October 17, 2026 03:51
@100yenadmin

Copy link
Copy Markdown
Member Author

Independent review of the whole stack (#1376 → #1377 → #1378), by a different model from the one that wrote it. All six probes SAFE:

  1. Verbatim: every moved definition (45 content symbols, 28 PEM-model symbols) matches its parent in source text and AST.
  2. Patch interception: every name tests patch on ingest_protection (_NON_TOOL_EXTERNALIZATION_FLOOR_CHARS, _SENSITIVE_REGEX_CATALOG, _non_tool_text_over_floor, _regex_engine, _regex_pattern_for, count_tokens, externalize_ingest_payload, protect_embedding_text, validate_embedding_privacy_dispatch) is still looked up through the facade by every caller. No caller moved.
  3. Annotations: they are postponed (from __future__ import annotations). The annotations PR is AST-identical to main once annotations and the two typing imports are stripped.
  4. Import surface: dir(ingest_protection) at main is a subset of the final one, and every import site in the repo resolves, including scripts and bench.
  5. Identity and state: the logger name is unchanged and no moved function logs. Caches and warn-once flags stay in the facade. Only the defining module of moved helpers changes, and nothing in the repo keys on it.
  6. Run: the two ingest test files pass (229 passed, 1 skipped), and the differential against the parent commit is identical.

Merge order: #1376, then #1377, then #1378 (stacked).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T03:55:16.101184Z 9d66495 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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