Repository navigation
Skip createNode child transfer when the new node's save fails (closes #3071) - #3081
Conversation
…3071) waitForNodeSaves reports failures instead of throwing, so the child-transfer block ignored a failed or timed-out save of the new node and still pointed the children at a parent the daemon may not have. Throw when the new node is in the failed set so the existing rollback path reverts the on-screen move and emits the child-transfer-failure notification. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pragmatic Code Review — PR #3081Review Type: Initial Review SummaryThis is a small, well-scoped fix. I ran the test file locally: Requirements Check
Code Review FindingsCritical IssuesNone. Suggested ImprovementsNone that block merge. Nitpicks
Interaction check
RecommendationAPPROVE. The change clearly improves correctness: a child can no longer end up with a parent that the daemon may not have, and the test covers exactly the gap described in the issue. |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: APPROVE (posted as a comment — GitHub blocks self-approval). Full findings in the review comment above.
- Log prefix now reads 'Child transfer aborted or failed' since the save-failure path never attempts the transfer - New test restores its spies in try/finally so a failed assertion can't skip them - Skipped: test-name nit (reviewer agreed faking the failed set is the right level) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review addressed (79e6a79)
Tests: Re-review: not needed — log string and test-cleanup changes only, no logic change. |
Summary
waitForNodeSavesreturns the set of failed/timed-out nodes instead of throwing; thecreateNodechild-transfer block ignored it and still calledpersistChildTransferagainst a parent the daemon may not have.child-transfer-failure.Tests
waitForNodeSavesreports the new node failed →moveChildrenToParentnever called, optimistic move reversed, notification emitted. Verified it fails with the fix disabled.reactive-node-service.test.ts: 115 passed. Baseline: 5392 frontend tests passed.--no-verifyat the user's request (the pre-push gate was taking too long on a cold worktree);quality:fixis clean.🤖 Generated with Claude Code