+ +++deployment/cloud-run/model_utils.py (2)
+ +* `validate_text_input` (346-360) +* `predict_emotions` (207-261) + +++src/models/summarization/t5_summarizer.py (2)
+ +* `create_t5_summarizer` (360-390) +* `generate_summary` (194-268) + +++src/models/voice_processing/whisper_transcriber.py (2)
+ +* `create_whisper_transcriber` (443-461) +* `transcribe` (222-305) + +++deployment/cloud-run/rate_limiter.py (1)
+ +* `rate_limit` (44-61) + +++ +src/unified_ai_api.py (1)
+ +* `normalize_emotion_results` (70-120) + +
+ +++ +deployment/cloud-run/secure_api_server.py (9)
+ +* `get` (360-381) +* `get` (495-506) +* `get` (516-525) +* `get` (534-548) +* `post` (394-430) +* `post` (443-488) +* `post` (732-784) +* `post` (809-875) +* `post` (912-996) + +
+ +++deployment/cloud-run/secure_api_server.py (1)
+ +* `load_model` (275-281) + +++ +deployment/cloud-run/test_complete_api.py (1)
+ +* `main` (71-309) + +
+ +++scripts/pre-download-models.py (1)
+ +`1-1`: **No changes needed: script already has executable bit (mode 100755), so the shebang is appropriate.** + +++ +deployment/cloud-run/secure_api_server.py (1)
+ +`221-223`: **Good: enforce presence of ADMIN_API_KEY** + +Strict env requirement prevents insecure defaults in prod. LGTM. + +
z)ixE76FZe#eMTA9%L_8rcJji_oJkq~O%?Lpwg4QNSg+CJE
z4JWQ1);gC)dyRT@0@`tSWV1|f@J}SZFVdMIJhzW$M%6VGxeWXU5rgsvdJVxParwxO
z7!8PjT*}@IL!$3!Jh%!u2#bFmS-W
rMh
z)~ec&0ErC&6VnMH@qiE@rfRAf_yxpZtPk+O6A}{0(h$7xf`syf7*G7p&C=P@C+EBK
zeeZXd_pPW&`52j?v5
zsXs-B?gBx;%E8Ax4d7a+-Cdp5DtRYc@lI&|NcCJ5HbhqT5$rv;Qe^kkZl|MWfjx)G
zu%8Prh9}^nbu0X#2)FQ=wmk!zY#V=EY_si$L{&^JJ4ywX%Cac!+?6Zl^2LPZ?!7
zolBK!+h@Bj{+p*M{65;jwJXsX_`;fO|5}E>@O~`zXcG=Us^5bfT``E^-LB{B6STKk
zLIOv$5WI>nYY})2m$j&Wj;F_|Ma)C+5?;qIHSNR*g~tiwgh|2#M_DnJOVm1vGEWo6
z2s89f(oJ)3|M=mxb~i%;k9DWuTkDf
p#ks^Z
zE=^45(!~s}KSRvqG9jRV06VitYUIIm_8bMk4f7;U@j9M!&%CW$=LOGFJ?F)-=*}En
z&s&6C-g?6}N#iJZ&OHza1`50m?7V#t@Qz6eD=GB0Gt1BUh@5v~af;wv>c!=0x>T%l
z3HHu>6ouLStOe+U&*!s*ReZLvns?*r!P6^Pg;gGXTfpZCY@40W9W-!jc$W7KGTd6h
z!{;5t2>>A3aqep;F?D^x12>Oq(Pq)A-m9&fHyjPh0?)PzCl$7(TNIIjy0(f@>Dp+I
z%Ipk>6qVT%mKD|9+@*wL(O{$qs#G+7pBi;hmke<(;|_Ey3!Mg_)2?qd;Xq^g>BWFI
z^Om`W=$g~?5)Y>?zu?b8)itSk(rRVlyl})+UEinqq2tBu9*ORwPcu=kQlKlbVY*K9
z);{`Uz}r5dmmVg$Ij0%k-Um7v-F6~_q=`l{QqqnCsa7f06*yoPx|^Nh?_+MvpQx_t
z1A&DEm2zFGJCv>HuyAP6E4=f+64<;v-pdl$vfQEMB?;6hmCIdTw#Tdg&taiRT;Kvd
zk*9Sy#m(9lW%+v78Qjc#bi`eZZr6Iyr|vZ
qa=Mrsyb&*p8<60?FFR(J@_ks
z6CA<~PM2Pjy`FX)a^|IIQfokq3o0$m%1%cz@5OQF2#l+j3f>zs4$}?km3|N|EK๐ Review details
-
-**Configuration used**: CodeRabbit UI
-
-**Review profile**: CHILL
-
-**Plan**: Pro
-
-๐ฅ Commits
-
-Reviewing files that changed from the base of the PR and between c1d345a52c2817d9e32efd123ebd648214edf50e and 95834d1f3be61beb6b42ac0578931ef2647d1391.
-
-๐ Files selected for processing (15)
-
-* `deployment/cloud-run/COMPLETE_API_README.md` (1 hunks)
-* `deployment/cloud-run/debug_errorhandler_detailed.py` (1 hunks)
-* `deployment/cloud-run/deploy_secure.sh` (6 hunks)
-* `deployment/cloud-run/minimal_test.py` (1 hunks)
-* `deployment/cloud-run/secure_api_server.py` (5 hunks)
-* `deployment/cloud-run/test_complete_api.py` (1 hunks)
-* `deployment/cloud-run/test_direct_errorhandler.py` (1 hunks)
-* `deployment/cloud-run/test_docs_error.py` (1 hunks)
-* `deployment/cloud-run/test_minimal_import.py` (1 hunks)
-* `deployment/cloud-run/test_routing_fixed.py` (1 hunks)
-* `deployment/cloud-run/test_server_start.py` (1 hunks)
-* `deployment/cloud-run/test_swagger_debug_detailed.py` (1 hunks)
-* `deployment/cloud-run/test_swagger_no_model.py` (1 hunks)
-* `scripts/pre-download-models.py` (1 hunks)
-* `src/models/summarization/t5_summarizer.py` (2 hunks)
-
-๐ง Files skipped from review as they are similar to previous changes (1)
-
-* src/models/summarization/t5_summarizer.py
-
-๐งฐ Additional context used
-
-๐งฌ Code graph analysis (3)
-
-deployment/cloud-run/secure_api_server.py (5)
-
-
deployment/cloud-run/model_utils.py (2)
-
-* `validate_text_input` (346-360)
-* `predict_emotions` (207-261)
-
-src/models/summarization/t5_summarizer.py (2)
-
-* `create_t5_summarizer` (360-390)
-* `generate_summary` (194-268)
-
-src/models/voice_processing/whisper_transcriber.py (2)
-
-* `create_whisper_transcriber` (443-461)
-* `transcribe` (222-305)
-
-deployment/cloud-run/rate_limiter.py (1)
-
-* `rate_limit` (44-61)
-
-src/unified_ai_api.py (1)
-
-* `normalize_emotion_results` (70-120)
-
-deployment/cloud-run/test_complete_api.py (1)
-
-
deployment/cloud-run/secure_api_server.py (9)
-
-* `get` (360-381)
-* `get` (495-506)
-* `get` (516-525)
-* `get` (534-548)
-* `post` (394-430)
-* `post` (443-488)
-* `post` (732-784)
-* `post` (809-875)
-* `post` (912-996)
-
-scripts/pre-download-models.py (2)
-
-
deployment/cloud-run/secure_api_server.py (1)
-
-* `load_model` (275-281)
-
-deployment/cloud-run/test_complete_api.py (1)
-
-* `main` (71-309)
-
-๐ช Ruff (0.12.2)
-
-deployment/cloud-run/secure_api_server.py
-
-37-37: Undefined name `import_logger`
-
-(F821)
-
----
-
-44-44: Undefined name `import_logger`
-
-(F821)
-
----
-
-54-54: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-55-55: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-86-86: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-87-87: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-96-96: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-97-97: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-111-111: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-120-120: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-121-121: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-130-130: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-131-131: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-636-636: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-637-637: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-639-639: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-640-640: Use explicit conversion flag
-
-Replace with conversion flag
-
-(RUF010)
-
----
-
-701-701: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-702-702: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-704-704: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-709-709: Use explicit conversion flag
-
-Replace with conversion flag
-
-(RUF010)
-
----
-
-778-778: Consider moving this statement to an `else` block
-
-(TRY300)
-
----
-
-780-780: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-781-781: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-783-783: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-784-784: Use explicit conversion flag
-
-Replace with conversion flag
-
-(RUF010)
-
----
-
-873-873: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-874-874: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-951-951: Undefined name `normalize_emotion_results`
-
-(F821)
-
----
-
-952-952: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-982-982: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-1015-1015: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
----
-
-1015-1015: Use explicit conversion flag
-
-Replace with conversion flag
-
-(RUF010)
-
----
-
-1024-1024: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-1025-1025: Use `logging.exception` instead of `logging.error`
-
-Replace with `exception`
-
-(TRY400)
-
-deployment/cloud-run/test_complete_api.py
-
-1-1: Shebang is present but file is not executable
-
-(EXE001)
-
----
-
-40-40: Probable use of `requests` call without timeout
-
-(S113)
-
----
-
-42-42: Probable use of `requests` call without timeout
-
-(S113)
-
----
-
-56-56: Consider moving this statement to an `else` block
-
-(TRY300)
-
----
-
-57-57: Do not use bare `except`
-
-(E722)
-
----
-
-65-65: Do not catch blind exception: `Exception`
-
-(BLE001)
-
-scripts/pre-download-models.py
-
-1-1: Shebang is present but file is not executable
-
-(EXE001)
-
----
-
-27-27: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-46-46: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-64-64: Do not catch blind exception: `Exception`
-
-(BLE001)
-
----
-
-104-104: f-string without any placeholders
-
-Remove extraneous `f` prefix
-
-(F541)
-
----
-
-119-119: Do not use bare `except`
-
-(E722)
-
-๐ช GitHub Check: CodeQL
-
-deployment/cloud-run/secure_api_server.py
-
-[warning] 640-640: Information exposure through an exception
-[Stack trace information](1) flows to this location and may be exposed to an external user.
-
----
-
-[failure] 674-674: Uncontrolled data used in path expression
-This path depends on a [user-provided value](1).
-
----
-
-[warning] 709-709: Information exposure through an exception
-[Stack trace information](1) flows to this location and may be exposed to an external user.
-
----
-
-[failure] 842-842: Uncontrolled data used in path expression
-This path depends on a [user-provided value](1).
-
----
-
-[failure] 933-933: Uncontrolled data used in path expression
-This path depends on a [user-provided value](1).
-
-deployment/cloud-run/test_complete_api.py
-
-[failure] 76-76: Clear-text logging of sensitive information
-This expression logs [sensitive data (password)](1) as clear text.
-
-๐ช markdownlint-cli2 (0.17.2)
-
-deployment/cloud-run/COMPLETE_API_README.md
-
-15-15: Fenced code blocks should have a language specified
-
-(MD040, fenced-code-language)
-
----
-
-21-21: Fenced code blocks should have a language specified
-
-(MD040, fenced-code-language)
-
----
-
-256-256: Emphasis used instead of a heading
-
-(MD036, no-emphasis-as-heading)
-
-๐ช Gitleaks (8.27.2)
-
-scripts/pre-download-models.py
-
-[high] 36-36: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
-
-(generic-api-key)
-
-๐ Additional comments (2)
-
-
scripts/pre-download-models.py (1)
-
-`1-1`: **No changes needed: script already has executable bit (mode 100755), so the shebang is appropriate.**
-
-
deployment/cloud-run/secure_api_server.py (1)
-
-`221-223`: **Good: enforce presence of ADMIN_API_KEY**
-
-Strict env requirement prevents insecure defaults in prod. LGTM.
-
-