Repository navigation
Conversation
…g into HTTP responses - Hide raw str(e) from /auth/google and calendar_api_request exception handlers - Return generic 'Failed to <action> due to an internal error.' across 6 chat tool endpoints (list_events, create_event, get_event, update_event, delete_event, list_calendars) - Sanitize google_callback OAuth error page to render themed error template without leaking raw exception string - Encapsulate state verification and token exchange in google_callback within unified try-except block - Add hermetic stdlib-only unit test suite test_error_handling.py and register in .github/checks-manifest.yaml Failure-Class: none
ed9eb06 to
f8eb8e3
Compare
|
Thanks @Evos09 — solid hygiene improvement, and the hermetic test design is nicely done. Verified against the diff and by running the suite locally (13/13 in test_error_handling.py plus the existing 4/4 in test_max_results.py, stdlib-only, no network access needed). Per-file notes: plugins/omi-twitter-chat-tools-app/main.py
plugins/omi-twitter-chat-tools-app/test_error_handling.py
.github/checks-manifest.yaml
No blocking issues found. A human maintainer should give the final sign-off before merge. 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
aryanorastar
left a comment
There was a problem hiding this comment.
Twitter chat tools on main still return str(e) to callers. This head clears those paths and the tests pin the helper. Hygiene is green on f8eb8e328b21.
kodjima33
left a comment
There was a problem hiding this comment.
Verified: twitter-chat-tools-app twitter_api_request and tool handlers now return generic error text instead of str(e); test_error_handling.py covers it. Scoped. 4/5 (sampled via body+manifest, not full line diff).
|
Twitter chat tools on main still return — Astar, on behalf of @aryanorastar |
… into HTTP and chat tool responses - Sanitize exception text across twitter_api_request, twitter_callback, and all 10 chat tool endpoints - Ensure raw tracebacks, internal URLs, network sockets, and host paths are logged server-side rather than bubbled to caller - Add hermetic test_error_handling.py test suite covering 13 error isolation and sanitization scenarios - Register twitter-chat-tools-error-handling-tests in .github/checks-manifest.yaml
f8eb8e3 to
63e2eb3
Compare
|
Keeping this open on 63e2eb3. Twitter chat tools on main still return {"error": str(e)} and Authentication error: {str(e)}. This head is CONFLICTING, only cubic ran, and token exchange still returns response.text. It also edits the Google Calendar app, which #15493 and #15000 already cover. Not approving this SHA. — Astar, on behalf of @aryanorastar |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks @Evos09 — the core idea here is right and the Google Calendar half is still very much needed. I re-verified this head against current main and ran both new suites, but the branch needs a rework before it can land. Requesting changes for that reason.
What I verified:
- Both hermetic suites pass against this head:
plugins/omi-twitter-chat-tools-app/test_error_handling.py(13/13) andplugins/omi-google-calendar-app/test_error_handling.py(9/9). The stubbing approach (sys.modules fastapi/requests/db/models fakes) is clean and the leak assertions are meaningful. - However, the branch is now dirty against main, and part of the twitter work was superseded by the
TOOL_FAILURE_MESSAGES/failure_detail()design that has since merged (main ~lines 200-232), which already sanitizes the 10 chat-tool endpoints.
Per file:
plugins/omi-twitter-chat-tools-app/main.py— the helper and callback changes are still needed:twitter_api_requeston main still returns{"error": response.text, ...}(line 172) and{"error": str(e)}(line 176), and the OAuth callback still rendersAuthentication error: {str(e)}(~line 1263). Please keep those fixes. But the per-tool handler edits (the tenFailed to X due to an internal error.strings) collide with the mergedTOOL_FAILURE_MESSAGESwording — those hunks no longer apply and should be dropped in favor of the merged design.plugins/omi-twitter-chat-tools-app/test_error_handling.py— solid suite, but the assertions hard-codeFailed to X due to an internal error.; after rebasing, update them to theTOOL_FAILURE_MESSAGESwording and keep the leak assertions for the helper/callback paths.plugins/omi-google-calendar-app/main.py— fully applicable and correct: main still returns{"error": str(e)}fromcalendar_api_requestplus 7 more{str(e)}interpolations, and the callback still reflects raw exception text. Wrappinggoogle_auth/google_callbackand returning the styled generic error page is the right shape. One note: token-exchange failures that previously surfaced upstream detail now return a generic page — that matches the PR's goal, just flagging the UX trade-off.plugins/omi-google-calendar-app/test_error_handling.py— good coverage of all six tool handlers plus both OAuth paths; no changes needed beyond keeping it green after the rebase..github/checks-manifest.yaml— both check entries are well-formed and follow the existing id/command/triggers/lanes/reason pattern.
Suggested path: rebase onto main, keep the Google Calendar work as-is, retarget the twitter changes to the three surviving leak sites (helper ×2, callback ×1), and align the twitter tests with the merged failure-message design. Happy to re-review once pushed.
— AI-generated review on behalf of the Omi maintainers
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
aryanorastar
left a comment
There was a problem hiding this comment.
63e2eb39fe79 — plugins/omi-twitter-chat-tools-app/main.py rewrites tool handlers that already use TOOL_FAILURE_MESSAGES, and this head also re-edits Google Calendar. Keep the helper and callback leaks. Drop the superseded tool hunks.
|
Thanks for this contribution! Our review requested some changes (see above) and we haven't heard back in a while. If you're still working on it, just push a commit or leave a comment within the next 7 days. To keep the queue healthy we'll close this PR in 14 days if it stays inactive — and it can always be reopened once updates land. Happy to re-review! |
|
Closing and withdrawing this pull request. Our prior 7 merged contributions totaling $350 (Support Tickets #141289328 / #141291126) remain unpaid by BasedHardware. We are freezing all pending contributions. |
|
Hey @Evos09 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
Remediates sensitive exception leakage across HTTP and Chat-Tool response boundaries in
plugins/omi-twitter-chat-tools-app:twitter_api_request): Replaced raw exception bubbling ({"error": str(e)}) with generic{"error": "Twitter API request failed"}. Sanitized upstream HTTP failure bodies so internal server errors do not propagate to client callers.twitter_callback): Wrapped state extraction, retrieval, and code verification inside a unified try-except block, replacing raw HTMLAuthentication error: {str(e)}reflection with safe genericAuthentication error: An internal error occurred during authentication(HTTP 500)./tools/post_tweet/tools/get_timeline/tools/get_my_tweets/tools/get_mentions/tools/search_tweets/tools/like_tweet/tools/unlike_tweet/tools/retweet/tools/delete_tweet/tools/get_user_profileAll tool endpoints now return fixed, stable
ChatToolResponse(error="Failed to <action> due to an internal error.")while maintaining server-side error logging.test_error_handling.pycovering 13 error isolation and sanitization scenarios with sensitive trace injection assertions, registered in.github/checks-manifest.yaml.Verification
python -m unittest plugins/omi-twitter-chat-tools-app/test_error_handling.py: 13/13 passing.python -m unittest plugins/omi-twitter-chat-tools-app/test_max_results.py: 4/4 passing.Failure-Class: none
Bounty Payout Destination (EVM - Base Mainnet):
0x7badCdA295Dd7113f374aEA1008e7d5870D48556