You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C5 follow-up: hydrate task-node conflicts from current_node (zero round-trip) #1274
In packages/core/src/ops/mod.rs, From<NodeServiceError> for OpsError converts NodeServiceError::VersionConflict with current_node: None unconditionally. This conversion is used by the task-node update path (update_task_node in the daemon).
For regular node conflicts, node_ops::update_node calls node_service.get_node() after the conflict and populates current_node before constructing OpsError::VersionConflict. The task-node path does not do this.
Current behavior
When a task-node write produces a VersionConflict:
The daemon still emits the x-version-conflict header (correct)
But current_node is always null in the payload
The frontend's task-node OCC site correctly falls back to resyncNodeFromServer (no data loss)
This causes an extra gRPC round-trip to fetch the authoritative state
Target behavior
Fetch current_node in the task-node OCC path, the same way node_ops::update_node does:
// In packages/daemon/src/services/node_service.rs: update_task_node handler// or in packages/core/src/ops/ if a task_node_ops module is addedErr(NodeServiceError::VersionConflict{ node_id, expected_version, actual_version }) => {let current_node = node_service.get_node(&node_id).await.ok().flatten().and_then(|n| serde_json::to_value(&n).ok());returnErr(OpsError::VersionConflict{ node_id,expected: expected_version,actual: actual_version, current_node });}
Acceptance criteria
Task-node VersionConflict populates current_node in the daemon OCC payload
x-version-conflict header carries a non-null current_node for task conflicts
Frontend task-node OCC site hydrates from current_node instead of resyncing (one less round-trip)
Existing error_mapping_version_conflict_returns_aborted test updated to reflect the change
Priority:backend — low urgency (no data loss in current behavior, just an extra round-trip).
Activity
Hydrate task-node OCC conflicts from current_node (closes #1274)
Hydrate task-node OCC conflicts from current_node (closes #1274)
C5: Replace the client-side 5s conflict heuristic with the daemon's a…