Skip to content

fix dag walks being order-dependent...again - #17

Merged
withinboredom merged 1 commit into
mainfrom
fix/dag-walk
Oct 27, 2026
Merged

withinboredom merged 1 commit into
mainfrom
fix/dag-walk

Conversation

@withinboredom

@withinboredom withinboredom commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved snapshot selection when reconstructing state across branching dependency paths. Results now remain consistent across different tip orders, fork replay orders, and duplicated tips.
    • Dependency fetch errors continue to be reported immediately.

Signed-off-by: Robert Landers <landers.robert@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: e498b59a-87ca-4a21-b7f6-8563d6e2ca94
Commits

Reviewing files that changed from the base of the PR and between 87f9d19 and c99cdf4.

Files selected for processing: 2
  • effects/dag.go
  • effects/dag_frontier_test.go

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

dag.bfs now tracks unresolved dependency paths separately from queued work and selects a snapshot LCA when it is the sole remaining frontier entry. A new test covers snapshot selection and reconstruction across base kinds, tip orders, replay orders, and duplicate tips.

Changes

DAG Dependency Frontier

Layer / File(s) Summary
Frontier traversal and validation
effects/dag.go, effects/dag_frontier_test.go
dag.bfs tracks dependency paths separately from queued work and selects a snapshot LCA when it is the only remaining frontier entry. Tests check LCA selection and reconstruction across base kinds, tip orders, replay orders, and duplicate tips.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • swytchdb/engine#16: Both PRs address order-independent DAG frontier behavior. PR #16 also includes durability and system changes.
Merge Risk: Minimal · up to c99cd

No material merge risk was identified in the changed DAG traversal or its new test. Normal checks remain appropriate.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title identifies the main change: fixing order-dependent DAG walks. It is informal and includes an ellipsis, but it remains specific and relevant.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the paths in flight,
While queued effects pass through the night.
The lone snapshot marks the place,
Where branches meet and keep their pace.
Then tested roots rebuild just right.

Comment @coderabbitai help to get the list of available commands.

@withinboredom
withinboredom merged commit 76b663b into main Oct 27, 2026
5 checks passed
@withinboredom
withinboredom deleted the fix/dag-walk branch October 27, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant