Skip to content

fix: align desktop task contract and protocol sync#13

Merged
Abdulmuiz44 merged 1 commit into
mainfrom
fix/desktop-contract-protocol-sync
May 19, 2026
Merged

fix: align desktop task contract and protocol sync#13
Abdulmuiz44 merged 1 commit into
mainfrom
fix/desktop-contract-protocol-sync

Conversation

@Abdulmuiz44
Copy link
Copy Markdown
Collaborator

Summary

  • align the desktop task UI and Tauri command wrappers with workspace-scoped task APIs and backend snake_case statuses
  • move shared Rust/TS protocol mirrors into domain files and reuse shared task-loop types in the desktop layer
  • add a shared protocol drift check, contributor docs, and CI coverage for task-loop, planner, executor, and verifier domains

Test Plan

  • pnpm check:task-loop-protocol-sync
  • pnpm --filter desktop build
  • cargo check --manifest-path apps/desktop/src-tauri/Cargo.toml
  • cat .github/workflows/ci.yml | pnpm dlx yaml valid

Notes for Reviewers

  • unrelated local edits in Cargo.lock and crates/codra-memory/* were intentionally left out of this PR

- 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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Abdulmuiz44 Abdulmuiz44 merged commit e2ed14f into main May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant