Skip to content

[P2] Ignore route-looking text in comments and string literals #178

Open

Description

@Sandesh13fr

Verified in current Development source (audit base 852b98e; merged #161 affects only CLI scan Markdown).

Problem

Route detection applies regexes directly to full source text. A commented-out app.get('/retired', ...) or string containing that text is emitted as an active Express route; decorator examples in Python strings/comments have the same problem.

Evidence

Source: packages/repo-map/src/symbols/detectFrameworkRoutes.ts

Reproduction: Create a selected source file containing commented-out routes and a real route, then inspect route output.

Acceptance criteria

Detect executable route declarations while excluding comments and inert strings. Add regressions for Express and decorator-based routes. This is distinct from #139's Next.js route normalization.

Request assignment before opening a focused PR against Development.

Activity

  1. kspraveen-07 commented on Oct 6, 2026

    @kspraveen-07
    Contributor

    Hi @Sandesh13fr, I'd like to work on this issue as part of Open Source Connect India 2026.

    I can work on updating the route detection logic to ignore commented-out routes and route-looking text inside string literals, along with adding the required regression tests.

    Could you please assign this issue to me?

  2. Sandesh13fr commented on Oct 6, 2026

    @Sandesh13fr
    OwnerAuthor

    Assigned based on your proposed approach. Please keep each fix focused on its assigned issue and include regression tests. Submit these sequentially: only one open PR per account at a time, and reference the assigned issue with Fixes #<issue-number>.

  3. kspraveen-07 commented on Oct 19, 2026

    @kspraveen-07
    Contributor

    Hi! I've opened PR #217 to address this issue: #217

    The fix ignores route-looking text inside comments and string literals during route detection. I've also added regression tests for Express and Python route detection.

    Validation: All 78 tests passed across 8 test files.

    Thank you!

  4. kspraveen-07 commented on Oct 29, 2026

    @kspraveen-07
    Contributor

    Hi @Sandesh13fr, I investigated the failing CI checks. The two failures in apps/cli/tests/catalogCommand.test.ts are reproducible on the upstream Development branch after building the workspace. Both fail because catalogs/models.json is 102 days old, exceeding the 90-day freshness limit. My PR only changes route detection and does not modify the CLI or catalog files. Could you confirm whether this baseline issue should be addressed separately?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OSCI'26bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions