de.h-dv.python package: 91 lost bindings vs the builtin on flask (member_access head emitted as type, imported calls unresolved). Ship the fix as a package release, not a host release #315

Closed
opened 2026-10-05 09:58:41 +02:00 by buildagent · 1 comment
Member

Measured on the v0.33.0 candidate (8879fd84 + 5e4c602b), using language_package_overhead (quiet machine, release worker). Six packages match the builtin exactly. The Python package does not on python-flask:

references and targets: 15,365 rows on both sides, but 91 sites differ, and every one is a package-side recall loss. The package never binds a site the builtin leaves unbound, so there are no phantom binds.

builtin package sites
member_access, bound (e.g. request in request.args → src/flask/ctx.py#request, g, session, app_ctx) emitted as kind type, unresolved 66
call, bound (get_version, create_app, get_db, abort, …) unresolved 18
method_call, bound unresolved 4
type, bound unresolved 3

By location: examples/ 46, src/ 27, tests/ 17, docs/ 1. The top names are request 26, app_ctx 19, g 10, get_db 8, json 6, session 5, create_app 4.

Two defects in the package's extractor and its import facts:

  1. Wrong kind for an attribute head. The head of an attribute access on a module-level object is reported as type, not member_access, so receiver resolution never sees it.
  2. Imported functions stay unresolved. Several imported functions (relative and from … import) never resolve; the builtin resolves them.

Operator direction (2026-10-05): "this is what plugins are for". Fix it IN THE PACKAGE (tests/packages/python, its guest) and ship it as the next de.h-dv.python version through the package-release workflow. The fix must not wait for a host release.

Python stays on the builtin in v0.33.0, as every language ships opt-in/shadow.

Done when: language_package_overhead's python-flask row reports semantic_failure: null, alongside the other six. Reproduce with COSI_OVERHEAD_REPS=3 and .take(12) widened to see all 91 rows.

**Measured on the v0.33.0 candidate (8879fd84 + 5e4c602b)**, using `language_package_overhead` (quiet machine, release worker). Six packages match the builtin exactly. The Python package does not on python-flask: `references and targets`: 15,365 rows on both sides, but **91 sites differ, and every one is a package-side recall loss.** The package never binds a site the builtin leaves unbound, so there are no phantom binds. | builtin | package | sites | |---|---|---| | `member_access`, bound (e.g. `request` in `request.args` → `src/flask/ctx.py#request`, `g`, `session`, `app_ctx`) | emitted as kind `type`, unresolved | 66 | | `call`, bound (`get_version`, `create_app`, `get_db`, `abort`, …) | unresolved | 18 | | `method_call`, bound | unresolved | 4 | | `type`, bound | unresolved | 3 | By location: `examples/` 46, `src/` 27, `tests/` 17, `docs/` 1. The top names are request 26, app_ctx 19, g 10, get_db 8, json 6, session 5, create_app 4. Two defects in the package's extractor and its import facts: 1. **Wrong kind for an attribute head.** The head of an attribute access on a module-level object is reported as `type`, not `member_access`, so receiver resolution never sees it. 2. **Imported functions stay unresolved.** Several imported functions (relative and `from … import`) never resolve; the builtin resolves them. **Operator direction (2026-10-05):** "this is what plugins are for". Fix it IN THE PACKAGE (`tests/packages/python`, its guest) and ship it as the next `de.h-dv.python` version through the package-release workflow. The fix must not wait for a host release. Python stays on the builtin in v0.33.0, as every language ships opt-in/shadow. **Done when:** `language_package_overhead`'s python-flask row reports `semantic_failure: null`, alongside the other six. Reproduce with `COSI_OVERHEAD_REPS=3` and `.take(12)` widened to see all 91 rows.
Author
Member

Closing: no longer reproduces. The nightly package-overhead run 1166 (master 25a45918, v0.39.0) reports semantic_failure: null for de.h-dv.python on python-flask, i.e. the package's resolved index equals the builtin's, and crates/guest/python/parity-deltas.toml records the package walker as equal to the builtin on flask's 83 files with zero declared deltas. The loss went away with the per-package walker ownership in v0.37 (#354); no separate fix commit references this issue. Python is one of the six languages the v0.41 train switches to package ownership, where corpus identity through the package is the acceptance test.

Closing: no longer reproduces. The nightly package-overhead run 1166 (master 25a45918, v0.39.0) reports `semantic_failure: null` for de.h-dv.python on python-flask, i.e. the package's resolved index equals the builtin's, and `crates/guest/python/parity-deltas.toml` records the package walker as equal to the builtin on flask's 83 files with zero declared deltas. The loss went away with the per-package walker ownership in v0.37 (#354); no separate fix commit references this issue. Python is one of the six languages the v0.41 train switches to package ownership, where corpus identity through the package is the acceptance test.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#315
No description provided.