Package cold cost is 1.8–2.3x the builtin against a 1.20 budget; python package leaves get_version/create_app/request unresolved (nightly package-ci red) #347
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#347
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the CI-FAST lane (#344) while investigating why package-ci is red. These are product defects, not CI flakiness.
1. The cold-cost budget fails for every package
its_package_matches_native_semantics_and_fits_cold_and_warm_budgets(crates/first-party-tests/tests/support/language_overhead.rs:219) already compares the package against the builtin in alternating rounds within one process and takes the median. The comparison is therefore not distorted by contention on the machine.Measured on a nearly idle box (load 2.6–3.7, 12 cores), every language's package is about 1.8–2.3x the builtin cold, against a budget of 1.20:
The scheduled master run 1018 (
04b5b96e) failed this test for csharp, javascript, php, python, rust, typescript and ruby. Since v0.33.0 the cold cost was measured at 1.37–3.64x (see the v0.33 notes). The budget has been red since then, and nightly runs carried that as noise.Decision needed: reduce the package cold cost, or re-derive the budget from measurement with a stated reason. Do not keep a gate that is always red.
2. Python package semantic parity defect (pre-existing)
The same test's parity half fails for python. The package leaves
get_version,create_appandrequestunresolved where the builtin resolves them. It reproduces identically in nightly 1018, in PR run 1041, and locally.Related: #344, #315 (python package parity), #345.
Item 2 (python parity): root-caused and fixed in PR #344
Root cause. The defect is in the host, in
crates/indexer/src/python_imports.rsbuild.readyfor every file. On python-flask,pyproject.tomlis metadata-only, so the identities it reports are exactly the native path-derived names.request,app_ctx,g,get_db,json,session,create_app,get_versionand others.member_access→typekind change follows from the lost bind; it is not a separate extractor defect.Fix (
910353e9). If a layout restates exactly the native identities for every file, the pass resolves as it would with no layout. The rule is generic, keyed on the import-system profile rather than on python, and decided over the whole layout, never file by file.python_imports::module_metadata_tests::a_layout_restating_the_native_identities_resolves_as_no_layout.restates_nativemutation and it was red.precision_gate(7/7) are green.Finding, not fixed here. Many of the builtin's own binds that parity reproduces are wrong:
get_versionbindssrc/flask/cli.pyalthough it comes frompallets_sphinx_themes;app_ctxbinds the pytest fixture;request,gandsessionbindctx.pyproperties instead of the proxies inglobals.py.#336 removes part of this class.
Item 1 (cold-cost budget): still open
Released in v0.36.0.
🤖 Generated with Claude Code