getappmap / getappmap/appmap-ruby
`normalized_path` may be wrong if the path matches many potential routes
Open
Nobody has claimed this yet.
bug
- Dominant language
- Ruby
- Stars
- 101
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
E.g. given the following routes.rb:
get 'api/users'
get ':team_slug/users'
It appears possible for a call to /api/users to return a normalized path of /:team_slug/users incorrectly when the path matches the route definition.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/appmap/handler/rails/request_handler.rb at lines 59-66 and reproduce the routes shown in routes.rb with a request to /api/users. Compare the normalized path against the route that actually matched. Done means the specific route remains the normalized result even when another dynamic route could also match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100