Repository navigation
decorators/query_graph drops one attribute when a method has multiple separate C# attribute brackets (e.g. [HttpPost] + [Route(...)]) #1865
Description
Activity
- addedcypherCypher query language parser/executor bugsCypher query language parser/executor bugsparsing/qualityGraph extraction bugs, false positives, missing edgesGraph extraction bugs, false positives, missing edges
on Aug 28, 2026 - addedbugSomething isn't workingSomething isn't workingpriority/highNeeds near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.Needs near-term maintainer attention; high-impact bug, regression, safety issue, or release blocker.
on Sep 5, 2026 Thank you for the detailed reproduction. Current main's
query_graphschema includesformat: "json"and snapshot continuation throughcursor. That clarifies the current interface, but does not establish which release first included it or prove the original extraction problem solved. The separate-bracket C# attribute fixture remains the relevant regression case.Thank you for the precise two-bracket example and for diffing CBM's output against the source. That's exactly the check that settles it!
Verified on current main: for a method with
[HttpPost]and[Route("orders/{id}/confirm")]in separate brackets,m.decoratorsnow returns both:["HttpPost","Route(\"orders/{id}/confirm\")"]. The fix is 6b23078 (PR #1759, thanks to @Jumaga2015), which scans every attribute group instead of only the first. It shipped in v0.11.0, together withquery_graphformat: "json".One caveat: turning those attributes into
:Routenodes for ASP.NET Core is still missing and tracked in #1692. Could you confirm thedecoratorsresult on v0.11.0? If it matches, we'll close this one.- addedawaiting-reporterWaiting on the reporter for info/repro; stale bot will warn then closeWaiting on the reporter for info/repro; stale bot will warn then close
on Sep 26, 2026 Thanks for the report! To move this forward we need a bit more so we can reproduce it ourselves:
- the
codebase-memory-mcp --versionyou're on - the exact steps or command you ran
- a public repo (or a small dummy snippet) that shows the problem — please don't paste proprietary code
Once that's here we'll pick it straight back up. Heads-up: issues left
awaiting-reporterare automatically closed after a few weeks of silence, but a comment reopens the door anytime.- the
Summary
When a C# method carries two separate attribute brackets on the same declaration — e.g. an HTTP-verb attribute and a
[Route(...)]attribute as distinct[...]groups rather than combined in one bracket — thedecoratorsproperty returned viaquery_graphfor thatMethodnode only contains one of the two attributes. The other is silently dropped.We queried this via:
For methods shaped like the example above,
m.decoratorscame back with only the[HttpPost]entry —[Route("orders/{id}/confirm")]was missing — even though the source file on disk clearly has both attributes present. We confirmed this by diffing CBM's output against the raw source for the same file/method.Impact
We index several ASP.NET Core / ABP-style .NET monoliths where this two-bracket style (verb attribute + route attribute as separate lines) is the dominant convention. Because of this, CBM's built-in
:Routenode ends up populated for only a small fraction of the routes we'd expect across our indexed repos (on the order of a handful out of tens of thousands of methods with HTTP attributes). We ended up writing a separate regex-based fallback to reconstruct API routes (merging class-level[Route]with method-level[HttpGet]/[HttpPost]) rather than relying on CBM's own decorator/route extraction, since the built-in extraction wasn't usable for this.Version
Pinned to v0.8.1. We're stuck on this version for an unrelated reason (a separate regression where
query_graph's output changed to a human-readable text table with no JSON path in later releases we tried), so we haven't been able to confirm whether this specific decorator-dropping issue still reproduces onmain/ the latest release. Flagging it here in case it's still present.Expected behavior
m.decorators(or whatever the AST layer collects for a method's attributes) should include all attribute brackets attached to a method declaration, not just the first/last one found.