refactor(project): share create and update inputs#10578

merged3
agents/mcp-shared/model-selection
agents/mcp-shared/project-inputs
openedSep 7, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

Part 2/16 of the shared-core and MCP stack. Based on #10577. Next: #10580.

Project create/update fields were separately defined by the RPC contract, service input types, and MCP tools. This exports ProjectCreatePayload and ProjectUpdatePayload from contracts, composes the existing ProjectMutation envelope from them, and derives ProjectService input types from the same payloads. MCP consumes them in its own layer.

Existing RPC fields and omitted/null/false behavior are preserved, including explicit undefined for internal RPC callers. No project service execution, authorization, or deletion behavior changes.

Validation: Contracts, project service and HTTP mapping suites: 20 tests passed. Independent server/contracts typechecks passed. The contract regression covers trimmed input and omitted/null/false values through the RPC envelope.

Layer size: 3 files, +69/-32. No MCP tools are introduced in this prerequisite.

Prepared with Codex in the OpenAI agent runtime.

Note

Extract ProjectCreatePayload and ProjectUpdatePayload schemas for shared project inputs

  • Splits the create and update field definitions out of the ProjectMutation union in project.ts into standalone exported ProjectCreatePayload and ProjectUpdatePayload schemas and inferred types.
  • Refactors ProjectCreateInput and ProjectUpdateInput in ProjectService.ts to extend the shared payload contracts, keeping only commandId and projectId locally.
  • Adds tests in project.test.ts covering optional/nullable field behavior: omitted properties stay omitted, false and null are preserved, and explicitly-supplied undefined update properties remain present.

Macroscope summarized 8073615.

Added 3 commits

  • refactor(contracts): share project mutation payloads2568ec8
  • refactor(project): derive service inputs from shared payloads5eb6b6b
  • chore: tidy shared project schema extraction8073615
Synced from GitHub

Approvability

Verdict: Approved at 8073615

Macroscope's review found this PR approvable — This is a contained extraction of existing project payload schemas and service types; the ProjectMutation runtime shape and existing RPC paths remain unchanged. Focused tests verify trimming and omitted, false, null, and undefined value handling.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 8073615.

This comment will update automatically after the next completed run.