Repository navigation
Closed
Labels
Description
Overview
Define the task types once, in nodespace-types, and route the typed task update through the shared update pipeline (ADR-086 §1, §4 "Flat").
Problem Statement
- Two definitions.
TaskNode,TaskNodeUpdate,TaskStatusand the priority enum exist inpackages/nodespace-types/src/task.rsand again inpackages/core/src/models/task_node.rs, with different fields. Core's copy also writes camelCase keys (dueDate,startedAt,completedAt). - A wrong response. The daemon's
update_task_node(packages/daemon/src/services/node_service.rs) builds its response from core's copy (task.into_node()). The response hard-codeslifecycle_status: "active"and drops the node's extension properties. - Its own write path. Core's
update_task_node(packages/core/src/services/node_service/schema.rs) writes through its own store method rather than the generic pipeline, so it doesn't share the pipeline's validation,title_template, invariant dispatch and events. - Unclearable priority.
TaskNodeUpdate.prioritycan't be cleared: neither copy uses the clearable deserializer. - Ignored properties. The proto
UpdateTaskNodeRequest.propertiesis sent by the dev-proxy and ignored by the daemon. contentin the typed update. Typed updates carry only the type's schema fields;contentis an envelope field written through the generic update.
Proposed Solution
- Delete core's
TaskNode,TaskNodeUpdate,TaskStatusand priority copies; core imports thenodespace-typesdefinitions, and core-only behaviour becomes free functions or extension traits. - Core's
update_task_nodelowers the typed update into the generic update pipeline. - The daemon responds with the node as stored, through the typed conversion, keeping
lifecycle_statusand extension properties. priority(and every clearable field) uses the clearable deserializer: absent = unchanged,null= clear.- Drop
contentfromTaskNodeUpdate, and drop the ignoredpropertiesfrom the typed task RPC (or honour it as extension fields; choose one and document it). ProjectNode.priorityuses the same shared priority enum as task.
No migration: reset the database.
Architecture Impact
Implements decisions/086-core-node-types-defined-once-typed-by-category.md §1 and §4 (nodespace-docs) for task (and the shared priority scale with project).
Acceptance Criteria
- No task type is defined in
packages/core/src/models/task_node.rs; core imports thenodespace-typesones (the file is deleted or holds only functions) - A typed task update goes through the generic pipeline:
title_template, invariants and events fire (test) - A typed update's response keeps
lifecycle_statusand extension properties (test with an archived task carrying acustom:field) -
priority: nullclears; an absentpriorityleaves it unchanged (test) -
TaskNodeUpdatehas nocontent -
project.priorityuses the shared priority enum - Follows
development/node-type-sequence.md; thenode-types.mdtask and project sheets updated in the same PR -
bun run test:changedpasses;bun run quality:fixclean
Technical Specifications
Reference Files
packages/nodespace-types/src/task.rs,packages/nodespace-types/src/project.rspackages/core/src/models/task_node.rspackages/core/src/services/node_service/schema.rs(update_task_node)packages/daemon/src/services/node_service.rs(update_task_node)packages/proto/proto/node_service.proto(UpdateTaskNodeRequest)packages/dev-tools/src/dev-proxy.ts,packages/desktop-app/app-lib/src/commands/nodes.rs
Dependencies
- Add the core node type registry, shared envelope, closed schemas and extends-aware rules #3439 (envelope, registry)
Related Issues
- Generate the frontend's wire types from nodespace-types and gate them for drift #3440 (generated TypeScript replaces the hand-written task types)
Non-Goals
SchemaNodeand the AI-chat types (separate issues)
Activity
malibio commentedon Oct 1, 2026
Baseline — Frontend: 301 test files passed, 5558 tests passed