perf: avoid duplicate assignment context analysis
Problem
While enumerating a module's names, _ScopeVisitor._assigned built the source binding index to copy a branch context into each AssignmentValue. Value inference already calls soi._assignment_branch_context, which queries that authoritative index again before consulting the optional copied field.
The eager call is present in the native Infra #3047 failure: star-import enumeration reaches _assigned and constructs SourceBindingIndex during the original two-second planning contract. The recorded 1.331 s covers the entire first orphan phase; it is not an isolated timing of index construction.
Changes
Remove only the seven lines that precompute the context in _assigned. Keep assignment registration, rebinding, pre_assignment_binding, order and identity intact. The existing inference owner still resolves the native context when a value is needed.
Explicit constructor-supplied contexts, native star-import precedence, complete enumeration, cache lifetimes and syntax parsing remain unchanged. The public source-index getter still produces a complete index.
Observable detail: visitor-created assignments keep the optional branch_context field at its default during name enumeration. Semantic errors that require index construction can consequently appear when value analysis requests that index. The parameter and field remain available; this PR does not describe them as private.
The independent review read all 101 runtime Python files and found only the inference reader and TypeAlias copy consuming this field. A second census of all 782 Infra source Python files found no reference to AssignmentValue or branch_context. Its existing assignment readers use cardinality, AST nodes, type hints and source lines.
Validation
This unit is separate from #94 and preserves that merged correction.
No tests, fixtures, warnings, timeout limits, generated projections or locks are changed. Existing public regressions cover TYPE_CHECKING provenance and rebinding, agreeing/ambiguous branches, annotated aliases, foreign AST and source invalidation. The normal run 47667197120 passed for head c6849bfd6c39d4418a5acad23cf1bb5937dd6d54. All four jobs checked out preview e71be3515cbf4d619c868c695e7d8d051884b35c, whose tree d39529a1859bac9e4ceceab17eaf7f88b6dea27b exactly matches the authored candidate and retains the qualified #94 base.
| Native job | Passed | Skipped | Passed subtests | Duration |
|---|---|---|---|---|
| Make and installed package | 3533 | 56 | 269 | 61.93 s |
| Linux | 3533 | 56 | 269 | 77.95 s |
| Windows | 3529 | 58 | 270 | 146.36 s |
| macOS | 3533 | 56 | 269 | 106.58 s |
Native source checks, documentation, build and 53 installed-wheel contracts also passed. The existing branch/alias/invalidation cases, invalid-header failure contract and #94 regression remained green. Black is green and there are no unresolved inline review threads. These suite durations are execution receipts, not an isolated performance comparison.
No local project code, tests, lint or generators were executed. No new functional RED or measured speedup is claimed. The consumer's original timeout is not closed by source inspection: it still requires native dependency adoption and the original Infra CI with its unchanged two-second budget.
The numbered changelog.d/95.md and fork delivery record are included. The final candidate is c6849bfd6c39d4418a5acad23cf1bb5937dd6d54.
Integrated qualification
Normal merge 29730e558b185e4db44216ba43f0270547906e8b preserves the exact qualified tree d39529a1859bac9e4ceceab17eaf7f88b6dea27b.
Post-merge run 47667757264 passed all four jobs on that exact commit. The native Make job passed 3,533 tests, 56 skipped, 269 subtests in 58.13 s, plus 53 installed-wheel contracts. Linux passed 3,533/56/269 in 82.41 s; macOS 3,533/56/269 in 96.82 s; Windows 3,529/58/270 in 113.20 s. Source checks, documentation and build passed. The existing source-invalidation and #94 regression passed again.
Producer qualification is complete. Native Infra adoption and its original timeout qualification remain open.
Traceability
Revision 1.3 — 2026-12-06 — Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Base: 54b951c24c1c8afd36e99cdbc95ce6cbc1a015a3. Existing LGPL-3.0-or-later license and copyright are preserved.