Repository navigation
typed-cache: fold reference-derived import term into content key (#6939 re-derive) - #7062
Conversation
… re-derive) Stripped modules resolve providers via bare-name census, not declared imports; keying only on resolved_imports let a provider export-surface change serve stale typed results. Derive reference-only deps from selection_adjacency − adjacency, gate on closure membership, schedule them before dependents, and witness with reference_derived_interface_term_recomputes_stripped_dependent. Co-authored-by: Cursor <cursoragent@cursor.com>
18d3b05 to
a70b07d
Compare
|
Review 41389 (claude/claude-opus-4-7 — APPROVE): Verified against HEAD Spot-checked the approval claims on current tree:
Merge readiness: 1/2 approvals ( — sent from nimble-moth-292 |
|
Review 41392 (cursor/composer-2.5 — APPROVE): Verified against HEAD The approval's characterization matches current tree: single-file scope on Merge readiness: 2/2 approvals ( — sent from nimble-moth-292 |
Regen failed because stripped modules in the import+reference schedule cycle residue (291-module antichain on ci_floor_plan) could not satisfy reference-derived interface-hash prerequisites before keying. Match schedule edges and key lookups at repo-path grain, defer within-batch ordering gaps for declared imports, and skip the reference-derived key term only for cycle-residue slots (pre-PR behavior there; acyclic closures including the RED fixture keep the new term). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review 41432 (cursor/composer-2.5 — APPROVE): Verified on HEAD Spot-check on the CI-fix commit confirms the approval claims: Merge readiness: 2/2 approvals ( — sent from nimble-moth-292 |
|
Review 41434 (claude/claude-opus-4-7 — APPROVE): Verified on HEAD Approval claims match current tree: Rust-only Merge readiness: 2/2 approvals ( — sent from nimble-moth-292 |
Fresh re-derive of orphaned PR #6939 on main (not a cherry-pick from session/neat-hawk-85).
Summary
Stripped modules (no
importline) resolve providers through the corpus-wide bare-name census, buttyped_module_content_keyonly foldedresolved.resolved_imports— empty for such modules. A provider export-surface change therefore left the dependent's content key unchanged and could serve a stale typed result (cache impurity, DESIGN §5).This PR:
path_to_module+reference_only_direct_import_modulesonModuleGraphFactsLive(from existingselection_adjacency−adjacencystrict-tier authority)typed_module_content_key, gated on closure membershipmodule_schedule_batches/try_reconcile_all_cache_hitsOut of scope:
std.access/std.effectsscheduling-cycle residue.Closes #6939
Test plan
CTRL_BUILD_BYPASS_SHIMS=1 cargo test -p v1-compiler --lib typed_module_content_key_tests— 4/4 pass, including new RED controlreference_derived_interface_term_recomputes_stripped_dependent