fix: align desktop task contract and protocol sync#13
Conversation
- align desktop task APIs with workspace-scoped Tauri commands - move shared protocol types into domain files and reuse them in desktop - add protocol drift checks plus CI coverage for shared Rust/TS models
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b6bc636da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| label: "task-loop", | ||
| tsPath: path.join(repoRoot, "packages/shared/task-loop.ts"), | ||
| fieldNameStyle: RAW, | ||
| unions: ["TaskStatus"], |
There was a problem hiding this comment.
Validate task-loop fields using camelCase wire names
The new sync guardrail is configured to compare task-loop fields in raw snake_case, but the Rust source of truth serializes these structs with #[serde(rename_all = "camelCase")] (for example Task, TaskPlan, TaskEvent, and WorkspaceContext in crates/codra-protocol/src/lib.rs). Because fieldNameStyle is set to RAW here, CI will report protocol parity even when TypeScript field names diverge from the actual IPC payload shape, so runtime contract breaks at the desktop boundary can slip through undetected.
Useful? React with 👍 / 👎.
Summary
Test Plan
pnpm check:task-loop-protocol-syncpnpm --filter desktop buildcargo check --manifest-path apps/desktop/src-tauri/Cargo.tomlcat .github/workflows/ci.yml | pnpm dlx yaml validNotes for Reviewers
Cargo.lockandcrates/codra-memory/*were intentionally left out of this PR