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 — the decorators property returned via query_graph for that Method node only contains one of the two attributes. The other is silently dropped.
[HttpPost]
[Route("orders/{id}/confirm")]
public async Task Confirm(Guid id)
{
...
}
We queried this via:
MATCH (m:Method)
WHERE m.decorators IS NOT NULL
RETURN m.name, m.file_path, m.decorators
For methods shaped like the example above, m.decorators came 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 :Route node 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 on main / 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.
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.