feat(tools): harden contact and text measurement contracts - #1573
seonghobae wants to merge 21 commits into
Conversation
`backend/api/tools.py`에 이메일 텍스트에서 이메일과 전화번호를 추출하는 `contact_info_extractor`와 텍스트 가독성 점수를 측정하는 `readability_scorer` 도구를 추가했습니다. 이를 지원하기 위해 `backend/tests/test_tools_api.py`에 최대 글자 수 예외 케이스를 포함한 단위 테스트들을 추가하여 테스트 커버리지 100%를 달성했습니다. CHANGELOG.md에 변경 내역을 업데이트했습니다.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
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: trueThanks 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 |
Current authority — 2026-09-15
develop@042b0c70531b229af3acbd0421a2f23098d848b3feature/data-anonymizer-tool-5829714139815844388@b535366630ae7ccd5aeca741a83cc04fc49a4b67a49cdb8ef754986e4a21a833a3e7a72bb82af323backend/api/tools.py,backend/services/contact_information_extractor.py,backend/services/text_structure_statistics.py,backend/tests/test_text_analysis_services.py,backend/tests/test_text_analyzer_measurement_contract.py,docs/doctoring/contact-information-mailbox-identity.md,docs/doctoring/text-structure-statistics-boundary.mda49cdb8e...is an ordinary two-parent adoption of current #1482b5353666...and preserves the exact prior #1573 tree. Fresh compare is ahead-only with the same seven effective files. No force push, destructive rebase, source/test deletion or semantic rollback was used.Contact-information correctness retained
The extractor remains a pure bounded service over caller-supplied text and is intentionally not exposed as a second product-visible general PII tool. It does not log, persist, index or transmit extracted PII. Purpose limitation, authorization, retention and incomplete international-format coverage remain caller/product boundaries.
1bf449a078580cc6545f862c07a8d68bf968b005→ fixfd629039b1d4a4b36d8ab5cdb1bdbc8e4e787c1b2d6da9a86c4d4a9a231cfd96884482e5d5bd9b1d→ fixf7b9974ba0e267d45dae82e3626f6a33a7e16d21Text-structure measurement retained
The prepared service previously called punctuation runs
sentence_boundary_count, an unsupported construct claim. REDfbc8dd378e50e9e16a2992d9f11ce1d7ccdaf0d1→ fix7e8559b83c08427f76098798edd683a1dd777ad6renamed the measure toterminal_punctuation_run_countand advanced the transparent segmentation contract. It does not claim language-independent words, readability or sentence segmentation.For buyer-visible
text_analyzer, RED6b7396a4660e049b6ec4180167ef92b9a62c4416→ fixfc331fa0665e0c1569c2fb40d6eee57bb3ee9397delegates to the descriptive service, exposes canonical v2 fields and retains oldchar_count,char_count_no_spacesandword_countonly as explicit compatibility aliases. Doctoring records the UAX #29 boundary and removal condition.Owner boundary and evidence
#1247/#1418 own the product-visible auditable contact-data redaction contract. This lane's contact extractor is a bounded internal service and must remain an ACL/consumer dependency, not a parallel public PII authority. Any later integration with #1418 must preserve the mailbox/IDNA correctness evidence above rather than silently replacing it.
All prior local/hosted evidence is predecessor evidence after the ancestry-only restack.
a49cdb8e...needs fresh repository/organization required checks, zero current-head actionable findings/threads and qualifying independent post-last-push approval. Do not self-approve, weaken gates, force-push, destructively rebase or add a dummy commit merely to manufacture queue activity.