You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entrypoint detection is rule-driven (codeanalyzer/entrypoints/pipeline.py, matching.py): a decorator is first resolved to a qualified name (@http.route → odoo.http.route), then a frameworks: rule in rules.yml has to name that qualified name. Without an odoo block, the resolved name matches nothing and a project whose whole surface is @http.route reports zero entrypoints — the case #177 hit on Odoo. A decorator spelled @http.route, @app.get or @router.post is evidence of an entrypoint on its own, whether or not the analyzer knows the library behind it.
Two smaller defects seen in the same Odoo output: PyEntrypointReport.unresolved lists Python builtins (object ×20, Exception ×24, str, type) and subscripted generics (typing.Generic[T]) as unresolved bases, because base resolution consults only the import table; and the odoo.route rule defaults http_methods to [GET] while Odoo serves GET and POST unless methods= narrows the route.
Scope boundary
Decorators only, matched on the written spelling. No base-class heuristics and no routing engine — #27 keeps those. No schema change: PyEntrypoint.confidence already allows "heuristic".
Goals
heuristics: block in rules.yml: heuristic.http-route ({route,*.route,*.*.route}) and heuristic.http-verb ({*,*.*}.{get,post,put,patch,delete,head,options,websocket}), confidence heuristic, disableable by id
The tier runs on every node regardless of frameworks_detected; a node a framework rule already matched gets no heuristic record
Route and methods extracted from the decorator arguments exactly as framework rules do
* keeps its meaning inside a {a,b} alternation
odoo.route default methods [GET, POST]
unresolved skips builtins, subscripted generics, and any spelling whose head is an imported name or a declared class
Caveats and known risks
A spelling heuristic flags non-HTTP .get/.post decorators (an event emitter's @bus.on is excluded, but @cache.get is not). That is what confidence: "heuristic" exists for; consumers threshold on it.
Problem
Entrypoint detection is rule-driven (
codeanalyzer/entrypoints/pipeline.py,matching.py): a decorator is first resolved to a qualified name (@http.route→odoo.http.route), then aframeworks:rule inrules.ymlhas to name that qualified name. Without anodooblock, the resolved name matches nothing and a project whose whole surface is@http.routereports zero entrypoints — the case #177 hit on Odoo. A decorator spelled@http.route,@app.getor@router.postis evidence of an entrypoint on its own, whether or not the analyzer knows the library behind it.Two smaller defects seen in the same Odoo output:
PyEntrypointReport.unresolvedlists Python builtins (object×20,Exception×24,str,type) and subscripted generics (typing.Generic[T]) as unresolved bases, because base resolution consults only the import table; and theodoo.routerule defaultshttp_methodsto[GET]while Odoo serves GET and POST unlessmethods=narrows the route.Scope boundary
Decorators only, matched on the written spelling. No base-class heuristics and no routing engine — #27 keeps those. No schema change:
PyEntrypoint.confidencealready allows"heuristic".Goals
heuristics:block inrules.yml:heuristic.http-route({route,*.route,*.*.route}) andheuristic.http-verb({*,*.*}.{get,post,put,patch,delete,head,options,websocket}), confidenceheuristic, disableable by idframeworks_detected; a node a framework rule already matched gets no heuristic record*keeps its meaning inside a{a,b}alternationodoo.routedefault methods[GET, POST]unresolvedskips builtins, subscripted generics, and any spelling whose head is an imported name or a declared classCaveats and known risks
.get/.postdecorators (an event emitter's@bus.onis excluded, but@cache.getis not). That is whatconfidence: "heuristic"exists for; consumers threshold on it.Definition of done
odoo_slimwithodoo.routeandodoo.controllerdisabled via a user rules file, the heuristic tier alone finds the 534@http.routemethods.odoo.routerecords with[GET, POST]and zero heuristic records on those nodes.