Skip to content

feat(entrypoints): heuristic tier on the written decorator spelling; odoo GET+POST; quieter unresolved - #185

Merged
rahlk merged 1 commit into
mainfrom
feat/issue-184-entrypoint-heuristics
Sep 6, 2026
Merged

feat(entrypoints): heuristic tier on the written decorator spelling; odoo GET+POST; quieter unresolved#185
rahlk merged 1 commit into
mainfrom
feat/issue-184-entrypoint-heuristics

Conversation

@rahlk

@rahlk rahlk commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Closes #184.

A decorator that reads as an HTTP hook (route, *.route, *.*.route, or a one- or two-segment .get/.post/.put/.patch/.delete/.head/.options/.websocket) is now an entrypoint on its own, recorded with framework: "heuristic", confidence: "heuristic" and rule id heuristic.http-route / heuristic.http-verb, whether or not a framework was detected or any framework rule knows the library. Route and methods come from the decorator arguments exactly as framework rules take them; a node a framework rule already matched gets no heuristic record. Shipped as a heuristics: block in rules.yml, disableable by id like every other rule. * now keeps its meaning inside a {a,b} alternation. No schema change: confidence: "heuristic" already existed.

Also: the odoo rule's default methods are [GET, POST] (Odoo serves both unless methods= narrows the route; json-typed routes are POST), and PyEntrypointReport.unresolved stops counting the nameable (builtins, subscripted generics, spellings whose head is imported or declared).

Verified on odoo_slim (1,626 modules, -a 1 --no-venv --ray):

run result
odoo rules disabled via user rules file 534 heuristic.http-route, 0 framework records
default rules 534 odoo.route with [GET, POST] where the decorator says nothing, 94 odoo.controller, 0 heuristic records
unresolved builtins gone; top entries are real unknowns (nary_condition_optimization, peer_connection.on)

Gates: entrypoint, rules, decorator, artifact, symbol-table, conformance, schema and config suites, 317 passed. test_cli.py left to CI (memory-killed locally, as with the previous four PRs).

…odoo GET+POST; quieter unresolved

A decorator that reads as an HTTP hook — `route`, `*.route`, `*.*.route`, or a
one- or two-segment `.get`/`.post`/`.put`/`.patch`/`.delete`/`.head`/
`.options`/`.websocket` — is now an entrypoint on its own, recorded with
`framework: "heuristic"`, `confidence: "heuristic"` and rule id
`heuristic.http-route` / `heuristic.http-verb`, whether or not a framework
was detected or any framework rule knows the library. Route and methods
come from the arguments exactly as framework rules take them; a node a
framework rule already matched gets no heuristic record. Shipped as a
`heuristics:` block in rules.yml, disableable by id. `*` now keeps its
meaning inside a `{a,b}` alternation.

The odoo rule's default methods are [GET, POST]: Odoo serves both unless
`methods=` narrows the route, and json-typed routes are POST.

`PyEntrypointReport.unresolved` stops counting the nameable: builtins,
subscripted generics, and any spelling whose head is imported or declared.
On Odoo it listed 24 `Exception` and 20 `object` bases as unresolved.

Verified on odoo_slim (1,626 modules): with the odoo rules disabled the
heuristic tier alone finds the same 534 `@http.route` methods.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entrypoints: framework-independent heuristic tier on the written decorator spelling

1 participant