refactor(project): share create and update inputs#10578
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
ProjectMutationunion in project.ts into standalone exportedProjectCreatePayloadandProjectUpdatePayloadschemas and inferred types. - Refactors
ProjectCreateInputandProjectUpdateInputin ProjectService.ts to extend the shared payload contracts, keeping onlycommandIdandprojectIdlocally. - Adds tests in project.test.ts covering optional/nullable field behavior: omitted properties stay omitted,
falseandnullare preserved, and explicitly-suppliedundefinedupdate properties remain present.
Macroscope summarized 8073615.
Added 3 commits
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.
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.