Skip to content

docs: fix stale endpoint references left over from the /agent split - #96

Merged
Yad4o merged 1 commit into
mainfrom
docs/fix-stale-endpoint-references
Aug 11, 2026
Merged

Yad4o merged 1 commit into
mainfrom
docs/fix-stale-endpoint-references

Conversation

@Yad4o

@Yad4o Yad4o commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

What

Final cleanup pass after #93 / #94 / #95 - fixes leftover references to the pre-split ticket-action paths.

How

  • README.md's endpoint reference table still listed /tickets/{id}/assign and /tickets/{id}/close (pre-refactor: split agent-only ticket actions into their own router #94 paths), and never listed /resolve, /agent/tickets/{id}/accept, or /agent/my-assignments at all. Rebuilt it into three sections - Public, Ticket, Agent - matching the actual current routes.
  • While rebuilding that table, noticed the auth column for POST/GET /tickets said "Required" (checkmark) - that's been wrong since ticket creation/listing got optional auth (oauth2_scheme_optional in tickets.py). Fixed to "Optional".
  • app/api/admin.py had a docstring comparing itself to "the agent self-assign endpoint (POST /tickets/{id}/assign)" - updated to the current /agent/tickets/{id}/assign.

Testing

Full suite: 667 passed, 0 failed. No behavior changes - docs and a docstring only.

Notes for reviewer

Not urgent, but the README table being wrong undercuts the whole point of #93/#94 (making things easy to find/integrate), so didn't want to leave it stale.

Summary by CodeRabbit

  • Documentation
    • Added documentation for the public POST /resolve endpoint, which answers and classifies messages without creating tickets.
    • Clarified authentication requirements for ticket creation, listing, and retrieval.
    • Documented agent assignment, self-assignment, acceptance, and closure endpoints.
    • Updated assignment endpoint references to use the dedicated agent route.

Final cleanup sweep after PRs #93/#94/#95.

- README.md endpoint reference table still listed the pre-split paths
  (/tickets/{id}/assign, /tickets/{id}/close) and was missing /resolve
  and the accept/my-assignments rows entirely. Rebuilt the table into
  three sections (Public, Tickets, Agent) matching the current routes,
  and corrected the auth column for POST/GET /tickets — auth there has
  always been optional (see oauth2_scheme_optional in tickets.py), the
  table just never reflected that.
- app/api/admin.py docstring referenced the old agent self-assign path
  in a comment; updated to /agent/tickets/{id}/assign.

Nothing behavioral changed. Full suite: 667 passed, 0 failed.
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The API documentation adds POST /resolve, updates ticket authentication requirements, documents dedicated agent operations, and corrects the admin self-assignment route reference.

Changes

API documentation

Layer / File(s) Summary
Route documentation updates
README.md, app/api/admin.py
The README documents POST /resolve, optional authentication for ticket creation and listing, required authentication for ticket retrieval, and dedicated agent assignment, acceptance, and closure routes. The admin documentation uses /agent/tickets/{id}/assign.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • Yad4o/SRS#57: Documents the agent assignment and closure endpoints referenced by this PR.
  • Yad4o/SRS#91: Updates ticket-assignment API documentation in app/api/admin.py.
  • Yad4o/SRS#93: Introduces the public POST /resolve endpoint documented by this PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the documentation changes that fix stale endpoint references from the /agent split.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fix-stale-endpoint-references

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.

@Yad4o
Yad4o merged commit c2fbec8 into main Aug 11, 2026
1 of 2 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 561: Update the GET /tickets README description to accurately document
visibility for anonymous callers, regular authenticated users, Agents, and
Admins, reflecting the behavior implemented in the tickets endpoint.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7474936f-ae49-4d00-af3b-98c6d2e11d5e

📥 Commits

Reviewing files that changed from the base of the PR and between 17117a4 and 6717d0a.

📒 Files selected for processing (2)
  • README.md
  • app/api/admin.py

Comment thread README.md
| `POST` | `/tickets` | Create new support ticket | ✅ |
| `GET` | `/tickets` | List user tickets | ✅ |
| `POST` | `/tickets` | Create new support ticket | Optional |
| `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Document the Agent/Admin listing behavior.

Line 561 says authenticated callers receive only their own tickets. In app/api/tickets.py:133-208, Agent and Admin callers receive all tickets. Update the description to cover anonymous, regular-user, Agent, and Admin behavior.

Proposed wording
-| `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional |
+| `GET` | `/tickets` | List visible tickets: empty for anonymous callers, own tickets for regular users, all tickets for Agents/Admins | Optional |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| `GET` | `/tickets` | List tickets (own tickets if authenticated) | Optional |
| `GET` | `/tickets` | List visible tickets: empty for anonymous callers, own tickets for regular users, all tickets for Agents/Admins | Optional |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 561, Update the GET /tickets README description to
accurately document visibility for anonymous callers, regular authenticated
users, Agents, and Admins, reflecting the behavior implemented in the tickets
endpoint.

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