Skip to content

fix(github-app): coerce inputs and propagate API errors (#13911) - #14080

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
t3ratech:fix/github-app-coerce-13911
Sep 15, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
t3ratech:fix/github-app-coerce-13911

Conversation

@t3ratech

@t3ratech t3ratech commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #13911

Summary

  • coerce_issue_number accepts 42/"42"/"#42" and rejects None/"abc"/4.5/0/negatives cleanly
  • coerce_limit maps null → default, clamps to 50 (backend sends JSON null for omitted params)
  • API errors propagate with GitHub's message field — no more silent "not found" masking a 500
  • list_issues follows next links (max 5 pages) so PRs sharing the endpoint can't starve the limit

New hermetic test_main.py (24 tests) + github-app-coerce-tests manifest check.

Verification

  • 24/24 OK; existing test_github_client.py 10/10 OK
  • Unpatched: 11 failures + 9 errors across all three defect classes

Review in cubic

…e#13911)

- Add coerce_issue_number/coerce_limit helpers so issue_number values like
  'BasedHardware#42' or ' 42 ' and limit values arriving as JSON null/strings are
  normalized into clean validation errors instead of raising ValueError/
  TypeError inside tool_get_issue, tool_add_comment, and tool_list_issues.
- github_client.list_issues/get_issue now return explicit error structures
  ({'error', 'status'}) instead of collapsing non-200 responses into
  []/None, and handlers propagate them to ChatToolResponse(error=...).
- list_issues fetches per-page headroom and follows next links (bounded)
  so pull requests sharing the issues endpoint cannot starve the
  requested limit.
- test_agent now surfaces get_repo_permissions _error payloads instead of
  masking them as a missing-write-access denial.

Verified: python3 plugins/omi-github-app/test_main.py (24 tests, OK;
20 of 24 fail against the unpatched sources); existing
test_github_client.py still passes; run_checks --check-id
github-app-coerce-tests passes.

Failure-Class: none
@t3ratech

t3ratech commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

/claim #13911 PayPal: [email removed]

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-scoped bug fix: coerces issue-number/limit inputs, propagates GitHub API errors instead of masking as empty, adds pagination cap. Clear root cause, linked issue, 24 hermetic tests, CI clean. Confidence 5/5 — merging.

@kodjima33
kodjima33 merged commit 4fd15ad into BasedHardware:main Sep 15, 2026
1 check passed
@t3ratech

Copy link
Copy Markdown
Contributor Author

This merged before the linked proposal #13911 named an amount — my omission when filing it. @kodjima33 would you honor the standard $50 plugin-fix bounty for this work, or whatever amount you consider right? Payout details are on the /claim comment above.

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.

[Bounty proposal] fix(github-app): coerce issue inputs and propagate API errors

3 participants