Repository navigation
fix(client): retry truncated ancestor walks instead of caching them - #1048
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closes #1039.
Problem
PR #843's family sync walks missing ancestors by ID, best effort: when an ancestor
session.getfails (the.catch(() => undefined)), the walk breaks and the sync still completes, cachingsession.family:<id>as complete. Later family syncs — including reopening the same session — never retry the missing ancestor until an unrelated invalidation.resolveRootthen keeps grouping under the furthest-known ancestor: the #631 wrong-root symptom, with no error surfaced. The descendant walk already invalidates on a skipped branch; the ancestor walk had no mirror rule.Fix
ancestorsComplete: set false only when a parent GET fails or returns a mismatched ID (walk stopped early). Genuine termination (noparentID, seen-set cycle guard, or walking through cached info) still counts as complete — no invalidation loop.session.family:<id>when the ancestor walk truncated OR the descendant walk was incomplete.syncDescendantsstill always runs for its publish side effect (no short-circuit).retries the ancestor walk on the next sync after a parent read failed: first family sync with a 500 on the root GET groups tentatively without root info; second sync re-GETs the root (asserted: 2 root GETs), resolves the true root, and completes the family.Acceptance
session.family:<id>, mirroring the descendant rule — next sync retries.Verification
bun test test/solid-data.test.ts(packages/client): 40/40 pass with fix; new test fails on unpatched code (2nd root GET never happens) — true regression coverage.bun typecheck(packages/client): clean.Notes
queue/4118-1039-ancestor-retryper the repo-queue runbook for traceability (repo AGENTS.md prefers slashless short names; runbook governs here).Need help on this PR? Tag
@codesmith-botwith what you need.