Skip to content

fix(api): remove duplicate router registrations#260

Open
HemantDhaker12 wants to merge 1 commit into
sahoo-tech:mainfrom
HemantDhaker12:fix/248-duplicate-router-registration
Open

fix(api): remove duplicate router registrations#260
HemantDhaker12 wants to merge 1 commit into
sahoo-tech:mainfrom
HemantDhaker12:fix/248-duplicate-router-registration

Conversation

@HemantDhaker12
Copy link
Copy Markdown

Related Issue

Closes #248


Summary of Changes

Removed duplicate router registrations for actions.router and context.router in api/main.py.

This fixes duplicate runtime route entries that were confirmed through runtime inspection of app.routes.


Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

How Was This Tested?

Runtime verification

Verified route registrations before and after the fix using:

python debug_root.py

Confirmed:

  • duplicate /api/v1/actions routes were removed
  • duplicate /api/v1/context routes were removed

Application startup verification

python main.py

Verified:

  • backend starts successfully
  • Swagger docs load correctly at /docs

Test environment:

  • OS: Windows 11
  • Python version: 3.12
  • Node version: N/A

📸 Screenshots / Recordings (if applicable)

N/A


Pre-Submission Checklist

  • My branch is up to date with upstream/main
  • My PR title follows the Conventional Commits format
  • I have not committed any .env files, secrets, or model weights
  • This PR addresses only the scope of the linked issue

Notes

Repository-wide mypy and bandit pre-commit checks currently report existing unrelated issues outside the scope of this PR.


Additional Notes for Reviewer

Swagger UI did not visibly expose the duplication, but runtime inspection of app.routes confirmed duplicate route registrations before the fix.

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.

[BUG] Duplicate runtime route registration in api/main.py

1 participant