Skip to content

Preserve unresolved items across resolve() calls#711

Merged
st0012 merged 1 commit intomainfrom
fix-push-back-unresolved
Apr 1, 2026
Merged

Preserve unresolved items across resolve() calls#711
st0012 merged 1 commit intomainfrom
fix-push-back-unresolved

Conversation

@st0012
Copy link
Copy Markdown
Member

@st0012 st0012 commented Mar 31, 2026

Summary

Found by the incremental consistency testing tool.

  • unit_queue lives on the Resolver (ephemeral), while pending_work lives on Graph (persists across resolve() calls). With incremental invalidation, items can be temporarily unresolvable — e.g. a reference from a surviving file whose target was just deleted but will be re-added.
  • Previously, these items were silently dropped when the convergence loop exhausted without progress and the Resolver was dropped.
  • Drain leftover unit_queue items back to pending_work via Graph#extend_work at the end of resolve() so they're retried on the next call.

@st0012 st0012 marked this pull request as ready for review March 31, 2026 21:05
@st0012 st0012 requested a review from a team as a code owner March 31, 2026 21:05
@st0012 st0012 self-assigned this Mar 31, 2026
@vinistock vinistock added the bugfix A change that fixes an existing bug label Apr 1, 2026
Copy link
Copy Markdown
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution looks good, just some code comments

Comment thread rust/rubydex/src/model/graph.rs Outdated
Comment thread rust/rubydex/src/resolution.rs Outdated
@st0012 st0012 force-pushed the fix-push-back-unresolved branch 3 times, most recently from 1dd659a to 638a24f Compare April 1, 2026 17:07
During incremental invalidation, references from surviving files may be
consumed by delete-phase resolution where their target doesn't exist
yet. Without pushing them back to pending_work, they're dropped
permanently and never retried after the re-add phase recreates the
target.
@st0012 st0012 force-pushed the fix-push-back-unresolved branch from 638a24f to 851992b Compare April 1, 2026 17:09
@st0012 st0012 enabled auto-merge (squash) April 1, 2026 17:09
@st0012 st0012 merged commit 0f81f2c into main Apr 1, 2026
36 checks passed
@st0012 st0012 deleted the fix-push-back-unresolved branch April 1, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix A change that fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants